Use the following steps to enable cross-platform push notifications on your app:
Open the command-line tool and create a new PhoneGap project called
pushnotifications
.$ cordova create ~/the/path/to/your/source/pushnotifications com.gnstudio.pg.pushnotifications PushNotifications
Using the command-line tool add the Android and the iOS platforms to the project.
$ cd pushnotifications $ cordova platforms add android $ cordova platforms add ios
Clone the Push Plugin GitHub repository to your system.
$ git clone https: //github.com/phonegap-build/PushPlugin.git
Open the Xcode project you find in the folder
platforms/ios
and drag-and-drop into theplugins
folder available in the Xcode Project Navigator the following files:AppDelegate+notification.h
,AppDelegate+notification.m
,PushPlugin.h
,PushPlugin.m
Open the
config.xml
file you find in the root of the Xcode project...