The push notification is working when I use development profile , But it is not working with distribution profile. I am using the code to get the device token as follows:
- (void)application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken
{
NSLog(@"My token is: %@", deviceToken);
}
I am getting the same device token in production mode as in development mode. I am testing the app as Ad Hoc.
How can I get device token in Ad Hoc or production mode. Because we can NSLog device token on console for debug mode.
You can send the
deviceTokento your server.If you don’t have a server, you can write the
deviceTokento a file in document directory and use tools like iFunBox to see it.