开发者

Apple Push Notifications - When Registering for Notifications no Callbacks are received at all

I've gone through all the steps as specified, am using a dev certificate with APN enabled and am calling registerForRemoteNotificationTypes: with the right flags in my app delegate.

Still, nei开发者_JAVA百科ther application:didRegisterForRemoteNotificationsWithDeviceToken: nor application:didFailToRegisterForRemoteNotificationsWithError: are being called. It looks like the registration request just gets stuck in transit.

What am I doing wrong?


This sounds silly, but it's bit me in the past: double-check your capitalization and parameter types. If a delegate method declaration isn't spot on your method won't get called, and you won't get any kind of warning.

Your best bet is to copy and paste the prototype from Apple's documentation.


Try your App on another device. If it works there...

I have the same Problem with one iPhone 3G (no jailbreak, no unlock). It somply dos not work with that phone. I tried updating to a newer iPhone OS. I tried a factory reset. It does show the confirmationscreen and it records the answer in the Settings. But neither application:didFailToRegisterForRemoteNotificationsWithError nor application:didRegisterForRemoteNotificationsWithDeviceToken are ever called.

The same App works on all other tested devices (ipods, iphones). This iPhone 3G does also not receive PNs for other apps.

PNs also did not work for one Jailbroken Classic iPhone.

It might be that your device is simply not behaving correctly. Try a different device.


I had this problem too and it was because of bad certificates, app id, provision profile...

Make sure that: 1, Correct certificates are installed on client AND server 2, Make sure that you have selected correct provision profile in your project settings. REMEMBER App ID in your provision profile has to be specific(not ending with *) and last part of this App ID has to match name of your application exactly and it is case sensitive. so iv your app is called myApp then your app id has to be SOMENUMBERScom.yourcompany.myApp

Just an idea...


I had the same problem and solved it by disconnecting from the cellular network. Seems to be some problem when both wireless and 3G are on concurrently.


I found out that PUSH notifications require port 5223 open in your network (if you are using WIFI), or otherwise, a cellular data connection.

I encountered the same problem in my home network, and had to open the port manually in the wireless router.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜