Features of integration with iOS 14+


Requirements

myTarget SDK 5.9.0 or higher

Enabling SKAdNetwork for conversion tracking

The myTarget SDK supports conversion tracking using Apple's SKAdNetwork framework, which means that myTarget can count app installations even when IDFA is not available.

In order to enable this functionality, you need to add SKAdNetworkItems IDs to the Info.plist file.

<key>SKAdNetworkItems</key>
<array>
  <dict>
    <key>SKAdNetworkIdentifier</key>
    <string>n9x2a789qt.skadnetwork</string>
  </dict>
  <dict>
    <key>SKAdNetworkIdentifier</key>
  <string>r26jy69rpl.skadnetwork</string>
 </dict>
</array>

If you use mediation with other advertising networks, you must also add their IDs:

App Tracking Transparency authorization request

To request App Tracking Transparency authorization to access IDFA, update the Info.plist file and add the NSUserTrackingUsageDescription key with a message about how the ID will be used:

<key>NSUserTrackingUsageDescription</key>
<string>This identifier will be used to select personalized ads.</string>
The requestTrackingAuthorizationWithCompletionHandler method should be called to show the request:

It is recommended to start loading ads after calling the callback, that way if the user's permission has been obtained, myTarget SDK will be able to use IDFA in the ad request.

#import <AdSupport/AdSupport.h>
#import <AppTrackingTransparency/AppTrackingTransparency.h>
 
- (void)requestTrackingAuthorization
{
  [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status)
  {
    // The request is complete, you can start downloading ads
    // [self loadAd];
  }];
}
Was this article helpful?