• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Background fetch with localNotification
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Background fetch with localNotification
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: How to terminate an NSTask whenever my app terminates?
  • Next by Date: Re: How to terminate an NSTask whenever my app terminates?
  • Previous by thread: Re: How to terminate an NSTask whenever my app terminates?
  • Next by thread: Re: Background fetch with localNotification
  • Index(es):
    • Date
    • Thread