شناسه برای پشتیبانی از تبلیغ کنندگان (IDFA).
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
پلتفرم را انتخاب کنید: iOS Flutter پلت فرم پیامرسانی کاربر (UMP) SDK به شما امکان میدهد یک پیام IDFA را قبل از درخواست رضایت آنها برای شفافیت ردیابی برنامه (ATT) به کاربران خود ارائه دهید. پیام IDFA به کاربران شما نشان می دهد که چگونه برنامه شما از شناسه استفاده می کند.
این راهنما استفاده از UMP SDK برای ارائه پیام IDFA را پوشش می دهد.
پیش نیازها
قبل از شروع، مطمئن شوید که موارد زیر را انجام داده اید:
به روز رسانی Info.plist
برای نمایش یک پیام هشدار سفارشی، موارد زیر را انجام دهید:
- فایل
Info.plist
را باز کنید. - کلید
NSUserTrackingUsageDescription
را با یک پیام سفارشی که استفاده را توضیح می دهد اضافه کنید:
<key>NSUserTrackingUsageDescription</key>
<string>This identifier will be used to deliver personalized ads to you.</string>
وقتی فرم رضایت را ارائه می کنید، شرح استفاده به عنوان بخشی از هشدار IDFA ATT ظاهر می شود:

سپس، چارچوب AppTrackingTransparency
را پیوند دهید:

سپس برنامه شما یک پیام IDFA را قبل از هشدار ATT نشان می دهد.
تست کردن
در حین آزمایش، به یاد داشته باشید که هشدار ATT تنها یک بار ظاهر می شود زیرا requestTrackingAuthorization
یک درخواست یک بار مصرف است. UMP SDK فقط در صورتی فرمی برای بارگیری دارد که وضعیت مجوز ATTrackingManagerAuthorizationStatusNotDetermined
باشد.
برای نمایش هشدار برای بار دوم، باید برنامه خود را حذف نصب کرده و مجدداً در دستگاه آزمایشی خود نصب کنید.
درخواست تبلیغات با یا بدون IDFA
اگر کاربری ATT را رد کرد، به درخواست تبلیغات با استفاده از APIهای قالب تبلیغاتی خود ادامه دهید. Google Mobile Ads SDK IDFA را در درخواست آگهی ارسال نمیکند. برای جزئیات بیشتر، یک قالب تبلیغ را انتخاب کنید .
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-09-02 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-09-02 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eThis guide provides steps to integrate the IDFA message within the User Messaging Platform (UMP) SDK for iOS apps.\u003c/p\u003e\n"],["\u003cp\u003eBefore proceeding, complete the UMP SDK setup and create an IDFA message in AdMob.\u003c/p\u003e\n"],["\u003cp\u003eUpdate your app's \u003ccode\u003eInfo.plist\u003c/code\u003e with \u003ccode\u003eNSUserTrackingUsageDescription\u003c/code\u003e to present a custom message within Apple's App Tracking Transparency dialog.\u003c/p\u003e\n"],["\u003cp\u003eRemember to link the \u003ccode\u003eAppTrackingTransparency\u003c/code\u003e framework to display the IDFA explainer message before the ATT dialog.\u003c/p\u003e\n"],["\u003cp\u003eFor testing, reinstall the app to reset the IDFA authorization status and see the dialog again.\u003c/p\u003e\n"]]],["To support the IDFA message with the UMP SDK, complete the \"Get started\" guide and create an IDFA message. Update the `Info.plist` by adding the `NSUserTrackingUsageDescription` key with a custom message. Link the `AppTrackingTransparency` framework. During testing, note that the IDFA ATT dialog only appears once unless the app is reinstalled, due to `requestTrackingAuthorization` being a one-time request and the status needs to be `ATTrackingManagerAuthorizationStatusNotDetermined`.\n"],null,["Select platform: [iOS](/admob/ios/privacy/idfa \"View this page for the iOS platform docs.\") [Flutter](/admob/flutter/privacy/idfa \"View this page for the Flutter platform docs.\")\n\n\u003cbr /\u003e\n\nThe User Messaging Platform (UMP) SDK lets you present an\n\n[IDFA message](//support.google.com/admob/answer/10115027)\n\nto your users before requesting their consent for\n[App Tracking Transparency](//developer.apple.com/documentation/apptrackingtransparency)\n(ATT). The IDFA message shows your users how your app uses the identifier.\n\nThis guide covers using the UMP SDK to present an IDFA message.\n| **Note:** If you enable both GDPR and IDFA messages, refer to [Which message your users will\n| see](//support.google.com/admob/answer/10114020#which-message-your-users-will-see) for the possible outcomes.\n\nPrerequisites\n\nBefore you begin, make sure you've done the following:\n\n- Complete the [Get started guide](/admob/ios/privacy).\n- [Create an IDFA message](//support.google.com/admob/answer/10115331) in the AdMob UI.\n\nUpdate Info.plist\n\nTo show a custom alert message, do the following:\n\n1. Open the `Info.plist` file.\n2. Add the `NSUserTrackingUsageDescription` key with a custom message that describes the usage:\n\n \u003ckey\u003eNSUserTrackingUsageDescription\u003c/key\u003e\n \u003cstring\u003eThis identifier will be used to deliver personalized ads to you.\u003c/string\u003e\n\nThe usage description appears as part of the IDFA ATT alert when you present the\nconsent form:\n\nThen, link the `AppTrackingTransparency` framework:\n\nYour app then shows an IDFA message before the ATT alert.\n\nTesting\n\nWhile testing, remember that the ATT alert only appears a single time since\n[`requestTrackingAuthorization`](//developer.apple.com/documentation/apptrackingtransparency/attrackingmanager/3547037-requesttrackingauthorization)\nis a one-time request. The UMP SDK only has a form available to load if the\nauthorization status is\n[`ATTrackingManagerAuthorizationStatusNotDetermined`](//developer.apple.com/documentation/apptrackingtransparency/attrackingmanagerauthorizationstatus/attrackingmanagerauthorizationstatusnotdetermined?language=objc).\n\nTo make the alert appear a second time, you must uninstall and reinstall your\napp on your test device.\n\nRequest ads with or without IDFA\n\nIf a user denies ATT, continue to request ads using your ad format's APIs. The\nGoogle Mobile Ads SDK doesn't send IDFA in the ad request. For more details see,\n[Select an ad format](/admob/ios/quick-start#select_an_ad_format)."]]