我使用旧版本5+sdk离线打包提交App Store审核被拒,其中有一条被拒理由:
ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of apps that use UIWebView APIs starting from December 2020 . See https://developer.apple.com/documentation/uikit/uiwebview for more information.
然后替换了最新的5+sdk离线打包,使用Xcode/HBuilderX运行项目起来无法进行网络接口请求;
Xcode控制台日志:Class MPRequest is implemented in both /System/Library/Frameworks/MediaPlayer.framework/MediaPlayer (0x1c8129710) and /private/var/containers/Bundle/Application/168560B4-6C36-41A5-9C1C-6CA21C79780C/###.app/### (0x1028747d0). One of the two will be used. Which one is undefined.
根据官方在manifest.json文件增加了"plus": {"kernel": {"ios": "WKWebview"}还是发送网络请求错误;改成"plus": {"kernel": {"ios": "UIWebview"}就可以了;
现在如何把离线打包的工程内核使用WKWebview,能正确访问网络接口请求
3 个回复
可乐A
let that = this;
mui.plusReady(function() {
mui.ajax(url, {
data: {},
xhrFields: { withCredentials: true },
crossDomain: true,
dataType: "json", //服务器返回json格式数据
type: "post", //HTTP请求类型
timeout: 10000, //超时时间设置为10秒;
headers: "Content-type": "application/x-www-form-urlencoded",
success: function(data) {
},
error: function(xhr, type, errorThrown) {
}
});
});
DCloud_App_Array
WKWebview就是有跨域限制,建议转换成uni-app来解决。
ITMS-90809警告是因为应用中使用了UIWebview。
HBuilderX2.6.6+版本已经移除UIWebview相关代码,请更新HBuilderX重新提交云端打包。
参考:https://ask.dcloud.net.cn/article/36348
菜鸡一个
楼主 解决了吗