I'm trying to integrate Firebase Analytics with my application. I've linked the proper frameworks and installed the plist that Google provides.
The following code works fine and I can see my_event showing up in the Firebase Debug View:
FirebaseApp.configure()
Analytics.logEvent("my_event")
This code does not work:
let plist = Bundle.main.url(
forResource: "GoogleService-Info",
withExtension: "plist"
)!
let options = FirebaseOptions(contentsOfFile: plist.path)!
FirebaseApp.configure(name: "customName", options)
Analytics.logEvent("my_event")
In the console I see the message
2020-03-26 15:27:08.969113-0700 dmpremier[83834:51654982] 6.21.0 - <AppMeasurement>[I-ACS025018] Event not logged. Call +[FIRApp configure]: my_event
So I am assuming that Analytics only works if you configure a default Firebase app. Is this correct, or is there something else I can do to link analytics to a named app?