首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >禁用Google应用程序度量调试日志记录

禁用Google应用程序度量调试日志记录
EN

Stack Overflow用户
提问于 2016-01-07 09:57:12
回答 3查看 8.4K关注 0票数 25

在Xcode 7.2中,我如何禁用这些调试/应用程序度量:

代码语言:javascript
复制
2016-01-07 11:52:53.085 MyApp[1457:] <GMR/INFO> App measurement v.1302000 started
2016-01-07 11:52:53.091 MyApp[1457:] <GMR/INFO> To enable debug logging set the following application argument: -GMRDebugEnabled (see http://goo.gl/Y0Yjwu)
2016-01-07 11:52:53.091 MyApp[1457:] <GMR/DEBUG> Debug logging enabled
2016-01-07 11:52:53.092 MyApp[1457:] <GMR/DEBUG> App measurement is monitoring the network status
2016-01-07 11:52:53.188 MyApp[1457:] <GMR/DEBUG> App measurement is ready to receive events
2016-01-07 11:52:53.201 MyApp[1457:] <GMR/DEBUG> No network. Upload task will not be scheduled
2016-01-07 11:52:53.202 MyApp[1457:] <GMR/DEBUG> Scheduling user engagement timer
2016-01-07 11:52:53.202 MyApp[1457:] <GMR/DEBUG> Timer scheduled to fire in approx. (s): 3600
2016-01-07 11:52:53.203 MyApp[1457:] <GMR/INFO> App measurement enabled
2016-01-07 11:52:53.237 MyApp[1457:] <GMR/DEBUG> Scheduling user engagement timer
2016-01-07 11:52:53.242 MyApp[1457:] <GMR/DEBUG> Canceling active timer
2016-01-07 11:52:53.245 MyApp[1457:] <GMR/DEBUG> Timer scheduled to fire in approx. (s): 3600
2016-01-07 11:52:53.270 MyApp[1457:] <GMR/DEBUG> Network status has changed. code, status: 3, Connected
2016-01-07 11:52:53.272 MyApp[1457:] <GMR/DEBUG> Timer scheduled to fire in approx. (s): 1614.930058836937
2016-01-07 11:52:53.272 MyApp[1457:] <GMR/DEBUG> Upload task scheduled to be executed in approx. (s): 1614.930058836937

很久以来一直困扰着我..。

谢谢!

编辑:我尝试了-noGMRDebugEnabled标志,重新安装应用程序没有-GMRDebugEnabled,重置内容和设置,重新启动Xcode .什么也不起作用-(

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2016-07-03 07:53:51

最后,我在Google文档中找到了它。

在GoogleServiceInfo.plist文件中,您必须添加一个名为IS_MEASUREMENT_ENABLED的键,将其设置为布尔值,然后选择NO值。这将禁用App测量功能,并在控制台中显示:

代码语言:javascript
复制
2016-07-03 10:51:38.522 MyApp[313:] <GMR/INFO> App measurement disabled

谢谢你的回答!

票数 3
EN

Stack Overflow用户

发布于 2016-05-10 14:28:52

在Swift中,禁用了我在UIApplicationDelegate发布中添加的谷歌度量:

代码语言:javascript
复制
GMRConfiguration.sharedInstance().setIsEnabled(false)
票数 3
EN

Stack Overflow用户

发布于 2016-02-10 23:32:47

要删除调试模式,可以使用以下调用删除UserDefault条目(只需运行一次):

[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"/google/measurement/debug_mode"];

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/34652141

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档