其他分享
首页 > 其他分享> > iOS Xcode提交IPA时收到苹果邮件ITMS-90338: Non-public API usage

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 information, visit the Technical Support Information 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.

标签:navBarBackgroundImage,90338,IPA,setBackgroundImage,navigationController,your,pub
来源: https://blog.csdn.net/smileKH/article/details/119330510