Skip to content

Instantly share code, notes, and snippets.

@scaffeinate
Last active August 29, 2015 14:05
Show Gist options
  • Select an option

  • Save scaffeinate/cba14c39d23fcac4919b to your computer and use it in GitHub Desktop.

Select an option

Save scaffeinate/cba14c39d23fcac4919b to your computer and use it in GitHub Desktop.
Cordova npm iOS

Installing nodejs and npm:

If you have not install node and npm yet please go ahead and install it first. Here are some links to install:

You can follow any of the above links to install node and npm.

Phonegap Installation using npm:

To install phonegap npm plugin use the below link:

Create a new app by typing:

cordova create new_app

This will create a folder new_app with the necessary folders. Replace the www folder contents with our app www folder contents which I will be sending through mail.

Note:

Before you proceed to adding platforms you have to install the iOS SDK which is used to generate the build. It is mentioned in the pre requisites in the above link. Proceed till "Create App" section. After this you wont be able to add platforms if iOS SDK is not setup.

Installing iOS SDK:

To proceed with iOS SDK here is a link provided by Phonegap themselves: http://docs.phonegap.com/en/2.9.0/guide_getting-started_ios_index.md.html#iOS%20Platform%20Guide.

Adding Platforms:

Once you are done with SDK installation proceed to add iOS platform by navigating to the app folder. For example if you have created cordova create new_app then cd new_app then add iOS platform by typing:

cordova add ios

Building the App:

Build the app using

cordova build ios

Running the App:

Open the app in xcode and run it in device.

http://docs.phonegap.com/en/2.9.0/guide_getting-started_ios_index.md.html#iOS%20Platform%20Guide

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment