1. Script Updates
- [CB–2849] Fix bin/create when CordovaLib parent dir has a space
- [CB–2788] add ./bin/check_reqs script to iOS
- [CB–3048] Add –arc flag to create script, support arc in template.
2. FileTransfer Updates
- [CB–2537] Implement streaming downloads for FileTransfer
- [CB–2190] Allow FileTransfer uploads/downloads to continue in background
- [CB–1518] Request content length in parallel with download for gzipped content
- [CB–51] Added httpMethod for file transfer options (defaults to POST)
- [CB–2824] Remove DebugConsole plugin
- [CB–3066] Fire onNativeReady from JS, as bridge is available immediately
3. Whitelist Updates
- [CB–3032] Add whitelist support for custom schemes.
- [CB–3067] iOS 5.0 file urls are not passing whitelist due to recent changes
- [CB–2725] Fix www deploy issues with symlinks
- [CB–2732] Only set camera device when allowed.
- [CB–2911] Updated resolveLocalFileSystemURI.
- [CB–2587] Added plugin timing for plugins that are loaded on startup (plugin ‘onload’ attribute)
- [CB–2848] ShowSplashScreenSpinner not used
- [CB–2960] Changing the volume of a sound already playing
- [CB–3021] Can no longer import CDVPlugin.h from plugin Objective-C++ code
- [CB–2698] Fix load detection when pages have redirects.
5. Camera EXIF Updates
- [CB–2902] re-added long/short tags to template dict, fixed subExifIFD offset
- [CB–2896] Multipart exif tags are not written correctly
- [CB–2790] Removed old splice code, replaced with JpegHeaderWriter api calls
- [CB–3039] iOS Exif date length mismtach
- [CB–3052] iOS Exif SubIFD offsets incorrect
6. InAppBrowser Updates
- [CB–3069] Fix InAppBrowser load events (for non-redirecting pages)
- [CB–3295] Send InAppBrowser loadstart events when redirects occur
- [CB–2653] Add InAppBrowser.executeScript() / InAppBrowser.insertCSS API (iOS)
- InAppBrowser: Don’t inject iframe bridge until necessary
- Fix NPE in InAppBrowser’s error callback
Beginning May 1st 2013, apps submitted to the Apple App Store…
Cordova/PhoneGap fulfills requirement (1) since version 2.5.0 and fulfills requirement (2) since version 1.7.0.
But what if my Cordova/PhoneGap app, which I am unwilling to upgrade, needs to be updated and submitted to the App Store?
You will have to manually update and patch your code. It’s not going to be an easy task, and I should warn you that upgrading will be easier. The main changes are to handle the iPhone 5 sized splashscreen, and the code to handle that is only in Cordova/PhoneGap 2.5.0. You can include the iPhone 5 sized asset and this will trigger the app to be the right size, but because of our splashscreen support it needs to match iOS showing the splashscreen after that splashscreen disappears. See our SplashScreen API for more details.
To be doubly sure – select your project icon in the Project Navigator in Xcode, then select the Summary tab. Select your project target then review the App Icons and Launch Images sections – you’ll see if you are missing anything or whether the assets are not the right sizes (denoted by the yellow triangle icon with an exclamation point in it).
This is for OS X only, and does not check for project requirements yet (which may be coming with the bin/check_reqs scripts in 2.7.0). Essentially this proof of concept project is a GUI wrapper for the bin/create scripts you know and love. You could use this against the the iOS, OS X, Android and BlackBerry source (although I have only tested it for iOS and OS X projects). Think of this as Handbrake for ffmpeg.
The project routes the stderr and stdout from the script call back to your callback function, and also reports the resultcode for you to further process.
Ideally this would be a GUI for cordova-cli instead, that may come in the future. This app was also created using itself, and Cordova OS X.
The GUI itself won’t win any awards yet, but is workable (click to enlarge):
The WebView used is from the system WebKit, which varies depending on your OS X version. Since it uses the system WebKit, the Web API support follows from it, and running Modernizr on a Cordova OS X project on OS X 10.8.3 there is broad support for most of the APIs out there except for indexeddb, some advanced input types, flexbox and WebGL. WebGL can be enabled in code however. See the Modernizr report below:
1. Config.xml <preference> changes – added KeyboardShrinksView and HideKeyboardFormAccessoryBar. UIWebViewBounce renamed to DisallowOverscroll. EnableLocation deprecated.
HideKeyboardFormAccessoryBar will hide the form accessory bar (the Next, Prev and Done buttons) when the keyboard is shown for handling input in a textbox.
KeyboardShrinksView will shrink the WebView when the keyboard comes up. The WebView shrinks instead of the viewport shrinking and the page scrollable. This applies to apps that position their elements relative to the bottom of the WebView. This is the default behaviour on Android, and makes a lot of sense when building apps as opposed to webpages.
The UIWebViewBounce preference was changed to DisallowOverscroll to be consistent with Android (thus the default value is the opposite).
The EnableLocation preference is deprecated – set the “onload” attribute of the CDVLocation plugin element instead.
2. InAppBrowser API – “loaderror” event added
3. Notification API changes
4. FileTransfer API changes
5. Camera API changes
6. Various splash-screen issues fixed
See this issue.
7. Various iframe issues fixed
8. Various FileReader issues fixed
9. Multi-part plugin result is now supported
10. Plugins can be dynamically registered (outside of config.xml)
See this issue.
Other fixes are in the RELEASE NOTES.
Mainly bug fixes.
1. New functionality for Plugins
Lots of enhancements, and one removal. See the Plugin Upgrade Guide. Of note, you can load plugins at startup now.
2. config.xml root element is <widget>
Shouldn’t affect your current config.xml since the config parsing doesn’t care about the root element name. There’ll be further changes to config.xml so we conform to the widget spec as we go along.
3. Better FileTransfer errors
Now you get the response body in the FileTransferError object returned.
4. Enable NSURLCache for better app performance
Set in the app template.
5. Added support for Native URIs (iOS’ assets-library:// scheme)
1. Removal of JSONKit, replaced with NSJSONSerialization
Since we dropped support for iOS 4.x, this is now possible. See the Plugin Upgrade Guide.
2. Support for ArrayBuffer arguments over the exec bridge
3. The start page can be specified in config.xml
Through the content tag.
4. FileTransfer “trustAllHosts” parameter
This is now supported. Set to true to trust hosts with self-signed certificates, for example.
5. InAppBrowser enhancements, and fix
Enhancements are specified here. Basically these are the same settings as in the Project Settings, also presentation and transition styles are added. The fix for InAppBrowser is specified here. Basically, on iOS 6, when you load PDFs in the InAppBrowser, it resets the User-Agent for all UIWebViews which we rely on for our exec bridge — our fix helps work around that, with caveats.
6. Custom url-scheme handler ‘handleOpenURL’ not called on startup
It was not being called on first app launch, but has now been fixed. Resume from backgrounding has always worked.
7. FileTransfer failing for file:/// urls
Fixed. An alternative is to use xhr.
8. require.js lazy loading of cordova.js
This should work now.
9. Various deprecated methods removed
See the wiki.
10. Default splash-screen sizes 10x smaller
Shouldn’t affect you much.
11. There was an ARC issue in Contacts
See this issue.
12. Support Reading Slices of Text Files.
From Simon McDonald’s blog post regarding Cordova Android 2.4.0:
The File object now has a slice method. Suppose the file we’re reading contains the text:
“All that is gold does not glitter, not all those who wander are lost.”
- f.slice(4, 8) would result in “that”
- f.slice(9) would be “is gold does not glitter, not all those who wander are lost.”
- f.slice(-5, -1) would be “lost”
[NOTE] I want to also draw attention to cordova-cli being released with 2.4.0. More on Raymond Camden’s blog. In a nutshell, this is an abstraction for the command-line utilities that are included for the different platforms all in one easier to use interface, plus the ability to add and remove plugins.