Complete the code to import Firebase Analytics in your Swift file.
import [1]
You need to import FirebaseAnalytics to use Analytics features in your Swift app.
Complete the code to log a custom event named "purchase" with Firebase Analytics.
Analytics.[1]("purchase", parameters: ["item": "book", "price": 9.99])
The correct method to log events in Firebase Analytics is logEvent.
Fix the error in the code to record a non-fatal error with Crashlytics.
Crashlytics.crashlytics().[1](NSError(domain: "example", code: 123, userInfo: nil))
The correct method to record non-fatal errors in Crashlytics is recordError.
Fill both blanks to set a user ID and a user property in Firebase Analytics.
Analytics.[1]("user_123") Analytics.[2]("favorite_color", value: "blue")
logEvent instead of setUserProperty.Use setUserID to assign a user ID and setUserProperty to set a user property in Firebase Analytics.
Fill all three blanks to initialize Firebase, enable Crashlytics collection, and log a test event.
FirebaseApp.[1]() Crashlytics.crashlytics().[2] = true Analytics.[3]("test_event")
start() instead of configure().First, call configure() to initialize Firebase. Then enable Crashlytics collection by setting isCrashlyticsCollectionEnabled to true. Finally, log an event with logEvent.