UIWebView将离子应用程序提交给Apple时出错 [英] UIWebView error submiting ionic app to Apple

查看:58
本文介绍了UIWebView将离子应用程序提交给Apple时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开发了适用于Android和iOS的离子应用程序.当我尝试将应用程序提交到iOS时,我总是会收到相同的错误.

我在整个项目中进行了搜索,找不到对UIWebView的任何引用.

我已按照此

但是我仍然遇到相同的错误

解决方案

我最近已针对确切的问题修复了我的应用,以下是我为解决此问题所遵循的步骤:

  1. 确保您的 cordova-plugin-ionic-webview 已更新为最新版本 5.0.0 .您需要运行这两个命令来做到这一点.

  ionic cordova插件删除cordova-plugin-ionic-webviewionic cordova插件添加cordova-plugin-ionic-webview @ latest 

  1. 确保您的 cordova-ios 已更新为最新版本 6.0.0 .运行此命令以对其进行更新.

  npm install cordova-ios @ latest --save 

  1. 检查您的 package.json ,看看是否同时更新了 cordova-ios cordova-plugin-ionic-webview 的版本代码>.

  2. 确保将 WKWebViewOnly 首选项添加到 config.xml 文件.

 <平台名称="ios"< preference name =" WKWebViewOnly"值=真"/>...</platform> 

  1. 这是最重要的步骤.确保删除 ios 平台并再次添加.运行这些命令以删除和添加ios平台.

  ionic cordova平台rm ios离子cordova平台添加ios 

现在,当您构建ios应用并将其发布到应用商店时,您会看到问题已得到解决.

I have developed an ionic app that is for Android and iOS. When I try to submit the application to iOS I always receive the same error.

I searched in my entire project and I can't find any reference to UIWebView.

I have followed this link to update all my plugins.

I added this code to my config.xml:

<preference name="WKWebViewOnly" value="true" />
<feature name="CDVWKWebViewEngine">
    <param name="ios-package" value="CDVWKWebViewEngine" />
</feature>
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />

I updated my cordova and my ionic versions: cordova version - 9.0.0 (cordova-lib@9.0.1) ionic version - 6.10.1

I've tried several tutorials like the ones on these links and others:

https://ionicframework.com/blog/understanding-itms-90809-uiwebview-api-deprecation/ https://mobilefirstplatform.ibmcloud.com/blog/2020/01/27/Removal-of-UIWebview/

But whenever I submit the application to Apple, it gets rejected because of this error.

What can I do to remove UIWebView or get my application approved?

Thanks

Update:

Ionic:

Ionic CLI : 6.10.1 (/usr/local/lib/node_modules/@ionic/cli) Ionic Framework : @ionic/angular 4.10.2 @angular-devkit/build-angular : 0.13.9 @angular-devkit/schematics : 7.2.4 @angular/cli : 7.3.8 @ionic/angular-toolkit : 1.4.1

Capacitor:

Capacitor CLI : 1.5.2 @capacitor/core : 1.0.0-beta.19

Cordova:

Cordova CLI : 9.0.0 (cordova-lib@9.0.1) Cordova Platforms : ios 5.1.1 Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 16 other plugins)

Utility:

cordova-res : not installed native-run : 1.0.0

System:

ios-sim : 8.0.2 NodeJS : v12.18.1 (/usr/local/bin/node) npm : 6.14.5 OS : macOS Catalina Xcode : Xcode 11.5 Build version 11E608c

Updateing my question using @Harish answer

However I still get the same error

解决方案

I have fixed my app for the exact issue recently and Here are the steps I have followed to fix the issue:

  1. Ensure your cordova-plugin-ionic-webview is updated to the latest version 5.0.0. You need to run these two commands to do that.

ionic cordova plugin remove cordova-plugin-ionic-webview
ionic cordova plugin add cordova-plugin-ionic-webview@latest

  1. Ensure your cordova-ios is updated to the latest version 6.0.0. Run this command to update it.

npm install cordova-ios@latest --save

  1. Check your package.json to see if the versions are updated for both cordova-ios and cordova-plugin-ionic-webview.

  2. Ensure you add WKWebViewOnly preference to config.xml file.

<platform name="ios">
    <preference name="WKWebViewOnly" value="true" />
    ...
</platform>

  1. This is the most important step. Ensure you remove the ios platform and add it again. Run these commands to remove and add the ios platform.

ionic cordova platform rm ios
ionic cordova platform add ios

Now, when you build the ios app and publish it to the app store, you can see the issue will be fixed.

这篇关于UIWebView将离子应用程序提交给Apple时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆