202205182030Guideline 5.1.2 - Legal - Privacy - Data Use and Sharing 解決方法

20220513多了一條新規定,以下是這個問題與解決方法.

 

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 collecting data used to track them. Instead, your app displays a custom prompt that requests the user to allow tracking. 

 

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. Requesting permission with a custom prompt is not appropriate. 

 

Next Steps

 

If your app collects data in order to track users, you must take the following steps:

 

1. If you haven't already, update your app privacy information in App Store Connect to disclose that you track users. You must have the Account Holder or Admin role to update app privacy information.

2. Implement App Tracking Transparency.

3. Remove the custom prompts, and request permission using the AppTrackingTransparency framework before collecting data used to track the user. When you resubmit, indicate in the Review Notes where the permission request is located.

 

You may also choose to remove the tracking functionality from your app, as well as the custom prompts to allow tracking.

 

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 requirements for apps that track users.

- Learn more about designing appropriate permission requests.

 

Solution:

 

1.在info.plist加入Privacy - Tracking Usage Description,內容為
This app needs permission to track you across apps. This app will be used to collect your login and health information, but it does not support your information to 3rd parties. If you do not allow, you must reinstall app and then select allow to continue.

2.請加入以下這個函式,然後在login的頁面加入,建議加入在viewDidLoad,執行的時候就會出現隱私權的視窗

import AppTrackingTransparency

//import AdSupport

 

//NEWLY ADDED PERMISSIONS FOR iOS 14

func requestPermission() {

    if #available(iOS 14, *) {

        ATTrackingManager.requestTrackingAuthorization { status in

            switch status {

            case .authorized:

                // Tracking authorization dialog was shown

                // and we are authorized

                print("Authorized")

                

                // Now that we are authorized we can get the IDFA

                //print(ASIdentifierManager.shared().advertisingIdentifier)

            case .denied:

                // Tracking authorization dialog was

                // shown and permission is denied

 

                print("Denied")

                exit(0)//不允許直接離開App

            case .notDetermined:

                // Tracking authorization dialog has not been shown

                print("Not Determined")

            case .restricted:

                print("Restricted")

            @unknown default:

                print("Unknown")

            }

        }

    }

}

 

Reference

https://stackoverflow.com/questions/63587364/how-to-add-the-apptrackingtransparency-permission-to-your-ios-apps

How to add the AppTrackingTransparency permission to your iOS apps

回應
Blogger ADS
kiss radio
關鍵字
    沒有新回應!