开发者

registerForRemoteNotificationTypes Not responding on didFailToRegisterForRemoteNotificationsWithError

Hello everybody I am using this code to send Push Notifications but registerForRemoteNotificationTypes isn't returning anything on failToRegisterForRemoteNotificationsWithError.

The provisioning profile and developer certificate are correct and up to date.

I know that some things don't work correctly in the simulator, but in failToRegisterForRemoteNotificati开发者_StackOverflow中文版onsWithError it should return some error from Apple.

Can anybody help me with any track?


In my case I had to manually set the correct date and time on an older iPhone 3G, which had reverted to January 1, 2000 after having been powered off for some time. The only hint for this was something about "certificates" in the console output viewable in the Organizer in XCode (not the debug console).


In my case the solution was to make sure that the signing identity wasn't pointing to the general * profile (wildcard), but to my specific App bundle profile since Push notifications do not work with wildcards. Also it would be better to add the iOS or iPhone tag to your question instead of just apple.


My problem was - Notifications were disabled (Notification is off for my App and Badge/Alert were off after that) during testing.

So, go to Settings, select Notifications, find your application, set Notification Center to ON, ensure badge/sounds are on two (depending on options you use)

Good luck


This issue was fixed reinstalling Xcode and deleting and reinstalling all certificates and provisioning profiles.

Regards.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜