Background fetch with localNotification
Background fetch with localNotification
- Subject: Background fetch with localNotification
- From: Diederik Meijer <email@hidden>
- Date: Tue, 01 Sep 2015 16:54:57 +0200
Hi list,
I have added backgroundFetch to my app.
If new data is available, I have the app store it to disk and then inform the user with a localNotification by calling:
[[UIApplication sharedApplication] presentLocalNotificationNow:notification]
What I’m not sure off is whether I need to place this call inside a dispatch_async(dispatch_get_main_queue(), ^ { }) block, or not?
This being in the background, it seems sensible to do so? On the other hand, since the notification is handed by iOS, not by the app itself, this may be superfluous?
Additional question: since this uses presentLocalNotificationNow, is there still any need to call cancelAllLocalNotifications in order to ensure the notification is only fired once?
Thank you,
Diederik
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden