我已将路径NSURL
作为NSString
存储到NSUserDefault
同时从NSUserDefault
检索NSUrl
,我得到NSURL
路径,如"file:///var/mobile/Containers/Data/Application/EB2E7DCD-5B73-4B0B-9BC5-6758AF75C68C/Documents/FinalVideo-958.mov"
但视频正在从这个链接显示....上面的路径来自 iphone 设备
Always use relative path same like below code.
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *myPathDocs = [documentsDirectory stringByAppendingPathComponent:@"FinalVideo-958.mov"];
if ([[NSFileManager defaultManager] fileExistsAtPath:myPathDocs])
{
NSLog(@"video file found.");
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.