10

Does anyone know how an app can control its defaults in iOS 5 Notification Center? I have written a timer app using local notifications to alert the user when the timer goes off in background. When I upgraded to iOS 5, all notifications (alerts, sounds, lock screen) reverted to “off”. Needless to say, this is a terrible default setting for a timer app.

I’ve seen this happen with other apps, such as OmniFocus under iOS 5, but I’ve seen other apps like Pomodoro default to reasonable Notification Center settings.

I’ve checked the iOS 5 docs, notably the iOS 5 App Programming Manual, and the iOS Human Interface Guidelines, but haven’t found any information on this topic.

Has anyone discovered any pattern at all to the default settings?

BoltClock
  • 700,868
  • 160
  • 1,392
  • 1,356
John Brewer
  • 619
  • 7
  • 17

2 Answers2

5

Apparently, the app has to register itself with the Notification Center to be listed there; and then enabled by the user.

When I moved to XCode 4.2, my app did not show up in the notification center and I freaked out! Looking on the web a bit, I found the answer.

I have this code in the app's AppDelegate and all is fine now:

// Register the app for the Push- and Local-Notifications on iOS5 - else the users will not get the Local-Notifications
//
[[UIApplication sharedApplication]registerForRemoteNotificationTypes: UIRemoteNotificationTypeBadge | 
                                                                      UIRemoteNotificationTypeAlert |
                                                                      UIRemoteNotificationTypeSound];

Sam.

Sam
  • 827
  • 4
  • 9
  • 21
  • This doesn't appear to be relevant to local notifications. Please clarify if you disagree. – benvolioT Oct 27 '11 at 14:41
  • 1
    This is a workaround for an iOS 5 bug described in this article: http://www.reigndesign.com/blog/ios5-notification-center-disables-local-notifications-by-default-on-your-existing-apps/ – cduck Nov 02 '11 at 08:33
  • Does Apple publish list of bugs that they fix in a release? How are the developers made aware of the fixes - so that we can remove these kind of workarounds? Does anyone know??? – Sam Nov 03 '11 at 05:13
  • Do we have to also configure App ID and SSL certificate to enable APN service? – qfwfq Dec 05 '11 at 21:40
2

As far as I have discovered, it is not possible to edit the Notification Center Settings from a third party App. I really hope Apple releases an update that addresses this issue. I also have a birthday reminder App that is totally useless unless the user edits the Notification Center Settings manually .

CCDEV
  • 371
  • 1
  • 5
  • 16