Set Default iOS Local Notification Style for Application

Set default iOS local notification style for application

I would like to add something, since I've opened a TSI and somehow I asked about this and have been answered. From Quinn "The Eskimo!":

"This depends on you mean. You have some control over how the notification appears based on how you set the UILocalNotification properties (things like alertBody, soundName, and so on). However, if you're asking about the way in which those properties are interpreted (the things the user can customise in Settings > Notifications), those are user preferences and not exposed via any API."

Local Notification Alert style set to 'Alerts' when phone is locked?

Not that's not possible,

That's an OS functionality, which is controlled only by user.

iOS Local notification shows old application name

After I understanding your scenario, the thing which I got is that when user updating the App, there still old version local notification configure before.

I advise you to Cancel all local notifications immediately when your update the App with this code:

[[UIApplication sharedApplication] cancelAllLocalNotifications];

And make sure cancelAllLocalNotifications call only once, you can do this by using bool with NSUserDefault.

And by doing this the local notification which were fire before with the old App name will be cancel and new local notification will configure with the new App name.

Hope this will helps you.

iOS 5: Can I have my app In Notification Center by default?

I've encountered the same problem. The only clue I saw in documentation is that the new Notification Center handles both local and remote notifications. Therefor I assumed that the app should register for local as it would for remote notification. Added this piece of code -

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

and after my app scheduled a local notification it appeared at the "In Notification Center".

BUT it seems to have no affect if my app already appears in "Not In Notification Center".. So have all of my customers that ran the app before the next update got screwed?

Is it possible to change the default notification Alert Style upon application install?

Sorry but the answer is no. You have just a little influence on the presentation of the notification. Setting the presentation style is then up to the user and you can't modify it at any point.

see:
related stack overflow question

local notification style coming up as banner, instead of alert

No, you cannot do that. The user is the one who decides what kind of notification he/she gets.



Related Topics



Leave a reply



Submit