Image

In order for plugins that worked for Phonegap 2.9 (and under) to work with the new Phonegap 3.0, you have to add a plugin.xml to the plugin’s folder where the .m and .h files (for iOS) are located. You might need to edit the .m files for plugins built for iOS, as well.

To get an example of how the new plugin.xml file should look, check out this code I recently posted to GitHub for a Card.io credit card scanner plugin update: https://github.com/m140v/card.io-iOS-SDK-PhoneGap/blob/master/plugin.xml

Once you do this, you will also have to replace all the

(void)scan:(NSMutableArray *)args withDict:(NSMutableDictionary *)options

-type declarations with:

– (void)scan:(CDVInvokedUrlCommand*)command
in the .m files for iOS.
To integrate your plugin into your app, you can simply use Phonegap’s new command line tool (also called the CLT) in your terminal (in the root directory of your project) by typing:
phonegap local plugin add https://git-wip-us.apache.org/repos/asf/project-name.git
Also, for some reason, all the original plugins that originally came packaged with Phonegap are no longer packaged in. You have to add all of this this way. For further documentation on this, check out Phonegap’s website.
Once you do that, you should be all set. If you have any further issues getting your plugins integrated into your Phonegap projects, ping me on twitter at @itsdeshazer.
Advertisements