I want to use push notification in my app.I have created an unique app id and created push development certificate.also created provisioning profile using that unique app id.I put the code for registering the device in application terminate method so that when my app closed it's enabled push notification and when it launches it disables the push notification.BTW currently i am using ApplicationDidFnishLaunching method and registering for push notification.The app is registered for push notification i think because it asks to allow push notification on alertview.But i've never found device token.The app is not invoking the method.BTW i have written this Method in ApplicationDelegate.
- (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
NSLog(@"devToken=%@",deviceToken);
[self alertNotice:@"" withMSG:[NSString stringWithFormat:@"devToken=%@",deviceToken] cancleButtonTitle:NSLocalizedString(@"OK",@"") otherButtonTitle:@""];
}
even i set a breakpoint in this method but it's not invoking. i have iPhone 3GS jailbroken. Anybody knows why i'm not getting devicetoken.