TheNewBie
TheNewBie

Reputation: 105

How to store a set of images permanently in iOS app - Swift

I'm trying to make a manga reader app. I already have a manga reader site with all database and asset (PHP - MySQL). I really need an advise how to allow my iOS app user store the manga they want in their phone for offline use. My app doesn't allow user post anything. They just receive data.

Actually I have download some manga reader app but I don't understand how they provide those functions above.

Do they use Cloudkit or Parse? Or they just use JSON to get image links and save the image into Core Data. Thank you

Upvotes: 0

Views: 1743

Answers (1)

Nick Redfoot
Nick Redfoot

Reputation: 86

If you already have a backend with this data then I think setting up an api that your app hits to receive download links via JSON makes the most sense. From there you can either download the image and save to the app's sandbox or save the image directly to the user's camera roll.

Also you might want to check out a great pod for this kind of stuff called SDWebImage. It will download images asynchronously and cache them locally.

Some other good tutorials and links on image downloading:

http://natashatherobot.com/ios-how-to-download-images-asynchronously-make-uitableview-scroll-fast

How to save image to app sandbox

More info on caching images

Upvotes: 2

Related Questions