I tested your code in a simulator. It works great in a simulator (IOS7). But when I launch on iPodTouch-5, it shows an error like what you mentioned. Spend more than 15 minutes, found and stupid mistake.
Getting the path as below ( Documentssample_audio.mp4) when I run on the device.
@"file:///var/mobile/Applications/A1E1D85F-0198-4A0C-80F8-222F0DA1C31A/Documentssample_audio.mp4"
so I changed the path as ..
NSString *documentsDirectory = [NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex: 0];
NSString *dstPath = [documentsDirectory stringByAppendingString:@"/sample_audio.mp4"];
Now I get the path as shown below ( /Documents/sample_audio.mp4) and it works fine. But I do not know how this happened.
@"file:///var/mobile/Applications/A1E1D85F-0198-4A0C-80F8-222F0DA1C31A/Documents/sample_audio.mp4"
source
share