我从CocoaPod更新了'Google/Analytics',得到了FirebaseAnalytics。
之后,每次运行项目时,FirebaseAnalytics会产生许多错误日志。
目前我不使用这个库,想要将其移除。不幸的是,我找不到任何方法来禁用/移除它。
以下是Podfile的配置:
target 'myApp' do
inhibit_all_warnings!
use_frameworks!
pod 'Google/Analytics'
end
控制台日志:
<FIRAnalytics/DEBUG> Debug mode is on
<FIRAnalytics/INFO> Firebase Analytics v.3200000 started
<FIRAnalytics/INFO> To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see 'https://developer.apple.com/library/ios/recipes/xcode_help-scheme_editor/Articles/SchemeRun.html')
<FIRAnalytics/DEBUG> Debug logging enabled
<FIRAnalytics/DEBUG> Firebase Analytics is monitoring the network status
<FIRAnalytics/DEBUG> Uploading data. Host: https://play.googleapis.com/log
<FIRAnalytics/INFO> Successfully created Firebase Analytics App Delegate Proxy automatically. To disable the proxy, set the flag FirebaseAppDelegateProxyEnabled to NO in the Info.plist
<FIRAnalytics/INFO> Firebase Analytics disabled
...
<FIRAnalytics/DEBUG> Network status has changed. code, status: 2, Connected
<FIRAnalytics/DEBUG> Network status has changed. code, status: 2, Connected
<FIRAnalytics/DEBUG> Received SSL challenge for host. Host: https://play.googleapis.com/log
<FIRAnalytics/DEBUG> Cancelling authentication challenge for host. Host: https://play.googleapis.com/log
<FIRAnalytics/ERROR> Encounter network error. Error: Error Domain=NSURLErrorDomain Code=-999 "cancelled" UserInfo={NSErrorFailingURLKey=https://play.googleapis.com/log, NSLocalizedDescription=cancelled, NSErrorFailingURLStringKey=https://play.googleapis.com/log}
...
更新: 我还尝试在 Info.plist 中添加 FirebaseAppDelegateProxyEnabled = false,但也没有起作用。
FIREBASE_ANALYTICS_ENABLED
设置为“NO”似乎没有任何效果。 我在控制台仍然会看到<FIRAnalytics/INFO> Firebase Analytics enabled
。我一定漏掉了什么... - pejalo