Closed stevebooks closed 11 years ago
Looking over the code, it does not appear BW does anything of that sort - if your app backgrounds, it's up to you to manage what happens.
You can get a request's NSURLConnection
using something like my_nsurl_connection = BW::HTTP.get("hello") ...
. Then you can either handle an interruption or request more time via other Cocoa APIs (see http://stackoverflow.com/a/9164755).
It would be cool if this were incorporated into BW's API somehow, would love a PR for it :)
So currently, if the app is put into the background, would it still call the |response| block (with an error), or would it not call the block at all?
I would assume the latter.
Yup, you would get no callback if the app is put into the background and, more precisely, killed/removed from memory before the request finishes. (IIRC there's about a 5-second window where your app appears in the background but is still technically in memory.)
If I am preforming a scheduler or HTTP operation and the user clicks the home button (thus sending my app into the background), will the HTTP / scheduler request finish?
I know iOS has a "dispatch_async" method that requests additional time from the processor, is something like this used in Bubblewrap?