apache / cordova-ios

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

Is it necessary to update cordova-cli version to use cordova-ios 5.1.1? #842

Closed kokitang closed 4 years ago

kokitang commented 4 years ago

Is it necessary to update cordova-cli version to use cordova-ios 5.1.1? If so, what is the minimum required cordova-cli version of cordova-ios v5.1.1?

As the new requirement on AppStoreConnect, we need to update the cordova-ios to use the WKWebView, but due to some reason, we pretend not to upgrade (or less upgrade) our cordova-cli version.

I search around two days on documents and Google still can't found any related information about the version compatibility of cordova-cli and cordova-ios.

The reason I am going to ask this question is that I already tried to upgrade cordova-ios 5.1.1 with cordova-plugin-wkwebview-engine1.2.1 and cordova-plugin-inappbrowser 3.2.0 but still no luck to pass the warning on AppStoreConnect, and I can almost confirm that there have no more UIWebView usages in other plugins of our project. The only related UIWebView kinds of stuff I found in the project was the code in CordovaLib.xcodeproj, so that I wondering if the cordova-cli version also affecting the update to WKWebView usage.

My current project versions:

global packages:
    @ionic/cli-utils : 1.4.0
    Cordova CLI      : 6.5.0 
    Ionic CLI        : 3.4.0

local packages:

    @ionic/app-scripts              : 2.1.4
    @ionic/cli-plugin-cordova       : 1.4.0
    @ionic/cli-plugin-ionic-angular : 1.3.1
    Cordova Platforms               : android 6.3.0 ios 4.3.1
    Ionic Framework                 : ionic-angular 3.5.0

Thanks!

jcesarmobile commented 4 years ago

It's always recommended to use latest CLI, but not mandatory.

kokitang commented 4 years ago

I found that it's a must to use Cordova v7.1.0 if we want to update Cordova-ios to v5.1.1, otherwise Error: cannot find module 'cordova-common' when installing Cordova will be appeared.

To others needed to use Cordova v6.5.0 or below on some plugins, you may need to remove the plugins in config.xml first, then update to Cordova v7.1.0 to update Cordova-ios to v5.1.1, and then downgrade the Cordova version back to the original version and install the plugins.