DatePicker iOS plugin updated to work with Cordova / PhoneGap 3.0
Posted on July 26, 2013
For the PhoneGap app "HOAY" I'm working on I do need a DatePicker iOS plugin, which is running with latest version of PhoneGap 3.0.
Fortunately there is already a DatePicker plugin at PhoneGap's plugin repository,
but it does not work with the new plugin architecture of PhoneGap 3.0. So I decided to port to re-write it to support PhoneGap 3.0.
Source code
All source of the migration is published to GitHub, including a pull request to PhoneGap's plugin repository.
Screen shots (updated)
iPhone
iPad
Changes
To migrate the plugin to PhoneGap 3.0 I have done following changes:
1) New plugin directory structure (recommended by Cordova plugman)
2) Providing a manifest file plugin.xml
(needed for using command-line interface)
3) Calling function exec
with the new method signature on JavaScript side (needed by Cordova / PhoneGap 3)
exec(<successFunction>, <failFunction>, <service>, <action>, [<args>]);
4) Updating on Objective-C side the action method show
with the new method signature (needed by Cordova / PhoneGap 3)
- (void)show:(CDVInvokedUrlCommand*)command;
5) Adding AMD support to DatePicker.JS (needed by Cordova / PhoneGap 3)
6) Removing all counting / releasing of objects (needed for using Xcode 4.2 with its feature called "Automatic Reference Counting")
7) To get a detailed overview of all changes just check out this diff stats at Github
8) New features: Maximum and minimum date
9) New features: Adding done
and cancel
buttons incl. customized labels
10) New feature: iPad support
-Jens