Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
W tym przewodniku opisujemy zmiany, które należy wprowadzić w aplikacji, aby była zgodna z iOS 14.
Wymagania wstępne
Pakiet SDK PAL w wersji 2.2.2 lub nowszej.
Prośba o autoryzację zasad App Tracking Transparency
Aby wyświetlać w usłudze App Tracking Transparency żądanie autoryzacji dostępu do identyfikatora IDFA, dodaj do Info.plist klucz NSUserTrackingUsageDescription z niestandardową wiadomością opisującą sposób korzystania. Oto przykładowy tekst opisu:
<key>NSUserTrackingUsageDescription</key>
<string>This identifier will be used to deliver personalized ads to you.</string>
Opis użytkowania jest wyświetlany w oknie App Tracking Transparency:
Aby wyświetlić żądanie autoryzacji, wywołaj requestTrackingAuthorizationWithCompletionHandler:.
Zalecamy, by przed wczytaniem reklam zaczekać na zakończenie wywołania zwrotnego. Dzięki temu, jeśli użytkownik przyzna uprawnienia do korzystania z App Tracking Transparency, pakiet PAL SDK będzie mógł używać identyfikatora IDFA w żądaniach reklam.
Firma Apple wymaga, aby deweloperzy publikujący aplikacje w App Store ujawniali określone informacje dotyczące użycia danych w ich produktach. Firma Apple zapowiedziała, że od 8 grudnia 2020 r. będzie to wymagane w przypadku nowych i zaktualizowanych aplikacji.
[null,null,["Ostatnia aktualizacja: 2025-08-21 UTC."],[[["\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)."]]