Reputation: 14113
Is it possible to to call didReceiveLocalNotification
without displaying Alert when in background?
Upvotes: 1
Views: 1066
Reputation: 21221
No there is no way sadly, UILocalNotication
has been designed to notify the user with an alert view, thats how apple intended them to work
You could set notification.alertBody
to nil, but then you will not be able to use this local notification when the application is not active
Upvotes: 1
Reputation: 69459
didReceiveLocalNotification
will only be called if you app is in the foreground or when the user clicked to view the notification and you app is restored to the foreground from the background.
You might be able to use a UILocalNotification
with out a message, by example update your application icon badge. But then the didReceiveLocalNotification
will not be called if you apps in not the in foreground.
Upvotes: 2