ab1428x
ab1428x

Reputation: 804

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:

enter image description here

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?

Upvotes: 2

Views: 1025

Answers (1)

Jared
Jared

Reputation: 953

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.

Upvotes: 1

Related Questions