UIWebView error submiting ionic app to Apple

妖精的绣舞 提交于 2021-01-20 08:55:38

问题


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


回答1:


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.




回答2:


  1. You might be using old ionic version. The version you have pasted in your question is version of Ionic CLI. run "ionic info" in you project folder to see what Ionic framework version you are using.

  2. if you are using ionic framework 3+ version. then install ionic webview plugin by:

    ionic cordova plugin add cordova-plugin-ionic-webview --save



来源:https://stackoverflow.com/questions/62593905/uiwebview-error-submiting-ionic-app-to-apple

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!