[null,null,["最后更新时间 (UTC):2025-08-21。"],[[["\u003cp\u003eThis guide details the necessary changes to ensure your app is compatible with iOS 14 regulations.\u003c/p\u003e\n"],["\u003cp\u003eApps need to request user permission for tracking using the App Tracking Transparency (ATT) framework and provide a clear explanation for its usage within the app and on the App Store.\u003c/p\u003e\n"],["\u003cp\u003eYou can use the User Messaging Platform (UMP) SDK or manually implement the ATT authorization request using \u003ccode\u003erequestTrackingAuthorizationWithCompletionHandler:\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers must disclose their app's data usage practices for the App Store as per Apple's requirements.\u003c/p\u003e\n"]]],["To prepare for iOS 14, use PAL SDK 2.2.2 or higher. Implement App Tracking Transparency (ATT) by adding the `NSUserTrackingUsageDescription` key to your `Info.plist` with a custom message. Use `requestTrackingAuthorizationWithCompletionHandler:` to request authorization, ideally after a user-friendly explainer. If using the User Messaging Platform (UMP) SDK, know that it affects all users. Finally, disclose required data usage in the App Store, as mandated by Apple.\n"],null,["# Prepare for iOS 14+\n\nThis guide outlines the changes needed to prepare your app for iOS\n14.\n\nPrerequisites\n-------------\n\n- PAL SDK 2.2.2 or higher.\n\nRequest App Tracking Transparency authorization\n-----------------------------------------------\n\n| **Key Point:** If you decide to include App Tracking Transparency (ATT) in your app, you can use the [User Messaging Platform (UMP)\n| SDK](/ad-manager/pal/ios/privacy) to trigger an IDFA explainer that gives users some context of why you're asking for this permission. Be aware that the usage of the UMP SDK affects all users of your app.\n|\n|\n| If you're *not* using the UMP SDK, the rest of this page shows you how to\n| implement the OS-level ATT authorization request manually.\n\nTo display the App Tracking Transparency authorization request for accessing the\nIDFA, update your `Info.plist` to add the `NSUserTrackingUsageDescription` key\nwith a custom message describing your usage. Here is an example description\ntext: \n\n```text\n\u003ckey\u003eNSUserTrackingUsageDescription\u003c/key\u003e\n\u003cstring\u003eThis identifier will be used to deliver personalized ads to you.\u003c/string\u003e\n```\n\nThe usage description appears in the App Tracking Transparency dialog box:\n\nTo present the authorization request, call\n[`requestTrackingAuthorizationWithCompletionHandler:`](//developer.apple.com/documentation/apptrackingtransparency/attrackingmanager/3547037-requesttrackingauthorization).\nWe recommend waiting for the completion callback prior to loading ads so that if\nthe user grants the App Tracking Transparency permission, the PAL SDK can use\nthe IDFA in ad requests. \n\n### Swift\n\n```swift\nimport AppTrackingTransparency\nimport AdSupport\n...\nfunc requestIDFA() {\n ATTrackingManager.requestTrackingAuthorization(completionHandler: { status in\n // Tracking authorization completed. Start loading ads here.\n // loadAd()\n })\n}\n```\n\n### Objective-C\n\n```objective-c\n#import \u003cAppTrackingTransparency/AppTrackingTransparency.h\u003e\n#import \u003cAdSupport/AdSupport.h\u003e\n...\n- (void)requestIDFA {\n [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {\n // Tracking authorization completed. Start loading ads here.\n // [self loadAd];\n }];\n}\n```\n\nFor more information about the possible status values, see\n[`ATTrackingManager.AuthorizationStatus`](//developer.apple.com/documentation/apptrackingtransparency/attrackingmanager/authorizationstatus).\n| **Key Point:** For a better user experience, we recommend adding an explainer preceding the call to `requestTrackingAuthorizationWithCompletionHandler:` to clarify the permission and data usage to users.\n\nDisclose data usage in the App Store\n------------------------------------\n\nApple requires that developers publishing apps on the App Store disclose\n[certain information](//developer.apple.com/app-store/app-privacy-details/)\nregarding their apps' data use. Apple has\n[announced](//developer.apple.com/news/?id=vlj9jty9) that these disclosures will\nbe required for new apps and app updates starting December 8, 2020.\n\n[Learn more about the data disclosure\nrequirements](/ad-manager/pal/ios/data-disclosure)."]]