Page tree
Skip to end of metadata
Go to start of metadata
This tutorial starts with creating a PhoneGap project. If you already have an existing project, you can start with Adding the PushApps plugin.

 

  1. Creating a PhoneGap Project
  2. Adding the PushApps plugin to the PhoneGap project

Creating a PhoneGap Project

  1. Open your command line tool and go to the directory where you maintain your source code, and run a command such as the following:

     

    $ cordova create pushappsdemo com.pushapps.demo PushAppsDemo
    $ cd pushappsdemo
  2. Lets add support for Android and iOS:

     

    $ cordova platform add android
    $ cordova platform add ios
  3. Now lets build the project for both platforms;

     

    $ cordova build

 

Adding the PushApps plugin to the PhoneGap project

Open you command line tool and go to the project directory. Execute the following command:

 

$ cordova plugin add org.apache.cordova.device
$ cordova plugin add https://github.com/PushAppsService/PushAppsPhonegap.git
$ cordova build

 

If you're on iOS, please open the Xcode project you've just created, and and the following code to your AppDelegate.m file:

 

That's it!

What's Next?

  • No labels