In my application, the user can record a video using the UIImagePickerController, and I need to save it to disk for later use. I've gotten the path out of the info dictionary and I'm going to save it to my documents directory, but the problem I'm having is that the URL passed in the dictionary is just that - a URL and not a file path. When I convert it to a string using absoluteString and pass that as the source path to my file manager, it fails saying the source file wasn't found.
Old Path: file://localhost/private/var/mobile/Applications/77B4D2B8-DE12-4643-82F0-2ECC948E4DBC/tmp/capture/capturedvideo.MOV
New Path: /var/mobile/Applications/77B4D2B8-DE12-4643-82F0-2ECC948E4DBC/Documents/video1.mov
There's got to be an easy way to convert my URL to something the file manager can handle. I'm guessing I can't just leave all the videos in the tmp directory, they must be saved to the documents directory if I want to keep them around right?
Also, this isn't really related, but how might I get a thumbnail of that video to show in a table view?