Victor Ronin
Victor Ronin

Reputation: 23268

How to make UILocalNotification which doesn't launch my app

I am using UILocalNotification to let a user know something. However, it's for a note for him and it doesn't require any actions in my application.

I set:

localNotification setAlertAction:nil]; 
[localNotification setHasAction: NO]; 

So, it shows only in the top of Home screen. However, if the user clicks on it, my app got launched.

Is there a way to create a local notification, which won't launch my app, when it's tapped?

Upvotes: 0

Views: 133

Answers (1)

K S
K S

Reputation: 212

If the user clicks on a local notification alert, iOS will launch the associated app. This is the expected behaviour of handling local notification. I don't believe you can change it.

Upvotes: 1

Related Questions