微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

iOS Xcode提交IPA时收到苹果邮件ITMS-90338: Non-public API usage

邮件如下:

Dear Developer,

We identified one or more issues with a recent delivery for your app, "xxx, Hot topics, Videos" xxx. Please correct the following issues, then upload again.

ITMS-90338: Non-public API usage - The app references non-public selectors in Frameworks/QMUIKit.framework/QMUIKit: navigationBarBackgroundImage. If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed. For further @R_904_4045@ion, visit the Technical Support @R_904_4045@ion at http://developer.apple.com/support/technical/

Best regards,

The App Store Team

说是QMUIKit用到了苹果的私有方法,之前打包的时候也没有遇到这个问题,看来可能是人品问题。

解决方法
找到QMUIConfiguration文件把以下代码修改再打包即可:

- (void)setNavBarBackgroundImage:(UIImage *)navBarBackgroundImage {
    _navBarBackgroundImage = navBarBackgroundImage;
    [UINavigationBar.qmui_appearanceConfigured setBackgroundImage:_navBarBackgroundImage forBarMetrics:UIBarMetricsDefault];
    [self.appearanceUpdatingNavigationControllers enumerateObjectsUsingBlock:^(UINavigationController * _Nonnull navigationController,NSUInteger idx, BOOL * _Nonnull stop) {
        [navigationController.navigationBar setBackgroundImage:_navBarBackgroundImage forBarMetrics:UIBarMetricsDefault];
//        if (![navigationController.topViewController respondsToSelector:@selector(navigationBarBackgroundImage)]) {
//            [navigationController.navigationBar setBackgroundImage:_navBarBackgroundImage forBarMetrics:UIBarMetricsDefault];
//        }
    }];
}

END.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐