Kishore Kumar
Kishore Kumar

Reputation: 4375

How to add plugins for ios in phonegap?

I am new to phonegap.

Using phonegap app I have created new project.

Now I like to use this project in xcode (7.2.1) is it possible?

What is the best way to develop app in phonegap for various plugin ,I was googled and heard about coredova but can't understand exact needed .

Upvotes: 0

Views: 1247

Answers (2)

yardie
yardie

Reputation: 1557

Now I like to use this project in xCode (7.2.1) is it possible?*

Yes it is possible, Read this article

What is the best way to develop app in phonegap for various plugin

I am assuming you are asking how to add different plugins?

  1. Create your APP with the PhoneGap Interface (You already did)
  2. Go to the www folder where you stored the PG build files and look for your config.xml, then you will see a section where a few plugins already exists. You can add additional ones by just simply copying and pasting the below XML syntax (Battery Status Plugin), example:

    <plugin name="cordova-plugin-battery-status" spec="1.1.0" source="pgb" />

Reference this article for a comprehensive list of PhoneGap's plugins: https://build.phonegap.com/plugins

Alternatively, you can add them through the Command Line interface (See the first answer to your question)

Upvotes: 0

Jay Rathod
Jay Rathod

Reputation: 11255

For IOS Try this to add any new Plugin.

Go to your Created Project Directory in Mac CLI.

Then do this.

If you haven't added IOS Platform then run below command.

cordova platform add ios

Then build your whole project with below command.

cordova prepare ios

Then to add plugin run below command.

cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git

Here take whatever plugin you want to install.

Make sure you connected with internet while installing plugin.

Upvotes: 1

Related Questions