如果使用了 App Tracking Transparency
蘋果要求在 iOS 14.5 及以上的版本中
必須 在彈框 取得用戶同意后, 才可以跟蹤用戶
否則會被拒, 拒絕原因如下:
Guideline 2.1 - Information Needed
We're looking forward to completing our review, but we need more information to continue. Your app uses the AppTrackingTransparency framework, but we are unable to locate the App Tracking Transparency permission request.
(意思就是你項目使用了追蹤框架 AppTrackingTransparency伟件、他們沒找到你的授權(quán)請求硼啤、就是他們沒有看到那個授權(quán)彈窗、其實你做了彈窗斧账、但是他們可能沒找到谴返、也許他們用的不是 iOS 14.5 之后設(shè)備測試的。咧织。嗓袱。給他們附件截圖、告訴他們就行了)
Since you indicated in App Store Connect that you collect data in order to track the user, we need to confirm that App Tracking Transparency has been correctly implemented.
Next Steps
Please explain where we can find the App Tracking Transparency permission request in your app. The request should appear before any data is collected that could be used to track the user.
If your app does not track users, please update your app privacy information in App Store Connect. You must have the Account Holder or Admin role to update app privacy information.
Resources
- Tracking is linking data collected from your app with third-party data for advertising purposes, or sharing the collected data with a data broker. Learn more about tracking.
- See Frequently Asked Questions about the new requirements for apps that track users.
- Review developer documentation for App Tracking Transparency.
Since your App Store Connect status is Metadata Rejected, we do NOT require a new binary. To revise the metadata, visit App Store Connect to select your app and revise the desired metadata values. Once you’ve completed all changes, reply to this message in Resolution Center and we will continue the review.
這里說了:他們不需要新的二進制文件习绢、在 Resolution Center 中回復(fù)消息他們繼續(xù)審查渠抹、說明不需要重新打包蝙昙、只需在 App Store Connec中 修改數(shù)據(jù)并回復(fù)他們的要求即可。
在 iOS 14.5 之后
必須在 plist 中添加 這個 Privacy - Tracking Usage Description 字段梧却、
我寫的值是:請放心奇颠,開啟權(quán)限不會獲取您在其他站點的隱私信息,該權(quán)限僅用于標(biāo)識設(shè)備并保障服務(wù)安全與提示瀏覽體驗放航。
1烈拒、添加 NSUserTrackingUsageDescription 聲明
打開 info.plist、右鍵選擇 Add Row广鳍、
Key 填寫 Privacy - Tracking Usage Description
Value 簡單描述收集用戶數(shù)據(jù)的理由荆几、
例如 我的 APP 廣告 SDK 用來精準(zhǔn)投放廣告、
則填寫 “該標(biāo)識符將用于向您投放個性化廣告”搜锰、
2伴郁、在合適的位置調(diào)用 requestTrackingAuthorization(completionHandler:) 方法、
彈框請求 在合適的位置(例如didFinishLaunchingWithOptions方法中)
我的 APP 是在初始化廣告 SDK 時調(diào)用:
然后在 AppDelegate 中開啟請求出現(xiàn)彈窗蛋叼。代碼如下:
#import <AppTrackingTransparency/ATTrackingManager.h>
// 在第一次啟動應(yīng)用程序的時候
if (@available(iOS 14, *)) {
[ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
} else {
};
// 就這么寫就 OK 了焊傅、至此 重現(xiàn)打開 App、就會有授權(quán)彈框狈涮。重現(xiàn)提交審核狐胎、順利通過
注意:設(shè)置了 Privacy - Tracking Usage Description 之后,
務(wù)必在 App Store Connect 中 App 隱私里面設(shè)置一個用于追蹤的項歌馍。
參考:
1握巢、 http://events.jianshu.io/p/ed2f337ad44b
2、 https://blog.csdn.net/dolacmeng/article/details/118143350