new things about cordova 4.0
TRANSCRIPT
Cordova 4.0
Masa Tanaka
Who am I
Masa TanakaFounder & CEO, Monaca
Twitter: @massie
● Browser platform support
● New WebViews
● Windows 8.1 support
What's new?
● Browser platform support
● New WebViews
● Windows 8.1 support
What to cover
What is a Cordova version, btw?
Cordova versioning
Useful links:
Versioning and release strategy (Cordova-coho GitHub)Cordova/PhoneGap Version Confusion (Devgirl's Weblog)
4.1.2
Cordova CLI
4.1.2
cordova-lib
ios 3.7.0
android 3.6.4
browser 3.6.0
fireos 3.6.3
windows8 3.7.1
platforms plugins
device 0.2.12
camera 0.3.3
geolocation 0.3.10
statusbar 0.1.8
file 1.3.1
+
as of Nov.17, 2014
Cordova versions
2.2.0 2.9.0
3.0.0 3.6.0
4.0.0 4.1.0
4.1.2
First CLI
New plugin structure
Platform pinning
Browser platform
New platform: browser
$ cordova platform add "browser"
$ cordova run browser
$ cordova build browser
Browser platform is more intended for the development purpose.
Browser pluginsNot all plugins have supported the platform so far.
org.apache.cordova.camera
org.apache.cordova.device-motion
org.apache.cordova.device-orientation
org.apache.cordova.network-information
org.apache.cordova.device
New WebViews
WKWebView
● Starting from iOS 8.
● JavaScript with JIT runtime engine (Nitro).
● WebGL and IndexedDB support.
More features
iOS 8 WKWebView
iOS 8 UIWebView
iOS 7 UIWebView
WebGL 3D Graphics ✓ ✓
IndexedDB ✓
HTML5 Coverage Score 440/555 427/555 410/555
JavaScript benchmarks
iOS 8 WKWebView iOS 8 UIWebView iOS 7 UIWebView
SunSpider Benchmark 949.8ms
4249.6ms(About 4.5 times slower)
3659.5ms(About 4 times slower)
Octane Benchmark 2908Application crashed
during the testApplication crashed
during the test
ECMAScript 6 Compatibility
28/71 28/71 2/71
HTML5-Benchmark.com 4113
3277(About 20% Slower)
3377(About 20% Slower)
WKWebView convertion
● Cache manifest does not work.
● CORS policy will be applied.
Using WKWebView with Cordova$ cordova plugin add https://github.com/Telerik-Verified-Plugins/WKWebView
WKWebView
HTTP server
running locally
JavaScriptHTML5Native Layer
http://localhost:12344/
Good news
Official platform support is ongoing.
https://github.com/apache/cordova-plugins
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
What about Android?
Crosswalk Project
● Chromium based WebView for Android.
● Requires Android 4.0+.
● Remote USB debugging support.
Setup Crosswalk
See the document described here.
Quicker way
Use Monaca, our Cordova development tool on the cloud. http://monaca.mobi/
Thank You!