Shazron's Cordova (aka PhoneGap) Blog

at Adobe Systems Inc.

Archive for the ‘Uncategorized’ Category

WKWebView and Apache Cordova

with 18 comments

Webkit_LogoThe Good

WKWebView support will be coming in cordova-ios 4.0.0, tentatively scheduled for April 2015. You can however, alpha test the support by following this README.

Pluggable webviews are coming in cordova-ios 4.0.0, which in addition to the default UIWebView, you can include the wkwebview-engine plugin for WKWebView support (it will not be in there by default so as not to break your existing code). The default uiwebview-engine has also been pluginized as well, which allows scenarios where you can update it with bug fixes after a platform release, or substituting it as the default webview for wkwebview-engine in the future.

cordova-ios 4.0.0 is still a work in a progress, and the APIs are subject to change. Rest assured that all core plugins will be compatible before we release, and we’ll test a bunch of the top plugins from as well.

The Bad

Unfortunately for the WKWebView in iOS 8, support for loading local files in the app bundle is not available (yet). The code has been patched in WebKit2, but the patch hasn’t been downstreamed into iOS yet. As of iOS 8.3 beta 2, the functionality is still not available. So, we’ve decide to use the embedded local web-server route. Because of this, the File core plugin and the Camera core plugin might not work yet (fixes are coming) — we have a solution that transforms file:/// references to the appropriate http://localhost routes.

The Ugly

So WKWebView is great right? Yup! But there are limitations to its behaviour as compared to UIWebView:

Help Test!

Instructions here. Please file issues and assign them to me. Thanks everyone 🙂

Written by shazron

March 3, 2015 at 1:48 am

Posted in Uncategorized

cordova-ios 3.8.0 release – highlights

leave a comment »

The full release notes are available.cordova_bot

Take note of the caveat that the current cordova-cli does not include this version by default until version 4.3.0 (pending Apache voting and release) so you will have to add the platform explicitly.

> node.js is required

Formerly if you did not use the cordova-cli and just used the bin/create script and the scripts in your project’s ‘cordova‘ folder, you didn’t need node.js. With this new version, all scripts have been converted from bash to node.js

NOTE: Users will need to update to ios-deploy version 1.4.0 because of this change.

> cordova bridge fix

Details here. Essentially in cordova-ios 3.7.0, a div element was (erroneously) created on every call across the bridge, which might result in a performance issue.

> handleOpenURL issues

Details here. This should work reliably now. Note that this functionality will be removed in cordova-ios 4.0.0 and be put into a plugin, which would allow more customization (including setting the callback function used).

> ability to disable push notification code 

Details here. Right now all cordova-ios projects will have the entitlement warning from Apple even if they don’t actually include push notification capability. For backwards compatible reasons, this is left in for this version, but you can disable it now by adding a preprocessor macro in build.xcconfig (through a project hook).

In cordova-ios 4.0.0, this code will be removed, users can add a plugin that swizzles the appropriate AppDelegate methods instead. The AppDelegate itself in the default template will itself be cleared out, and just inherit a base class.

> emulator builds use build.xcconfig now

Details here. This is so if you want to add custom build settings to enable development and use of Swift plugins for example while testing in the Simulator (and not just the device).

Written by shazron

February 27, 2015 at 8:21 pm

Posted in Uncategorized

Hello world!

leave a comment »

Hey, I’m the newest part of the Nitobi team. This blog proves it 😉 Nothing to write about right now, but in an upcoming post I will write about my travails with Windows Mobile …

Written by shazron

May 22, 2009 at 5:06 pm

Posted in Uncategorized

%d bloggers like this: