前言
最近做flutter开发,前几次构建iOS正式包的时候上传IPA到App Store没有问题,这次突然上传不成功,收到邮件如下:
App Store Connect
Dear Developer,
We identified one or more issues with a recent delivery for your app, "xxx" x.x.0 (x). Please correct the following issues, then upload again.
ITMS-90338: Non-public API usage - The app references non-public selectors in Frameworks/webview_flutter_wkwebview.framework/webview_flutter_wkwebview: estimatedProgress, initWithFrame:configuration:, isMainFrame, setNavigationDelegate:, userContentController, websiteDataStore. 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
一看觉得是自己的用了苹果私有的方法,然后各种找,发现在.symlinks下面有这些方法。
二、解决方法:
1、删除.symlinks目录
2、执行以下命令
flutter clean
rm -rf ios/Flutter/Flutter.framework
rm -rf ios/.symlinks/plugins/webview_flutter_wkwebview
flutter build ios --release
重新打包上传即可解决!