1

I'm porting an Android Application on iOS, in the android application I'm downloading big files (150+ MB) but i found that there are no evident alternatives on iOS.

In the android application, the download continues even if the application is closed and i can store the download ID in the SharedPreferences / Local Database and retrieve it later to check if download has been completed or not.

How would you port such an application on iOS?

Luca Vitucci
  • 3,674
  • 4
  • 36
  • 60
  • 2
    `NSURLSession` is probably what you're after. Note: it's for iOS 7 and up only if that matters. – klcjr89 Jul 26 '14 at 13:42

1 Answers1

1

You can use AFNetworking with AFURLSessionManager. It wraps NSURLSession, which allows downloading in the background on iOS 7 and later. http://nshipster.com/afnetworking-2/

Sample code can be found at http://code.tutsplus.com/tutorials/working-with-nsurlsession-afnetworking-20--mobile-22651

Jeow Li Huan
  • 3,758
  • 1
  • 34
  • 52
  • 1
    I'd just stick with NSURLSession. AFNetworking is popular because it's older but there's no need to expose yourself to the hassle and risk of third-party code now. – Tommy Jul 27 '14 at 15:34