如何撤消`-FIRAnalyticsDebugEnabled`? [英] How do I undo `-FIRAnalyticsDebugEnabled`?
问题描述
我刚刚添加了FIRAnalyticsDebugEnabled
作为启动参数,如在多个地方所建议的那样:
I just added FIRAnalyticsDebugEnabled
as a launch argument as was suggested in several places:
-
Xcode控制台:
The Xcode console:
6.5.0 - [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see [https://help.apple.com/xcode/mac/8.0/])
The Get Started with Google Analytics for iOS guide:
启用后,我开始看到如下输出:
Once I enabled it, I started seeing output such as:
Event is not subject to real-time event count daily limit. Marking an event as real-time. Event name, parameters: session_start (_s), {
firebase_debug (_dbg) = 1;
firebase_event_origin (_o) = auto;
ga_realtime (_r) = 1;
session_id (_sid) = 123;
session_number (_sno) = 2;
}
现在,我知道事件已正确输出,我想禁用此功能,因为它向控制台发送了垃圾邮件.但是,上面提到的所有资源都没有谈论如何禁用它.
Now that I know that events are being output properly, I want to disable this as it is spamming the console. However, none of those resources mentioned above talk about how to disable it.
如何禁用它?
我尝试删除启动参数,但日志仍然显示.
I tried removing the launch argument, but the logs still appear.
请注意,这不是这些类似问题的重复:
Note that this is not a duplicate of these similar questions:
- 如何从以下位置阻止Firebase启动应用程序时记录状态更新-OP从未启用
FIRAnalyticsDebugEnabled
,并询问如何禁用告诉他们启用FIRAnalyticsDebugEnabled
的消息(以及其他功能). - 完全禁用Firebase/Analytics在应用启动时停止控制台垃圾邮件-与上面相同.
- How to stop Firebase from logging status updates when app is launched -- OP never enabled
FIRAnalyticsDebugEnabled
and is asking about how to disable the message telling them to enableFIRAnalyticsDebugEnabled
(among others). - Completely disable Firebase/Analytics to stop console spam on app startup -- same as above.
推荐答案
许多地方会告诉您添加启动项参数-FIRDebugDisabled
,但是因为在启用-FIRAnalyticsDebugEnabled
之前我没有这个参数,所以这很奇怪.
Many places will tell you to add the launch argument -FIRDebugDisabled
but because I didn't have it prior to enabling -FIRAnalyticsDebugEnabled
, that seems odd.
It took a while to find, but the page on DebugView has some key information:
要在开发设备上启用Analytics Debug模式,请在Xcode中指定以下命令行参数:
To enable Analytics Debug mode on your development device, specify the following command line argument in Xcode :
-FIRDebugEnabled
此行为一直存在,直到您通过指定以下命令行参数明确禁用调试模式为止:
This behavior persists until you explicitly disable Debug mode by specifying the following command line argument:
-FIRDebugDisabled
这里的关键是行为仍然存在".看来-FIRAnalyticsDebugEnabled
的行为与之完全相同,因为它一直存在:您只需要运行一次即可.
The key here is that the "behavior persists." It appears that -FIRAnalyticsDebugEnabled
is behaving the exact same way in that it persists: you only need to run it once.
因此可以回到使用-FIRAnalyticsDebugEnabled
运行之前的状态:
Thus to get back to the state you were in before running with -FIRAnalyticsDebugEnabled
:
- 使用
-FIRDebugDisabled
启动参数运行一次应用程序. - 删除启动参数.
- Run the app once with the
-FIRDebugDisabled
launch argument. - Remove the launch argument.
这篇关于如何撤消`-FIRAnalyticsDebugEnabled`?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!