4

// 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.

iDev
  • 23,310
  • 7
  • 60
  • 85
coder284
  • 831
  • 1
  • 13
  • 34

2 Answers2

0

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
suda
  • 2,604
  • 1
  • 27
  • 38
0

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

THM
  • 310
  • 2
  • 15
  • yes, all the settings for the app are done. The app was shown in the newsstand also. But the problem is with the registering of the pushnotifications – coder284 Nov 22 '11 at 13:20