Hi, 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.
views:
371answers:
1
+1
A:
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.
Graham Lee
2010-04-01 15:08:39
Thanks, that helped a lot. Any Idea on implementing a progress view with that though?
Jessica
2010-04-01 17:39:59
You set a delegate object that gets notified when new data arrives. Update the progress view from there.
Graham Lee
2010-04-01 18:02:34
Ok, Going back to the NsURLConnection, if I link to a movie file on a server, when it downloads where is it stored, does it keep it's name it had on the server and can it then be referred to in code as being locally stored as if it was in the resources folder? Or is it not as simple as that.
Jessica
2010-04-01 19:00:56