I have set up push notifications in the Apple Developer Panel and the code has been added to my application.
It works fine on the phone using the development profile, but if I use the distribution profile (ad-hoc) so that I can pass it to several users for testing, it gives an error and a failure, the log gives the following error
code:
Thu Jun 25 22:22:35 unknown SpringBoard[729] <Warning>: *** Assertion failure in -[SBRemoteNotificationServer registerApplication:forEnvironment:withTypes:], /SourceCache/SpringBoard/SpringBoard-919.5/SBRemoteNotificationServer.m:633
Thu Jun 25 22:22:35 unknown SpringBoard[729] <Error>: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'no connection found for environment production'
I am using the following code in an application
code:
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound)];
What I don't understand is why it works fine using the development profile, but with ad-hoc it crashes.
Does anyone know what might cause this? I tried to change a lot of things to try to find the problem, but did not find anything.
Craig source
share