Google AdMob new SDK setup for iOS : SKAdNetworkItems, NSUserTrackingUsageDescription, ATTrackingManager. Guideline 5.1.2 - Legal - Privacy - Data Use
Asked Answered
B

2

14

Google AdMob now shows below warning.

enter image description here

Prepare your apps for iOS 14 Apple announced the new AppTrackingTransparency framework, which requires changes to your iOS apps. Implement the GMA SDK 7.64.0 (or later) and set up consent messaging to help prevent a significant loss in ad revenue.

Some apps haven't been configured to use Apple's SKAdNetwork To ensure you're getting credit for all ads activity, like app installs, be sure to configure SKAdNetwork with Google's network IDs.

Some of your iOS apps require a GMA SDK update To keep ads serving normally and minimize a loss in ad revenue, implement the GMA SDK 7.64.0 (or later) for your iOS apps. And configure the SKAdNetwork in your apps with Google's network ID.

For this I did these changes

  1. Updated GoogleMobileAds SDK to 8.0

2.Updated app's Info.plist file with these 3 keys:

        1. GADApplicationIdentifier key with a string value of AdMob app ID.
        2. Added SKAdNetworkItems in plist as mentioned here https://developers.google.com/admob/ios/ios14
        3. NSUserTrackingUsageDescription key with value 'Game_Name would like to access IDFA for thirdparty advertising purpose'  

info.plist screenshot enter image description here

Also added App Tracking Transparancy Alert:

- (void)requestIDFA
{
    if (@available(iOS 14.0, *))
    {
        [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
            
            // Admob Ads
            [self loadAdmob_Ads];
            [self loadRewardedInterstitial];
            [self requestAppOpenAd];
        }];
    }
    else
    {
        // Admob Ads
        [self loadAdmob_Ads];
        [self loadRewardedInterstitial];
        [self requestAppOpenAd];
    }
}

Is there anything else I need to do in Xcode ?

See below image from Appstoreconnect, Am I need to set Yes Or No?(Yes, we use advertising data for tracking purpose?) we are not tracking user, not sure about Google AdMob. enter image description here

Data Used to Track You ( Identifiers), Data Linked to You ( Identifiers ). Is it right settings for Google AdMob ? enter image description here

Recent AppStore Rejection Message:

Guideline 5.1.2 - Legal - Privacy - Data Use and Sharing

We noticed you do not use App Tracking Transparency to request the user's permission before tracking their activity across apps and websites. The app privacy information you provided in App Store Connect indicates you collect data in order to track the user, including Device ID and Advertising Data.

Starting with iOS 14.5, apps on the App Store need to receive the user’s permission through the AppTrackingTransparency framework before collecting data used to track them. This requirement protects the privacy of App Store users.

Updates: Game approved by Apple. Here is game with latest admob ads (GADInterstitialAd, GADAppOpenAd, GADRewardedInterstitialAd, GADRewardedAd): https://apps.apple.com/us/app/ocean-fishing-master-3d-games/id1550945081

Bannerol answered 12/2, 2021 at 18:25 Comment(0)
B
9

Updates: Game approved by Apple. Here is game with latest admob ads (GADInterstitialAd, GADRewardedInterstitialAd, GADRewardedAd, GADAppOpenAd):

https://apps.apple.com/us/app/ocean-fishing-master-3d-games/id1550945081

Added Google Admob SKAdNetworkIdentifier values in Info.plist

<key>SKAdNetworkItems</key>
  <array>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>cstr6suwn9.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>4fzdc2evr5.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>2fnua5tdw4.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>ydx93a7ass.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>5a6flpkh64.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>p78axxw29g.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>v72qych5uu.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>c6k4g5qg8m.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>s39g8k73mm.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>3qy4746246.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>3sh42y64q3.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>f38h382jlk.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>hs6bdukanm.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>prcb7njmu6.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>wzmmz9fp6w.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>yclnxrl5pm.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>4468km3ulz.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>t38b2kh725.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>7ug5zh24hu.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>9rd848q2bz.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>n6fk4nfna4.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>kbd757ywx3.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>9t245vhmpl.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>2u9pt9hc89.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>8s468mfl3y.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>av6w8kgt66.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>klf5c3l5u5.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>ppxm28t8ap.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>424m5254lk.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>uw77j35x4d.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>e5fvkxwrpn.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>zq492l623r.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>3qcr597p9d.skadnetwork</string>
    </dict>
  </array>

Added requestIDFA in didFinishLaunchingWithOptions. It opens App Tracking Transparency dialog box.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
    
    [[GADMobileAds sharedInstance] startWithCompletionHandler:nil];
    [self requestIDFA];
.
.
.
}

requestIDFA function:

- (void)requestIDFA
{
    if (@available(iOS 14.0, *))
    {
        [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {

            // Admob Ads
            [self requestAppOpenAd];
            [self loadAdmob_Ads];
            [self loadRewardedInterstitial];
        }];
    }
    else
    {
        // Admob Ads
        [self requestAppOpenAd];
        [self loadAdmob_Ads];
        [self loadRewardedInterstitial];
    }
}

Added AppTrackingTransparency.framework to Xcode.

In info.plist added NSUserTrackingUsageDescription

<key>NSUserTrackingUsageDescription</key>
<string>This identifier will be used to deliver personalized ads to you.</string>

Admob ads related functions:

- (void)requestAppOpenAd {
  self.appOpenAd = nil;
  [GADAppOpenAd loadWithAdUnitID:ADMOB_APP_OPEN_ID
                         request:[GADRequest request]
                     orientation:UIInterfaceOrientationPortrait
               completionHandler:^(GADAppOpenAd *_Nullable appOpenAd, NSError *_Nullable error) {
                 if (error) {
                   NSLog(@"Failed to load app open ad: %@", error);
                   return;
                 }
                 self.appOpenAd = appOpenAd;
                 self.appOpenAd.fullScreenContentDelegate = self;

               }];
}

- (void)tryToPresentAd
{
        if (self.appOpenAd) {
          UIViewController *rootController = self.window.rootViewController;
          [self.appOpenAd presentFromRootViewController:rootController];
        } else {
          // If you don't have an ad ready, request one.
          [self requestAppOpenAd];
        }
}

- (void)applicationDidBecomeActive:(UIApplication *)application {
 [self tryToPresentAd];
}

-(void)loadAdmob_Ads
{
    GADRequest *request = [GADRequest request];
            
    [GADInterstitialAd loadWithAdUnitID:ADMOB_FULL_SCREEM
                                    request:request
                          completionHandler:^(GADInterstitialAd *ad, NSError *error)
    {
      if (error)
      {
                NSLog(@"\nAdmob Failed to load interstitial ad with error: %@", [error localizedDescription]);
          return;
      }
      self.interstitial = ad;
      self.interstitial.fullScreenContentDelegate = self;
    }];
}

-(void)showAdmobAdsFullScreen
{
        if (self.interstitial) {
            [self.interstitial presentFromRootViewController:self.viewController];
          }
}

-(void)loadRewardedInterstitial
{
    [GADRewardedInterstitialAd
           loadWithAdUnitID:ADMOB_REWARDED_INTERSTITIAL
                    request:[GADRequest request]
          completionHandler:^(
              GADRewardedInterstitialAd *_Nullable rewardedInterstitialAd,
              NSError *_Nullable error) {
            if (!error) {
              self.rewardedInterstitialAd = rewardedInterstitialAd;
              self.rewardedInterstitialAd.fullScreenContentDelegate = self;
            }
          }];
}

-(void)playRewardedInterstitial
{
          [self.rewardedInterstitialAd presentFromRootViewController:self.viewController
                                userDidEarnRewardHandler:^{
                                    
                                    [self rewardInterstitialDoneRewardUser];
      
                                    [self loadRewardedInterstitial];
                                }];
}

Google Official Documentation:

SKAdNetworkItems iOS 14 Updates : https://developers.google.com/admob/ios/ios14

GADInterstitialAd : https://developers.google.com/admob/ios/interstitial

GADRewardedInterstitialAd : https://developers.google.com/admob/ios/rewarded-interstitial

GADRewardedAd : https://developers.google.com/admob/ios/rewarded-ads

GADAppOpenAd : https://developers.google.com/admob/ios/app-open-ads

Adaptive Banner ( GADBannerView ) : https://developers.google.com/admob/ios/banner/adaptive

NSAppTransportSecurity : https://developers.google.com/admob/ios/app-transport-security

Bannerol answered 22/2, 2021 at 16:17 Comment(12)
Congrats on getting approved! So Google Admob requires IDFA tracking and we need to get user consent with a popup?Saraann
That awkward.. I have just submitted a new binary to the App store without SKAdNetworkItems. It is approved too. I think this popup is to help ad targeters collect some data to show relevant ads, not necessarily to stop ads. But, when they say it is compulsory, how we can skip it?Saraann
since you implemented that; did your notification disappear in the Admob dashboard? And what happens to the app user if he/she rejects this popup? maybe you tested scenariosSaraann
now we are not processing user reject or approved inside requestTrackingAuthorizationWithCompletionHandler, forcefully loading ads even if user never approve alert. In future apple may question this...Now recently King gaming company released Crash Bandicoot, in this I don't see this alert popup..so I wish to remove this alert for now...in future apple may force.Bannerol
@UmitKaya SKAdNetworkItems is must for iOS 14 to show ads...easy to add in plist. developers.google.com/admob/ios/ios14Bannerol
@UmitKaya admob still shows notification in dashboard, because I didn't implement it in many of old games.Bannerol
Nice to know this! I will implement it when I'm submitting but disable it for now until some new noises rise... Thanks @BannerolSaraann
I have enabled SKAdNetwork and implemented requestIDFA() method as google suggested Now my app is pushed to the app store without any problem. But my app is not receiving ads when the user disagrees to allow tracking.. Anyway I'm loading ad in both scenariosForkey
@mirhpedanielle when user disable tracking, then in next time launch ask user to track in device settings by opening app settings. Check this game, press 'Ask app not to track, play game and eat at least 5 fish then tab out...next time when you tab in it opens settings. apps.apple.com/us/app/ocean-fishing-master-3d-games/…Bannerol
@Bannerol Thanks for the reponse ...My question is will ads stop showing ? When the user press 'Ask app not to track'.Forkey
@mirhpedanielle ads comes but not personalised relevant. Not 100% sure....best of my knowledge when tracking enabled then admob shows personalised location based ads.Bannerol
@Guru, I added all the SKAdNetworkItems given, but I'm using only Admob. Should I remove other except cstr6suwn9.skadnetwork? I have done all these steps, still have the warning.Octane
T
1

Update SKAdNetworkIdentifier via new google suggestions:

<key>SKAdNetworkItems</key>
    <array>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>cstr6suwn9.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>4fzdc2evr5.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>4pfyvq9l8r.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>2fnua5tdw4.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>ydx93a7ass.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>5a6flpkh64.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>p78axxw29g.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>v72qych5uu.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>ludvb6z3bs.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>cp8zw746q7.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>c6k4g5qg8m.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>s39g8k73mm.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>3qy4746246.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>3sh42y64q3.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>f38h382jlk.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>hs6bdukanm.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>prcb7njmu6.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>v4nxqhlyqp.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>wzmmz9fp6w.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>yclnxrl5pm.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>t38b2kh725.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>7ug5zh24hu.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>9rd848q2bz.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>y5ghdn5j9k.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>n6fk4nfna4.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>v9wttpbfk9.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>n38lu8286q.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>47vhws6wlr.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>kbd757ywx3.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>9t245vhmpl.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>a2p9lx4jpn.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>22mmun2rn5.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>4468km3ulz.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>2u9pt9hc89.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>8s468mfl3y.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>av6w8kgt66.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>klf5c3l5u5.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>ppxm28t8ap.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>424m5254lk.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>ecpz2srf59.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>uw77j35x4d.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>mlmmfzh3r3.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>578prtvx9j.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>4dzt52r2t5.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>gta9lk7p23.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>e5fvkxwrpn.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>8c4e2ghe7u.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>q492l623r.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>3rd42ekr43.skadnetwork</string>
        </dict>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>3qcr597p9d.skadnetwork</string>
        </dict>
    </array>
Tracheo answered 28/12, 2022 at 8:0 Comment(1)
For the latest list... developers.google.com/admob/ios/privacy/strategiesCarpophore

© 2022 - 2024 — McMap. All rights reserved.