如何禁用/删除FirebaseAnalytics [英] How to disable/remove FirebaseAnalytics
问题描述
我从CocoaPod更新'Google / Analytics'并获取FirebaseAnalytics。
然后,每次运行项目时,FirebaseAnalytics都会生成许多错误日志记录。 p>目前我不使用这个库并想删除它。不幸的是,我找不到任何方法来禁用/删除Pod。
这是Podfile配置
target'myApp'do
inhibit_all_warnings!
use_frameworks!
pod'Google / Analytics'
end
控制台日志:
< FIRAnalytics / DEBUG>调试模式位于
< FIRAnalytics / INFO> Firebase Analytics v.3200000开始
< FIRAnalytics / INFO>要启用调试日志记录,请设置以下应用程序参数:-FIRAnalyticsDebugEnabled(请参阅'https://developer.apple.com/library/ios/recipes/xcode_help-scheme_editor/Articles/SchemeRun.html')
< FIRAnalytics / DEBUG>启用调试日志记录
< FIRAnalytics / DEBUG> Firebase Analytics正在监控网络状态
< FIRAnalytics / DEBUG>上传数据。主持人:https://play.googleapis.com/log
< FIRAnalytics / INFO>自动成功创建Firebase Analytics应用委托代理。要禁用代理,请将Info.plist
< FIRAnalytics / INFO>中的标志FirebaseAppDelegateProxyEnabled设置为NO。 Firebase Analytics已禁用
...
< FIRAnalytics / DEBUG>网络状态已更改。代码,状态:2,已连接
< FIRAnalytics / DEBUG>网络状态已更改。代码,状态:2,已连接
< FIRAnalytics / DEBUG>收到主机的SSL挑战。主持人:https://play.googleapis.com/log
< FIRAnalytics / DEBUG>取消主机的身份验证挑战。主持人:https://play.googleapis.com/log
< FIRAnalytics /错误>遇到网络错误。错误:错误域= NSURLErrorDomain代码= -999取消UserInfo = {NSErrorFailingURLKey = https://play.googleapis.com/log,NSLocalizedDescription =取消,NSErrorFailingURLStringKey = https://play.googleapis.com/log}
...
更新:
我也尝试在Info.plist中添加FirebaseAppDelegateProxyEnabled = false,但它也不起作用。
$ b $要在您的应用中禁用Firebase Analytics收集数据,请参阅
/ guides / disable-analytics#temporary_disable_collection_1rel =noreferrer>这里。
总之,要暂时禁用,请设置 FIREBASE_ANALYTICS_COLLECTION_ENABLED
到 NO
在 GoogleServices-Info.plist
文件。要永久禁用,请在同一个plist文件中将 FIREBASE_ANALYTICS_COLLECTION_DEACTIVATED
设置为 YES
。
I update 'Google/Analytics' from CocoaPod and get FirebaseAnalytics.
After that, each time I run project, the FirebaseAnalytics turns out many error loggings.
Currently I don't use this library and want to remove it. Unfortunately I can't find any way to disable / remove it out of Pod.
Here is the Podfile configuration
target 'myApp' do
inhibit_all_warnings!
use_frameworks!
pod 'Google/Analytics'
end
Console log:
<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}
...
UPDATE: I also try to add FirebaseAppDelegateProxyEnabled = false in Info.plist but it doesn't work either.
To disable the collection of data by Firebase Analytics in your app, see the instructions here.
In summary, to disable temporarily, set FIREBASE_ANALYTICS_COLLECTION_ENABLED
to NO
in the GoogleServices-Info.plist
file. To disable permanently, set FIREBASE_ANALYTICS_COLLECTION_DEACTIVATED
to YES
in the same plist file.
这篇关于如何禁用/删除FirebaseAnalytics的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!