I am able to get the deviceToken in the below method, now I want to know how to register the deviceToken for push notification,because I am not sure after getting the device token which method or API is used to register the device token for Push Notification and how this registration process works?
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
NSLog(@"APN device token: %@", deviceToken);
}
Well, to start I want to make sure that if you are running the following in the
registerForRemoteNotificationTypeswhen the app launches. Here is what you can add to your AppDelegateWhen you mention registering the device token for push notification you have to send the deviceToken to you server that is sending the push notifications and have the server save it in the database for the push. Here is an example of how you can send this to your server.
if you need anymore help I will be happy to help. Contact me on either website: Austin Web and Mobile Guru or Austin Web Design