
[英]Firebase iOS SDK - Using configuration file other than GoogleService-Info.plist generates console warning
[英]iOS Firebase configuration generates network activity
我有一个 iOS 应用,最近更新了 Firebase SDK(用于分析和崩溃报告)。 我们的应用程序仅具有选择加入跟踪功能,因此未经同意不得进行跟踪。
根据说明,我在应用程序的 Info.plist 中有这些键:
<key>FirebaseCrashlyticsCollectionEnabled</key>
<false/>
<key>FIREBASE_ANALYTICS_COLLECTION_ENABLED</key>
<false/>
我也有在用户同意之前不会执行[FIRApp configure]
代码。
当我运行我的应用程序时,我在配置前收到一个快速重复的警告:
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].
此警告每隔几毫秒重复一次。
我可以摆脱此警告的唯一方法是在启动时为所有用户运行[FIRApp configure]
。 但是,这会在https://app-measurement.com/sdk-exp 上立即触发与 Google 的网络连接,这违反了跟踪要求。
除了完全删除 Firebase 之外,您对如何解决此冲突有任何想法吗?
出现该警告是因为在[FIRApp configure]
之前进行了 Firebase 调用。 您可以更新您的代码以避免该调用,直到您知道已调用configure
。 要查找调用,请在https://github.com/firebase/firebase-ios-sdk/blob/master/FirebaseCore/Sources/FIRApp.m#L245设置断点。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.