App Tracking Transparency
Apple's App Tracking Transparency (ATT) framework, introduced with iOS 14.5, is a privacy feature designed to give users greater control over how their data is tracked and shared across apps and websites. It requires apps to obtain explicit user consent before accessing the device's Identifier for Advertisers (IDFA), a unique code used to track user activity for targeted advertising. Through a simple prompt, users can choose whether to allow or deny tracking on a per-app basis. This initiative aims to enhance transparency, safeguard user privacy, and limit the sharing of personal data without explicit permission, fundamentally shifting how advertisers and app developers collect and utilize user information.
To display the App Tracking Transparency authorization request for accessing the IDFA, update your Info.plist to add the NSUserTrackingUsageDescription key with a custom message describing your usage. Below is an example description text:
<key>NSUserTrackingUsageDescription</key>
<string>This identifier will be used to deliver personalized ads to you.</string>
<key>NSUserTrackingUsageDescription</key>
<string>Cet identifiant sera utilisé pour vous délivrer des publicités personnalisées.</string>
BlueStack-SDK include App Tracking Transparency (ATT) in order to display the App Tracking Transparency authorization request for accessing the IDFA.
Implement the OS-level ATT authorization request manually.
- Objective C
- Swift
#import <AppTrackingTransparency/AppTrackingTransparency.h>
#import <AdSupport/AdSupport.h>
...
- (void)requestIDFA {
[ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
// Tracking authorization completed. Start loading ads here.
// [self loadAd];
}];
}
import AppTrackingTransparency
import AdSupport
...
func requestIDFA() {
ATTrackingManager.requestTrackingAuthorization(completionHandler: { status in
// Tracking authorization completed. Start loading ads here.
// loadAd()
})
}
For more information about the possible status values, see ATTrackingManager.AuthorizationStatus.
Enable SKAdNetwork to track conversions
The BlueStack-SDK supports conversion tracking using Apple's SKAdNetwork, which means BlueStack is able to attribute an app install even when IDFA is unavailable.
To enable this functionality, you will need to update the SKAdNetworkItems key with an additional dictionary in your Info.plist.
<key>SKAdNetworkItems</key>
<array>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>pd25vrrwzn.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>cstr6suwn9.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>p78axxw29g.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>hs6bdukanm.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>4pfyvq9l8r.skadnetwork</string>
</dict>
</array>