Cordova 4.0 
Masa Tanaka
Who am I 
Masa Tanaka 
Founder & CEO, Monaca 
Twitter: @massie
What's new? 
● Browser platform support 
● New WebViews 
● Windows 8.1 support
What to cover 
● Browser platform support 
● New WebViews 
● Windows 8.1 support
What is a Cordova version, btw?
Cordova versioning 
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 
Useful links: 
Versioning and release strategy (Cordova-coho GitHub) 
Cordova/PhoneGap Version Confusion (Devgirl's Weblog) 
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 
Browser platform is more intended for the development 
purpose. 
$ cordova platform add "browser" 
$ cordova run browser 
$ cordova build browser
Browser plugins 
Not 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.device 
org.apache.cordova.network-information
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 2908 
Application crashed 
during the test 
Application 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 
WKWebVi 
ew 
HTTP 
server 
running 
locally 
JavaScript 
Native Layer HTML5 
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!

New things about Cordova 4.0

  • 1.
  • 2.
    Who am I Masa Tanaka Founder & CEO, Monaca Twitter: @massie
  • 3.
    What's new? ●Browser platform support ● New WebViews ● Windows 8.1 support
  • 4.
    What to cover ● Browser platform support ● New WebViews ● Windows 8.1 support
  • 5.
    What is aCordova version, btw?
  • 6.
    Cordova versioning 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 Useful links: Versioning and release strategy (Cordova-coho GitHub) Cordova/PhoneGap Version Confusion (Devgirl's Weblog) 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
  • 7.
    Cordova versions 2.2.02.9.0 3.0.0 3.6.0 4.0.0 4.1.0 4.1.2 First CLI New plugin structure Platform pinning
  • 8.
  • 9.
    New platform: browser Browser platform is more intended for the development purpose. $ cordova platform add "browser" $ cordova run browser $ cordova build browser
  • 10.
    Browser plugins Notall plugins have supported the platform so far. org.apache.cordova.camera org.apache.cordova.device-motion org.apache.cordova.device-orientation org.apache.cordova.device org.apache.cordova.network-information
  • 11.
  • 12.
    WKWebView ● Startingfrom iOS 8. ● JavaScript with JIT runtime engine (Nitro). ● WebGL and IndexedDB support.
  • 13.
    More features iOS8 WKWebView iOS 8 UIWebView iOS 7 UIWebView WebGL 3D Graphics ✓ ✓ IndexedDB ✓ HTML5 Coverage Score 440/555 427/555 410/555
  • 14.
    JavaScript benchmarks iOS8 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 2908 Application crashed during the test Application 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)
  • 15.
    WKWebView convertion ●Cache manifest does not work. ● CORS policy will be applied.
  • 16.
    Using WKWebView withCordova $ cordova plugin add https://github.com/Telerik-Verified-Plugins/WKWebView WKWebVi ew HTTP server running locally JavaScript Native Layer HTML5 http://localhost:12344/
  • 17.
    Good news Officialplatform support is ongoing. https://github.com/apache/cordova-plugins <preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
  • 18.
  • 19.
    Crosswalk Project ●Chromium based WebView for Android. ● Requires Android 4.0+. ● Remote USB debugging support.
  • 20.
    Setup Crosswalk Seethe document described here.
  • 21.
    Quicker way UseMonaca, our Cordova development tool on the cloud. http://monaca.mobi/
  • 22.