Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed"

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值