I set up everything (creates certificates) and figured out to get the device token in development environment.
When I call:
[[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge) categories:nil]];
I get the device token here:
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{ ...
But with apple entreprise, when I export the app and download it on an iPhone, the application:didRegisterForRemoteNotificationsWithDeviceToken is never called!
I've created :
an IOS Distribution certificate (with the right App ID)
an APNS Production certificate (with the right App ID)
a provisioning profile allowing APN (with the right App ID)
I have the same for the development , and as I said, when I launch the app from xcode, I get the device token. Why not in the exported app?!