Sam
Sam

Reputation: 1353

iPhone SDK: Downloading large files from a server into the app's documents

I am building an app that plays multiple video files, But I would like to know How do you download a video file (100mb - 300mb) from a server into the application's documents so it can later be locally referred to in code? The reason I want this type of a set up in my app is that I don't want the app binary to be made unnecessarily large due to including videos some users may not want. Also does this violate any of apple's terms? Also would it be simple to implement a progress view with this kind of set up and if so how? Any help is appreciated.

Upvotes: 0

Views: 2092

Answers (1)

user23743
user23743

Reputation:

You can't download anything into the app bundle - it's read only. You'll need to download it to the documents folder. Make sure you only download huge files over wi-fi, or your app might be rejected for abusing the cellular network. As for the method, just use NSURLConnection.

Upvotes: 4

Related Questions