apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.15k stars 988 forks source link

Want to remove UIWebView from my Cordova Project in monaca for the latest issue from the Apple which was it cannot be accepted after April 2020. #804

Closed anishadh3892 closed 4 years ago

anishadh3892 commented 4 years ago

Bug Report

We identified one or more issues with a recent delivery for your app, "XXXXX" 1.0 (1.0). Your delivery was successful, but you may wish to correct the following issues in your next delivery: ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of apps that use UIWebView APIs starting from April 2020 . See https://developer.apple.com/documentation/uikit/uiwebview for more information. After you've corrected the issues, you can upload a new binary to App Store Connect.

Problem

Even Im not using the InApp Browser in my app I get this message from apple when I try to release my app.

What is expected to happen?

It wanna be uploaded(released without error message)

What does actually happen?

I try to release my app and the above Error Occurred.

Information

Even I'm not using in app browser why i wanna change UIWebView to WKWebView. No need of it. So I need a solution for the people who don't use InAppBrowser plugin cordova

Command or Code

Environment, Platform, Device

Version information

Cordova9 in Monaca

Checklist

erisu commented 4 years ago

With the versions that are currently released, make sure that you are:

E.g.

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

If you are still getting the warning, most likely one of the plugins you are using still references UIWebView which the plugin developers will need to fix.

anishadh3892 commented 4 years ago

Thank you so much for your reply. It helped me a lot.

anishadh3892 commented 4 years ago

With the versions that are currently released, make sure that you are:

  • using cordova-ios@5.1.1
  • add plugin cordova-plugin-wkwebview-engine, preferably the latest version 1.2.1
  • add the following preference flag WKWebViewOnly to the config.xml iOS platform element.

E.g.

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

If you are still getting the warning, most likely one of the plugins you are using still references UIWebView which the plugin developers will need to fix.

Sorry to interrupt you so many times. If i do that my login screen disappeared. any suggestions?

breautek commented 4 years ago

If i do that my login screen disappeared.

There is likely an error that is happening. We'll need to see it to provide more insight. First I'd start with the javascript console for javascript errors, which you can find by using the Safari Remote Inspector.

If nothing shows up there, then I'd use xcode to debug your app as the problem might be on the native side.

erisu commented 4 years ago

I also forgot to mention that you need to add to config.xml the WKWebView plugin configurations. Example below shows what is needed in the ios platform element:

<platform name="ios">
    <feature name="CDVWKWebViewEngine">
        <param name="ios-package" value="CDVWKWebViewEngine" />
    </feature>

    <preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
</platform>

Also, Monaca just released the ability to set the WKWebView easily within the app setting screen. It would add the plugin and set the configurations for you.

If you still see the white screen even with the WKWebView plugin configurations added, I would also recommend following what @breautek suggested above.

anishadh3892 commented 4 years ago

Thank you So much for your reply. Your Method worked and helped me a lot.

khayargoli commented 4 years ago

With the versions that are currently released, make sure that you are:

  • using cordova-ios@5.1.1
  • add plugin cordova-plugin-wkwebview-engine, preferably the latest version 1.2.1
  • add the following preference flag WKWebViewOnly to the config.xml iOS platform element.

E.g.

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

If you are still getting the warning, most likely one of the plugins you are using still references UIWebView which the plugin developers will need to fix.

Sorry to interrupt you so many times. If i do that my login screen disappeared. any suggestions?

Hey there! How did you fix the login screen disappearing issue after installing the plugin.. I also put the configuration on config.xml file but still get white screen after app startup.. And I cannot find any error logs on xcode or safari logs.

jagovea commented 4 years ago

Hello, I still have a lot of problems. I have my XML as follows

`TEST

TEST TEST

`

I would appreciate your help. Thank you