2
votes

Make a simple app with the following: These are my steps detailed:

cd Desarrollo/Workspace_Xcode/ sudo cordova create MyApp com.mybusiness.app1 ExampleApp cd MyApp sudo cordova platform add ios sudo cordova plugin add cordova-plugin-device sudo cordova plugin add cordova-plugin-dialogs sudo cordova plugin add cordova-plugin-inappbrowser sudo cordova plugin add cordova-plugin-wkwebview-engine cd .. sudo chown -R myuser MyApp

Open Xcode workspace, add in config.xml

Added info.plist

Then sudo cordova platform rm ios sudo cordova platform add iOS

sudo cordova plugin list cordova-plugin-device 2.0.3 "Device" cordova-plugin-dialogs 2.0.2 "Notification" cordova-plugin-inappbrowser 3.2.0 "InAppBrowser" cordova-plugin-whitelist 1.3.4 "Whitelist" cordova-plugin-wkwebview-engine 1.2.1 "Cordova WKWebView Engine"

Run the app, it shows the usual apache device ready, upload to appstore and validate is ok, my app rejected from apple:

ITMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability. Learn more (https://developer.apple.com....

We have cli version 9.0.0 ([email protected]) Cordova 5.1.1 Xcode 11.5 iOS 10.15.5 (catalina) xcodebuild -showsdks iOS SDKs: iOS 13.5 -sdk iphoneos13.5 iOS Simulator SDKs: Simulator - iOS 13.5 -sdk iphonesimulator13.5 macOS SDKs: DriverKit 19.0 -sdk driverkit.macosx19.0 macOS 10.15 -sdk macosx10.15 tvOS SDKs: tvOS 13.4 -sdk appletvos13.4 tvOS Simulator SDKs: Simulator - tvOS 13.4 -sdk appletvsimulator13.4 watchOS SDKs: watchOS 6.2 -sdk watchos6.2 watchOS Simulator SDKs: Simulator - watchOS 6.2 -sdk watchsimulator6.2

3
where it is add in config.xml the following was done: <preference name="WKWebViewOnly" value="true"/>Surbit UY

3 Answers

1
votes

The only solutions i found was add plugin from latest cordova-iOS Code that is:

cordova plugin add https://github.com/apache/cordova-plugin-device.git
cordova plugin add https://github.com/apache/cordova-plugin-dialogs.git
cordova plugin add https://github.com/apache/cordova-plugin-inappbrowser.git
cordova platform add https://github.com/apache/cordova-ios.git

This is the only way to remove UIWebView references. Do not add wkwebengine plugin, because it is not compile with new code.

0
votes

I had the same issue on Cordova app using cordova [email protected]. I was able to fix using following steps:

Install these plugins along with your other plugins:

  1. "cordova-plugin-inappbrowser": "^4.0.0"
  2. "cordova-plugin-wkwebview-engine": "^1.2.1"
  3. cordova plugin add https://github.com/TheMattRay/cordova-plugin-wkwebviewxhrfix
  4. Remove cordova iOS platform
  5. Add cordova iOS platform 5.1.1
  6. Add this code in config.xml file inside "platform name="ios"> tag
<preference name="WKWebViewOnly" value="true" />

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

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

It will fix the both splash screen stuck issue and apple warning issue.

0
votes

To fix local file access via XHR with WKWebView for Cordova iOS 6+ which is accompanied with an error message about "Cross origin requests are only supported for HTTP" can be used just.

cordova plugin add https://github.com/AraHovakimyan/cordova-plugin-wkwebviewxhrfix

without cordova-plugin-wkwebview-engine.

And make sure you remove below preference from project's config.xml

<preference name="scheme" value="app"/>
<preference name="hostname" value="localhost"/>