I am unable to view analytics debug view after I install the app through TestFlight into my test phone.
I have passed in argument -FIRDebugEnabled, and have tried -FIRAnalyticsDebugEnabled but no luck.
-FIRDebugEnabled -FIRAnalyticsDebugEnabled
If I directly installed the app into my test phone through Xcode, the debug view will be available. But if it's installed through TestFlight, the debug view cannot be seen.
3条答案
按热度按时间sc4hvdpw1#
这可以通过将特殊标志注入Firebase的本地存储器来完成。
-FIRDebugEnabled
命令行参数正在由以下两者进行检查:FirebaseCore和FirebaseAnalytics框架,前者将标志保存到共享的UserDefaults
中,后者使用APMUserDefaults
私有类,可以在运行时访问:mzillmmw2#
在
AppDelegate
文件的application:didFinishLaunchingWithOptions:
方法的第一行添加以下代码lp0sw83n3#
在
FirebaseApp.configure()
之前加入下列程式码:然后,转到目标的构建设置,将Release's Optimization level更新为
No Optimization [-Onone]
。之后,上传到TestFlight。这个方法对我很有效!