Build: AnalyticsCrashlyticsDemo
This screen demonstrates basic integration of Firebase Analytics and Crashlytics in an iOS app. It tracks button taps as analytics events and simulates a crash to test Crashlytics reporting.
Target UI
------------------------- | Analytics & Crashlytics | |-----------------------| | [Log Event Button] | | | | [Cause Crash Button] | -------------------------
Add a button labeled 'Log Event Button' that logs a custom analytics event named 'button_tapped' with a parameter 'button_name' set to 'log_event'.
Add a button labeled 'Cause Crash Button' that triggers a crash to test Crashlytics.
Initialize Firebase in the app.
Ensure buttons are accessible with proper labels.
Use SwiftUI for UI implementation.