停用Xcode中AdMob的日志记录 [英] Disable logging from AdMob in Xcode

查看:47
本文介绍了停用Xcode中AdMob的日志记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我安装Google-Mobile-Ads-SDK cocoapod时,我得到了大量的日志记录.有些似乎是完全无关的,但是某种程度上是因为完全删除Google-Mobile-Ads-SDK pod会消除所有日志记录.

I am getting a huge amount of of logging when I install the Google-Mobile-Ads-SDK cocoapod. Some seem to be completely unrelated but somehow are because completely removing the Google-Mobile-Ads-SDK pod gets rid of all the logging.

这就是我所拥有的:

Podfile

 target 'myapp' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!
pod 'Google-Mobile-Ads-SDK'
end

以下是Pod文件:

我尝试添加

FIREBASE_ANALYTICS_COLLECTION_DEACTIVATED=YES
IS_MEASUREMENT_ENABLED=NO
FIREBASE_ANALYTICS_COLLECTION_ENABLED=NO

同时访问我项目的Info.plist文件甚至GoogleUtilities.plist,都无济于事.

to both my project's Info.plist file and even GoogleUtilities.plist and nothing helps.

更糟糕的是,我已经从项目文件中完全注释了用于启动AdMob的代码,并且它似乎仍在大量显示.

What makes it worse is that I have completely commented the code which deals with initiating AdMob in anyway from my project files and it still seems to be showing in abundance.

在最新的xcode和Google-Mobile-Ads-SDK版本中禁用此功能是否成功?

Anyone have success with disabling this in the latest xcode and Google-Mobile-Ads-SDK versions?

推荐答案

在Xcode中,转到产品>方案>编辑方案...在运行>下引数>环境变量

In Xcode, go to Product > Scheme > Edit Scheme... Under Run > Arguments > Environment Variables

添加:

名称:OS_ACTIVITY_MODE值:禁用

Name: OS_ACTIVITY_MODE Value: disable

这将关闭许多其他Xcode警告,因此,如果您想知道将来为什么某些功能不起作用,可以将其禁用,并查看是否有任何相关的控制台消息.

This will turn off a lot of other Xcode warning, so if you find yourself wondering why something isn't working in the future, you can disable this and see if there are any relevant console messages.

这篇关于停用Xcode中AdMob的日志记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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