前言
最近上传公司项目的IPA包,打包上传一切正常,但是上传后在开发者中心找不到上传的包,并且收到苹果反馈的邮件。
Dear Developer,
We identified one or more issues with a recent delivery for your app, "XXXX, Hot topics, Videos" 1.0.0 (1). 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使用了navigationBarBackgroundImage私有方法,知道问题那么就好解决了。
解决方法:
1、全局搜索navigationBarBackgroundImage
2、替换方法:
- (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];
// }
}];
}
即可解决,当然,上传ipa包不见了,可能还使用了UIWebView,请你仔细看苹果的邮件信息。
END.