Error Domain=AVFoundationErrorDomain Code=-11800
“The operation could not be completed”
xxxxx
Error Domain=AVFoundationErrorDomain Code=-11800 “The operation could not be completed” UserInfo={AVErrorRecordingSuccessfullyFinishedKey=false, NSLocalizedFailureReason=An unknown error occurred (20), NSUnderlyingError=0x17004d740 {Error Domain=NSPOSIXErrorDomain Code=20 “Not a directory”}, NSLocalizedDescription=The operation could not be completed}
文件地址有误,之前通过
[NSHomeDirectory() stringByAppendingPathComponent:@"Documents/camera_movie"];
获取沙盒Documents目录,想要将录制的存放在对应路径下。但是一直报-11800 错误。
但是在不断尝试之后,发现改文件名是没有用的,主要是文件路径问题,有一种方案能够解决当前问题,就只把视频文件存放到沙盒目录下Library/Caches
文件中。
[[NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) firstObject] stringByAppendingPathComponent:@"camera_movie"];
文件路径就可以使用了file:///var/mobile/Containers/Data/Application/ADA3EA2F-D872-4E66-8371-01D66F4453CB/Library/Caches/camera_movie