前语

App审阅忽然遇到了 Guideline 5.1.2 – Legal – Privacy – Data Use and Sharing,咋整呢? 不要慌,问题不大。 上被拒原文:

Hello,
Thank you for your efforts to follow our guidelines. There are still some issues that need your attention.
If you have any questions, we are here to help. Reply to this message in App Store Connect and let us know.
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.

啥意思呢?

苹果在被拒的内容中,提到了一点要害信息。

  • your app displays a custom prompt that requests the user to allow tracking

咱们的App为了做市场合规化,增加和安卓市场相同的合规化弹框。 这个弹框让苹果误会了咱们是对 AppTrackingTransparency 的授权。咱们这次更新中并没有用到追寻权限,可是在Appstore后台确实勾选了咱们将以追寻为意图。可是咱们又没有用到体系提供的弹框,如图所示:

审核被拒 Guideline 5.1.2 怎么办?附带解决攻略

咋整呢?

  • 方案1

假如你的产品压根不需求这种标识符的获取,那么直接删去相关第三方库即可。

  1. 移除 info.plist 中 IDFA 的声明

  2. 移除 MSDKSensitivity.framework

  3. 移除 AdSupport.framework

  4. 移除 AppTrackingTransparency.framework

特别说明:

假如你删去了上面4点,提交到Appstore后台,仍旧无法挑选 否,咱们不会将设备ID用于追寻意图。如图所示:

审核被拒 Guideline 5.1.2 怎么办?附带解决攻略

那么你需求检查第三方库,值得注意的是友盟计算的SDK需求设备标识符。

  • 方案2

规规矩矩依照苹果给的要求来,既然缺少,那么就进行弥补和完善。

1、添加 NSUserTrackingUsageDescription 声明

在 info.plist -> Add Row -> 创建key以及对应的描绘。

Key 填写 Privacy – Tracking Usage Description

Value 简单描绘搜集用户数据的理由

假如标识符用于广告展示,那么描绘有必要带有广告字样。例如: “App需求该标识符将用于向您投进个性化广告”

2.引证体系库

#import <AdSupport/AdSupport.h>
#import <AppTrackingTransparency/AppTrackingTransparency.h>
- (NSString*)idfa {
    __block NSString *idfa = @"";
    ASIdentifierManager *manager = [ASIdentifierManager sharedManager];
    if (@available(iOS 14, *)) {
        [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
            if (status == ATTrackingManagerAuthorizationStatusAuthorized) {
                idfa = [[manager advertisingIdentifier] UUIDString];
            }
        }];
    }else{
        if ([manager isAdvertisingTrackingEnabled]) {
            idfa = [[manager advertisingIdentifier] UUIDString];
        }
    }
    return idfa;
}

3.完成调用,在iOS15会无法弹出提示弹窗,需求在AppDelegate的 applicationDidBecomeActive 完成调用。防止由于弹框未呈现导致的拒审。

最后希望iOSer大吉大利,今晚过包!关注公众号:iOS研究院,了解更多过审技巧。