AppStore审核问题记录

2021/04/29

Guideline 5.1.2 - Legal - Privacy - Data Use and Sharing

We noticed you do not use App Tracking Transparency to request the user's permission before tracking their activity across apps and websites. The app privacy information you provided in App Store Connect indicates you collect data in order to track the user, including Device ID.

Starting with iOS 14.5, apps on the App Store need to receive the user’s permission through the AppTrackingTransparency framework before collecting data used to track them. This requirement protects the privacy of App Store users.

Next Steps

Here are two ways to resolve this issue:

  • You can remove the tracking functionality from your app and update your app privacy information in App Store Connect.
  • If you decide to continue tracking users, you must implement App Tracking Transparency and request permission before collecting data used to track the user or device.

iOS14开始获取IDFA必须使用AppTrackingTransparency框架来请求用户允许其跟踪或访问其设备的广告标识符的权限。

解决方法:
1、在info.plist添加如下代码

NSUserTrackingUsageDescription
请允许“***”获取并使用您的活动跟踪,以便于向您进行个性化推送服务,从而减少无关服务对您造成的打扰

2、获取IDFA代码

import AdSupport
import AppTrackingTransparency

class func getIDFAString() -> String {
    var idfa: String = ""
    let manager = ASIdentifierManager()
    if #available(iOS 14.0, *) {
        ATTrackingManager.requestTrackingAuthorization { (status) in
            if status == .authorized {
                idfa = manager.advertisingIdentifier.uuidString
            }
        }
    } else {
        if manager.isAdvertisingTrackingEnabled {
            idfa = manager.advertisingIdentifier.uuidString
        }
    }
    return idfa
}

你可能感兴趣的:(AppStore审核问题记录)