Shazron's Cordova (aka PhoneGap) Blog

at Adobe Systems Inc.

Archive for October 2012

What’s new in Cordova iOS 2.2.0

with 58 comments

1. Set Xcode 4.5 minimum (iOS 6 SDK, iOS 4.3 deployment target, no armv6)

Submission to the Apple App Store requires the latest SDK, which is iOS 6. The iOS 6 SDK only comes with Xcode 4.5. Xcode 4.5 drops support for armv6, thus the minimum deployment target supported is iOS 4.3. This means that support for the iPhone 3G, and iPod Touch 2nd Generation is dropped.

2. Fixed iOS 6 and iPhone 5 issues

  1. iOS 6 Contacts permissions support – this was the only API issue for iOS 6 that did not make it into 2.1.0
  2. Capture API – for capturing audio, a new microphone image has been added for the iPhone 5 dimensions, and the Capture API view controllers support the new iOS 6 orientation delegate methods
  3. Added iPhone 5 sized Splash Screen
  4. Added new iOS 6 orientation delegate methods, and fixed orientation bug:
  5. iOS 6 LocalStorage changes (backup flag), see issue and new Cordova.plist setting change to allow for iCloud, local or no backup. 

3. FileTransfer API changes

  1. Added support for the onprogress event to get progress events for a FileTransfer operation
  2. Added the abort function to cancel a FileTransfer operation

See the API doc.

4. Cordova.plist new properties, and changed a property

  1. Added the iOS 6 property SuppressesIncrementalRendering – set to YES (defaults to NO) to wait until all new view content has been received before it is rendered.
  2. Added the iOS 6 property KeyboardDisplayRequiresUserAction – set to NO (defaults to YES) to open the keyboard when form elements get focus via JavaScript focus() call.
  3. Changed the property BackupWebStorage (string, defaults to ‘cloud’) – valid values are ‘none’, ‘cloud’ and ‘local’. Set to ‘cloud’ to allow the web storage data to be backed up to iCloud, and set to ‘local’ to only allow local backups (iTunes sync). Set to ‘none’ to not allow any backups of web storage. The previous boolean property is deprecated and mapped to ‘cloud’ (true) and ‘none’ (false).

See the Project Settings doc.

5. Graduated the Globalization plugin to core

This plugin was previously in the phonegap-plugins repo (BB WebWorks 5, iOS, Android). The globalization object obtains information and performs operations specific to the user’s locale and timezone.

See the API doc.

6. bin/create script changes

In 2.2.0 by default, the CordovaLib sub-project is copied into your project folder. Previously the CordovaLib sub-project was linked in to your project as a shared project. To still use a shared CordovaLib, add “–shared” as the first parameter to bin/create. This is useful for committers to just point to the CordovaLib from their git repo.

7. uncrustify hook for committers

Uncrustify is a utility that beautifies your code — essentially it enforces certain code formatting conventions. Right now it is only added to the iOS repo as a trial. See the issue:

In the root of your iOS repo, using the command line:

cd .git
rm -r hooks
ln -s ../hooks .

Otherwise, you should run the bin/ command manually before checking in code on iOS.

8. onReset() override for plugins

Add a onReset() method to your plugin — this is called on top-level navigation or refresh, so that plugins can know to cancel any long-running requests and reinitialize themselves. This is for the situation where your WebView has been refreshed, and any operations and callbacks for plugins are invalid.

9. iOS JavaScript-Obj-C bridge improvements

  1. no longer broken for non file:// pages
  2. No longer shows failed requests in the remote web inspector
  3. 15% speed improvement in benchmarks

10. Splashscreen API

The Splashscreen API is now formally documented for iOS and Android.

View the Release Notes for other changes.

Written by shazron

October 27, 2012 at 4:42 pm

%d bloggers like this: