views:

24

answers:

2

Hi, I want to use UILocalNotifications as a background timer for an app. Can this notifications be disabled by the user like remote notifications? If the user disables remote notifications for the app, are the local notifications disabled to?

A: 

If you look closely at that page of Settings.app, you'll see it's called "Notification". No mention of local/remote. The two kinds of notification are actually designed to be indistinguishable to the user. So your settings in the Settings.app affect both types.

That said, I also think it's polite to give people the option of disabling them in my app itself. If a person opts out in the settings screen of my app, I either cancel all upcoming local notifications, or hit my server with some flag turning off remote notifications for this user. I also store that preference in NSUserDefaults so it can inform my notification-scheduling and apn-token-registering behavior on next launch.

Dan Ray
Thank you for your answer, but it will work. See my anser above. And to gibe the user the choice in the app itself is self-evident.
AlexVogel
The Setting page doesn't affect Local Notifications? I wonder if that's an iOS bug, or a documented feature? Are you sure?
hotpaw2
I'm pretty sure I've watched that setting toggle local notifications.
Dan Ray
A: 

I finally wrote a test app to test this feature. The settings of "Notification" has no effect on local notifications. They will appear also while "Notifications" are completely disabled.

AlexVogel