简体   繁体   中英

Disable logging from AdMob in Xcode

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM