美文网首页
iOS 15.0.1 ATT 被拒解决方法

iOS 15.0.1 ATT 被拒解决方法

作者: 東玖零 | 来源:发表于2021-10-12 13:44 被阅读0次

    被拒原因:
    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 when reviewed on iOS 15.0.1.

    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.

    If you've implemented App Tracking Transparency but the permission request is not appearing on devices running the latest OS, please review the available documentation and confirm App Tracking Transparency has been correctly implemented.

    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.

    在此之前我已经将ATT权限请求移到applicationDidBecomeActive方法中,10月1前还审核通过了一版本,这几天另一个App审核却一直不通过。

    猜测是和注册通知的弹框冲突了,将请求通知权限及注册通知也移到applicationDidBecomeActive方法中,请求通知权限及注册通知后再请求ATT权限,

    调整后的代码如下:

    // #import <AppTrackingTransparency/AppTrackingTransparency.h>
    
    - (void)applicationDidBecomeActive:(UIApplication *)application {
        // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
        [self registerPush];
    }
    - (void)registerPush {
        UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
        weak_self
        [center requestAuthorizationWithOptions:(UNAuthorizationOptionAlert | UNAuthorizationOptionBadge | UNAuthorizationOptionSound) completionHandler:^(BOOL granted, NSError * _Nullable error) {
            if (granted) {
                [center getNotificationSettingsWithCompletionHandler:^(UNNotificationSettings * _Nonnull settings) {
                    if (settings.authorizationStatus == UNAuthorizationStatusAuthorized) {
                        dispatch_async(dispatch_get_main_queue(), ^{
                            [[UIApplication sharedApplication] registerForRemoteNotifications];
                        });
                    }
                }];
            }
            [weakSelf checkTrackingAuthorization];
        }];
    }
    - (void)checkTrackingAuthorization {
        if (@available(iOS 14, *)) {
            weak_self
            [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
                if (status == ATTrackingManagerAuthorizationStatusAuthorized) {
                    [weakSelf initUmeng];
                }
            }];
        } else {
            [self initUmeng];
        };
    }
    

    借鉴于stackoverflow上的回答


    WX20211012-134226@2x.png

    模拟器上的iOS15.0上测试没什么问题,提交审核看结果吧。


    1951634101711_.pic.jpg
    次日审核通过!
    总结:在应用启动后各权限需要一个请求处理完成,再请求另一个,保证每个弹框正常显示。

    吐槽:安装应用第一次打开,通知、定位、麦克风、蓝牙等等一大堆的弹框连着出现,一个都还没看清就弹另一个,体验很差。

    相关文章

      网友评论

          本文标题:iOS 15.0.1 ATT 被拒解决方法

          本文链接:https://www.haomeiwen.com/subject/rvudoltx.html