Learn Courses My Dashboard

How to download a few large files that the app depends on?

Hey folks! New to SwiftUI here :wave:

I’ve been trying to figure out how to download around 5-6 large files (totalling around 4.5GB) in-app after the user has installed the app.

I’m aware I could bundle them all inside the app but that’s not what I want here.

Since the app depends on those files, I’m curious what’s the best way to download those files on app launch and use them accordingly within the app.

Wouldn’t that be against the app store rules, if the app is not functional without some external download?

Not from what I read.

The recommended option is to prompt the user to download these assets upon first launch of the app. This keeps the app binary size independent of the Core ML models being deployed. Disclosing the size of the download to the user is extremely important as there could be data charges or storage impact that the user might not be comfortable with.

Source: GitHub - apple/ml-stable-diffusion: Stable Diffusion with Core ML on Apple Silicon

Then how would app’s like Call of Duty exist when it’s huge on downloading internally? I don’t personally know the answer btw.

I’d say it depends on the use case :slight_smile:

I guess why I’m trying to have it downloadable externally is because the downloadable file can potentially be replaced in future with a newer version without requiring an app update; and also offer multiple choices.

Just exploring the possible solutions before giving in.

1 Like

No it wouldn’t, haha as @ekraus0227 mentioned, I was gonna say Call of Duty does this too

So what exactly is the functionality you’re looking for?

You can have files download like download JSON at a certain point, but in the app, you’d have to make sure you only download them when you want, and not every time the app launches

You can host files somewhere on a server and then download them to your app and save them to the documents directory, for example, and then use them in the app

1 Like