如何撤消`-FIRAnalyticsDebugEnabled`? [英] How do I undo `-FIRAnalyticsDebugEnabled`?

查看:418
本文介绍了如何撤消`-FIRAnalyticsDebugEnabled`?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚添加了FIRAnalyticsDebugEnabled作为启动参数,如在多个地方所建议的那样:

I just added FIRAnalyticsDebugEnabled as a launch argument as was suggested in several places:

  1. Xcode控制台:

  1. 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/])

  • iOS版Google Analytics(分析)入门指南:

  • 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:

    • 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 enable FIRAnalyticsDebugEnabled (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:

    1. 使用-FIRDebugDisabled启动参数运行一次应用程序.
    2. 删除启动参数.
    1. Run the app once with the -FIRDebugDisabled launch argument.
    2. Remove the launch argument.

    这篇关于如何撤消`-FIRAnalyticsDebugEnabled`?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆