Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

iOS 7 new background execution modes

$
0
0

Apple’s new iOS 7 background execution modes are supported in Titanium SDK 3.2.0 and later. Descriptions can be found here and here.

An additional useful example can be found here.

  1. I understand that you can assign multiple download tasks to one urlSession. When I run the Background Fetch Example and add several tasks, the event „sessioncompleted“ is fired directly after each event „downloadcompleted“. My expectation - as described in the first link ("sessioncompleted: fired when the all session tasks complete.") - was that „sessioncompleted“ is only fired once after the last download.
  2. The event „Titanium.App.iOS.backgroundtransfer“ is fired after all background transfers are finished. It should be used to reconnect any urlSession. Could anyone explain when exactly the connection between the app and the urlSession is lost? Are there different scenarios?
  3. What happens to the download tasks in the urlSession when the user kills the app? Will iOS wake up the app in the background when the download tasks are finished?
  4. The event „Titanium.App.iOS.sessioneventscompleted“ is fired after all session events are fired. Is this the normal place to invalidate the urlSession?
  5. In iOS (as described here), NSURLSessionConfiguration is a class that allows you to configure your NSURLSession with connection/HTTP policies, caching behavior, maximum number of connections, custom headers, etc. For example, if you have a scenario where an authentication token is required to be passed in header on every call to a RESTful API, you can set the token in the session configuration and it will apply to all requests made using that session. Is it foreseen to support this behaviour in Appcelerator's „com.appcelerator.urlSession“ module?

Viewing all articles
Browse latest Browse all 8068

Trending Articles