I have been looking all over the place and I could not find a solution for my issue and this could be because I am coming from Android Development to iOS and backgrounding
in both platforms is different.
So I have a service in my android app which runs a code
doing so much stuff (Push/Pull database, downloading images from Azure Blobs, displays progress in the status bar etc even when the app is closed) - I am trying to do something similar in iOS and I got few options such as
- Background-Safe Tasks
- DidEnterBackground Tasks
- Background Transfers (iOS 7+)
So initially thought Background Transfers
is the best option as it does not have the time limit
and it still runs if the app is closed by user
and will notify the APP in AppDelegate
once it finishes.
Digging further I fingered that with Background Transfer
although they don't have time limits etc, they can only do two things such as Upload or Download file using session.CreateUploadTask (request)
and session.CreateDownloadTask (request)
respectively.
- Upload Tasks
- Download Tasks
Where my requirement is to run a piece of code and not only download files as my code is doing way more than just downloading images.
I also looked at this to get my head around but made me lost (iOS equivalent to Android Service?)
I have no idea what to do, Any help will be appreciated.
Cheers