Disable logging from AdMob in Xcode

馋奶兔 提交于 2021-02-20 00:17:01

问题


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.

Here is what I have:

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

Here are the pod files:

I've tried adding

FIREBASE_ANALYTICS_COLLECTION_DEACTIVATED=YES
IS_MEASUREMENT_ENABLED=NO
FIREBASE_ANALYTICS_COLLECTION_ENABLED=NO

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

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.

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


回答1:


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

Add:

Name: OS_ACTIVITY_MODE Value: disable

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.



来源:https://stackoverflow.com/questions/62413824/disable-logging-from-admob-in-xcode

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!