WWDC22 SALE: Save 50% on all my Swift books and bundles! >>

Storage of jpg & PDF

Forums > SwiftUI

Hi everyone, I have an app that will contain many small images and pdf's, what is the best way to store them so that they are available when the app is downloaded from the App Store. What is the best / easiest way to get the images / pdf's into the app initially?

Thanks for all your help

   

Typically there are several approaches and the best way depends on your use-case.

What is your eventual goal? Will there be only ever a fixed number of images and PDFs, or are you going to add more and make them available in the future? Are you clear about your requirements now, and the likely requirements of how your app might develop?

Deciding what your app will do now and in the future, will help determine a possible design direction.

If your app will have many images and PDFs, but will never add to them, then it might be best to include them with your app. (Take note of Apple's limits on app sizes when published to the App Store).

If your app will add more images and PDFs in the future, then consider having a separate web server providing the images and PDFs.

Or something between these two cases.

   

Hi, thanks for your help

I had contemplated how to deal with the images and pdf's, they will increase overtime, so I wondered if

I could store all the current images in the app, and release updates on say a quarterley basis

Give all the current images and allow the user to add aditional

A mixture of the 2

I had not considered a web server, and that seems a better solution

While prototyping I tried storing the images in the Assets, but this seems very clunky when there are many images

Thanks again

   

Save 50% in my Black Friday sale.

SAVE 50% To celebrate WWDC22, all our books and bundles are half price, so you can take your Swift knowledge further without spending big! Get the Swift Power Pack to build your iOS career faster, get the Swift Platform Pack to builds apps for macOS, watchOS, and beyond, or get the Swift Plus Pack to learn advanced design patterns, testing skills, and more.

Save 50% on all our books and bundles!

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.