I\'ve been working on this for a while now. I know there\'s a ton of articles out there, and have learned a lot about it all.
I have created my development and produ
Device token for Development and Production are not same.
When you are testing for Production use UIAlertView to see your token for Production. Do something like the following:
- (void)application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken
{
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];
NSString *deviceID = [[deviceToken description] stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"<>"]];
deviceID = [deviceID stringByReplacingOccurrencesOfString:@" " withString:@""];
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Device Token", nil) message:deviceID delegate:nil cancelButtonTitle:NSLocalizedString(@"OK", nil) otherButtonTitles:nil];
[alert show];
}
Use this token to push notification for production.