iPhone Newsstand push registration Failure

谁说胖子不能爱 提交于 2019-12-22 08:09:52

问题


// Register for notifications

[[UIApplication sharedApplication]
 registerForRemoteNotificationTypes:(
                                     UIRemoteNotificationTypeAlert |
                                     UIRemoteNotificationTypeBadge |
                                     UIRemoteNotificationTypeSound |
                                     UIRemoteNotificationTypeNewsstandContentAvailability)];

This is the code I use for registering for registering for push notifications. The app registers for Alert, Badges, Sound. But the app did not register for the newsstand push notifications. Checked it in

didRegisterForRemoteNotificationsWithDeviceToken

method, with this condition

if([application enabledRemoteNotificationTypes] & UIRemoteNotificationTypeNewsstandContentAvailability)

What might the issue with this code.


回答1:


Did you already include the Newsstand Info.plist keys? You can check if the app registered for Newsstand pushes in Settings/Store.




回答2:


Push notifications don't work on iPhone Simulator, so try to run it on a device.

If this doesn't help, try to:

  • implement application:didFailToRegisterForRemoteNotificationsWithError: method on delegate and check error description
  • check push settings for this app ID and regenerate provisioning profile
  • check aps-environment


来源:https://stackoverflow.com/questions/7832432/iphone-newsstand-push-registration-failure

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!