Problem when trying to play (with MPMoviePlayerViewController) a video/song that I downloaded and stored in a file?

I came across this very same problem today.

I came across this very same problem today. It seems that iOS won't load any media files that have the wrong file extension. IMHO this is pretty stupid behavior, as I'm storing my media files with random names (UUIDs).

A quick workaround was to use the following code to create a symlink to the original file and give it the correct extension. Now iOS will happily load the file. // Create a symlink for iOS as it won't load any files with the wrong extension NSString *fixedFileName = fileName stringByAppendingString:@".

Mp4"; NSFileManager defaultManager createSymbolicLinkAtPath:fixedFileName withDestinationPath:fileName error:NULL; Hope that helps. We simply ignore the fact that an error occurred, in case the symlink already exists.

That's a good way to handle it thanks :) Anyway, this App is now delivered so I just saved the files with their extensions. – Zoleas Aug 18 at 14:00 Personally I think it's just plain stupid from Apple to rely on the extension of a file to determine it's content type. ;) – badcat Aug 21 at 8:54.

Someone found what causes the problem. The file name has no extension (like . Mp4) so the MPMovieController doesn't try to read it (that sounds crazy to me -_- ).

If I manually had . Mp4 to my video file. The app can read it... I'm gonna append the extension of each file to its name.

Thanks anyway :).

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions