问题
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