1
votes

I have an iOS app, and recently updated the Firebase SDK (for analytics and crash reporting). Our app has opt-in tracking only, so no tracking can occur without consent.

Per instructions, I have these keys in the app's Info.plist:

<key>FirebaseCrashlyticsCollectionEnabled</key>
<false/>
<key>FIREBASE_ANALYTICS_COLLECTION_ENABLED</key>
<false/>

I also have code that does not execute [FIRApp configure] until the user has consented.

When I run my app, I get a rapidly-repeating warning before configuration:

6.31.0 - [Firebase/Core][I-COR000003] The default Firebase app has not yet been configured. Add `[FIRApp configure];` (`FirebaseApp.configure()` in Swift) to your application initialization. Read more: [Google's URL].

This warning repeats every few milliseconds.

The only way I can get rid of this warning is by running [FIRApp configure] for all users at launch. However this fires off an immediate network connection to Google at https://app-measurement.com/sdk-exp, which is a violation of the tracking requirement.

Any thoughts on how to resolve this conflict, short of removing Firebase entirely?

1

1 Answers

0
votes

That warning is occurring because a Firebase call is being made before [FIRApp configure]. You could update your code to avoid that call until you know that configure has been called. To find the call(s), set a breakpoint at https://github.com/firebase/firebase-ios-sdk/blob/master/FirebaseCore/Sources/FIRApp.m#L245.