[null,null,["最后更新时间 (UTC):2025-08-21。"],[[["\u003cp\u003eUpdate to PAL SDK 2.2.2 or higher to ensure compatibility with tvOS 14.\u003c/p\u003e\n"],["\u003cp\u003eAdd the \u003ccode\u003eNSUserTrackingUsageDescription\u003c/code\u003e key to your \u003ccode\u003eInfo.plist\u003c/code\u003e to request App Tracking Transparency authorization with a clear message explaining its purpose.\u003c/p\u003e\n"],["\u003cp\u003eCall \u003ccode\u003erequestTrackingAuthorizationWithCompletionHandler:\u003c/code\u003e before loading ads, ideally after providing an explainer to users for better transparency and user experience.\u003c/p\u003e\n"],["\u003cp\u003eDisclose your app's data usage information on the App Store as per Apple's requirements for new apps and app updates.\u003c/p\u003e\n"]]],["To prepare apps for tvOS 14, developers must use PAL SDK 2.2.2 or higher and request App Tracking Transparency authorization to access the IDFA. This involves adding the `NSUserTrackingUsageDescription` key to the `Info.plist` with a custom message and calling `requestTrackingAuthorizationWithCompletionHandler:`. It is recommended to load ads after the completion callback. Additionally, apps must disclose their data usage on the App Store for new apps and updates starting December 8, 2020.\n"],null,["# Prepare for tvOS 14+\n\nThis guide outlines the changes needed to prepare your app for tvOS\n14.\n\nPrerequisites\n-------------\n\n- PAL SDK 2.2.2 or higher.\n\nRequest App Tracking Transparency authorization\n-----------------------------------------------\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/tvos/data-disclosure)."]]