Reputation: 675
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.
Upvotes: 2
Views: 1593
Reputation: 2766
How can production build can run on real device? Running an app built by production provisioning profile is prohibited.
Upvotes: 0
Reputation: 946
you are using the developer mode of APNS, use production mode of APNS i think you are using sandbox when creating the .pem files so remove sandbox and then try again to send pust notification.
Upvotes: 0
Reputation: 2459
You can send the deviceToken
to your server.
If you don't have a server, you can write the deviceToken
to a file in document directory and use tools like iFunBox to see it.
Upvotes: 2