打开文件权限出错
出现下面类似的提示信息
Error Domain=NSCocoaErrorDomain Code=257
"The file “xxx” couldn’t be opened because you don’t have permission to view it."
UserInfo={NSUserStringVariant=(
Folder
), NSURL=file:///xxxx, NSFilePath=/xxxx,
NSUnderlyingError=0x600000c8d470
{Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}
}

解决方法:把 entitlements 文件里的 App Sandbox 改成 NO
清理编译文件

网友评论