- Open your Xcode project, which was generated by the PhoneGap build:
Go to your AppDelegate.m file and add this import at the top of the file:1
Still in the AppDelegate.m file, add those line before the @end word:123456789101112
#pragma mark - Push Notifications
)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
// Notify PushApps of a successful registration.
[[PushAppsManager sharedInstance] updatePushToken:deviceToken];
// Gets called when a remote notification is received while app is in the foreground.
)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
[[PushAppsManager sharedInstance] handlePushMessageOnForeground:userInfo];
- That's it! Now take a look on our PhoneGap API. You'll find there how to register a device, unregister and handle received notifications.