苹果审核已经于4月,正式废弃UIWebView,导致传包至Appstore,如果没有修改会收到相应的邮件
ITMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability. Learn more (https://developer.apple.com/documentation/uikit/uiwebview).
推荐使用命令+本地项目目录
grep -r UIWebView
检测出AFNetworking中的UIkit控件含有UIWebView,如果不用pods 可以删除相应的类,建议升级AFNetworking 4.0
pod ‘AFNetworking’, '~> 4.0.0'
4.0中已经替换WKwebview
在AFNetworking中 相对应请求加入了header 参数,如果不需要传nil即可
- (nullable NSURLSessionDataTask *)GET:(NSString *)URLString
parameters:(nullable id)parameters
headers:(nullable NSDictionary <NSString *, NSString *> *)headers
progress:(nullable void (^)(NSProgress *downloadProgress))downloadProgress
success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;