1

If you try to send an email using the iOS mail app when your device has no connection it will que up the message to send when the device finally finds a connection, even if the app is backgrounded. You can hear that whoosh sound when it sends the message.

Does anybody know how that app gets around the background restrictions from apple? I’ve been reading through apples documentation on background execution but I can’t see anything that lets me do anything even remotely similar. NSURLSession lets me continue an upload tasks in the background for a short period of time but nothing that lets me que up an upload if I can’t make a connection to begin with.

Is Apple able to get around this because they aren’t bound by the same restrictions as we are?

1 Answers1

0

You can implement some sort of persistent retry store and use: application:performFetchWithCompletionHandler: to send it.

Apple do not state specifically when they will wake you up and give you the opportunity to send it they simply state -

When an opportunity arises to download data, the system calls this method to give your app a chance to download any data it needs.

Try to experiment with this and see if regaining connectivity calls this.

Community
  • 1
  • 1
Yoshkebab
  • 770
  • 1
  • 7
  • 14