nwales
nwales

Reputation: 3561

Download from list of assets to local storage for ios 7 app

I have a simple task, yet I am still not sure of the best way to accomplish this. I have a json endpoint that defines a list of assets that my app relies upon that need to be preloaded. They are images, and audio files. Given the nature of my app, I prefer that these assets be fully downloaded prior to the user interacting with the app. I expect it could be up to about 50MB in total and I believe my best bet is to download to the local file system. I figure the first launch will load asset defined in the json file and then when needed the app will just pull from the local files.

First off, is this the best approach and if it is, how should I implement this. AFNetworking, NSOperation Queues, NSURLSessionDownloadTask ?

I am reading through a ton of documentation but I'm not sure what's outdated and what's currently considered the best approach to this problem. I'd love it if I could find a nice clean example of this process or if someone could point me to a relevant tutorial on the topic.

Upvotes: 1

Views: 863

Answers (1)

nwales
nwales

Reputation: 3561

I ended up using background transfer service based on this tutorial. It seems to perform just what I needed

http://www.appcoda.com/background-transfer-service-ios7/

Upvotes: 1

Related Questions