I have created a cordova project adding 2 platforms (android, ios) with some plugin. One of them is the last cordova-plugin-crosswalk-webview (1.3.1). I have chose iOS8 and android 4.0 like target android. Everything work well, i can build the android platform and the iOS too.
On my config.xml file this line are automatical added:
...
<preference name="xwalkVersion" value="14+" />
<preference name="xwalkCommandLine" value="--disable-pull-to-refresh-effect" />
<preference name="xwalkMode" value="embedded" />
...
For android i'm sure to use the crosswalk plugin. With Chrome inspector i can see the navigator.userAgent setted to Crosswalk similar to this image
My package android-debug.apk is now splitted in android-debug-armv7.apk and android-debug-x86.apk and the apk size is near to 25Mb.
But for iOS i can't undestand if crosswalk is working or not. On the safari inspector of my iOS Virtual Machine the navigator.userAgent variable is:
"Mozilla/5.0 (iPhone; CPU iPhone OS 8_4 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Mobile/12H141 (140222960683616)"
How i can be sure of what browser i'm runnig on my iOS? And, if the config.xml configuration is not enought, how i can set crosswalk-webview fos iOS?
I have read the quick start guide of crosswalk for iOS but i think that is not so understandable for who use cordova CLI normally. And nothing is written on documentation of cordova-plugin-crosswalk-webview npm package.
UPDATE:
Follow the cordova output:
$ cordova plugin list
cordova-plugin-crosswalk-webview 1.3.1 "Crosswalk WebView Engine"
$ cordova platforms add ios
Adding ios project...
iOS project created with [email protected]
Running command: /Users/jedi/prj/appMobile/hooks/after_prepare/010_add_platform_class.js /Users/jedi/prj/appMobile
add to body class: platform-ios
Running command: /Users/jedi/prj/appMobile/hooks/after_prepare/030_resource_files.js /Users/jedi/prj/appMobile
...
Installing "cordova-plugin-console" for ios
Installing "cordova-plugin-crosswalk-webview" for ios
Installing "cordova-plugin-device" for ios
..
crosswalk on iOS uses the native WKWebView
, that has indexedDB support, you can run this javascript code to check if it's the WKWebView
if (window.indexedDB) {
alert('WKWebView');
} else {
alert('UIWebView');
}