即使我没有使用任何 UIWebView,Apple 也不会接受我的应用程序

Apple won't accept my app even though I'm not using any UIWebView

我在将我的应用上传到 AppStore 时遇到问题。 Apple 说我使用的是已弃用的 API、UIWebView。但是我检查了我的整个项目并没有UIWebView。有没有人遇到过这个错误?谢谢。这是苹果的消息:

ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of apps that use UIWebView APIs . See https://developer.apple.com/documentation/uikit/uiwebview for more information.

更正问题后,您可以将新的二进制文件上传到 App Store Connect。

这是我的 pods:

pod 'Alamofire', '<= 4.8.0'
pod 'AlamofireObjectMapper', '<= 5.2.0'
pod 'SDWebImage', '<= 4.4.3'
pod 'ReachabilitySwift', '<= 4.3.0'
pod 'RealmSwift'
pod 'ValidationComponents', '~> 0.3.0'
pod 'Willow', '<= 5.1.0'
pod 'CountryPickerView', '<= 2.2.0'
pod 'PhoneNumberKit', '~> 2.6'
pod 'IQKeyboardManagerSwift'
pod 'SwiftKeychainWrapper', '<= 3.0.1'
pod 'Toast-Swift', '<= 4.0.1'
pod 'MBProgressHUD', '~> 1.1.0'
pod 'Mixpanel-swift', '~> 2.6.2'
pod 'ServiceSDK/Chat', '<= 218.0.0'
pod 'OneSignal', '>= 2.6.2', '<= 2.9.5'
pod 'DeviceKit'
pod 'SwiftLint', '<= 0.30.1'
pod 'AppCenter', '~> 2.0.1'

WKWebViewUIWebView 的替代品。如果您的代码中没有 UIWebView 用法,那么通过执行以下终端命令,您可以轻松了解哪个库仍在使用 UIWebView 引用(不要错过 .(点) ).

grep -r UIWebView /Path/To/Project/*

框架匹配的输出

./<ANY>.framework/Headers/ANY.h:#define ANYUseUIWebView ANY_NAME_PASTE(ANY_PREFIX_NAME, ANYUseUIWebView)

库匹配的输出

Binary file ./<FRAMEWORK-NAME>.framework/<LIB-FILE>.a matches

更新这些库

另请查看这篇文章https://medium.com/@zivchen_42755/for-me-that-wasnt-enough-it-didn-t-found-all-of-them-thats-weird-something-to-do-with-pod-i-a068d55b7fab