error: Sandbox: rsync(17136) deny(1) file-write-create

基于 Xcode 16.2 新建工程项目并集成 cocoapods 后,pod install 安装三方 SDK 库后编译抛出如下异常错误

Tips: 关于 Xcode 16 集成 cocoapods 失败保存可跳转至该传送门

复制代码
error: Sandbox: rsync(17136) deny(1) file-write-create /Users/fyhsurvivors/Library/Developer/Xcode/DerivedData/CQChildrensHospital-galbvowskmnffaacxihcxibabkxx/Build/Products/Debug-iphonesimulator/CQChildrensHospital.app/Frameworks/MBProgressHUD.framework/_CodeSignature (in target 'CQChildrensHospital' from project 'CQChildrensHospital')
mkdir -p /Users/fyhsurvivors/Library/Developer/Xcode/DerivedData/CQChildrensHospital-galbvowskmnffaacxihcxibabkxx/Build/Products/Debug-iphonesimulator/CQChildrensHospital.app/Frameworks
rsync --delete -av --filter P .*.?????? --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "/Users/fyhsurvivors/Library/Developer/Xcode/DerivedData/CQChildrensHospital-galbvowskmnffaacxihcxibabkxx/Build/Products/Debug-iphonesimulator/MBProgressHUD/MBProgressHUD.framework" "/Users/fyhsurvivors/Library/Developer/Xcode/DerivedData/CQChildrensHospital-galbvowskmnffaacxihcxibabkxx/Build/Products/Debug-iphonesimulator/CQChildrensHospital.app/Frameworks"
Transfer starting: 5 files
rsync(17136): error: MBProgressHUD.framework/_CodeSignature/: mkpathat: Operation not permitted
rsync(17136): error: rsync_uploader
rsync(17136): error: rsync_receiver
rsync(17135): error: unexpected end of file
rsync(17135): error: io_read_nonblocking
rsync(17135): error: io_read_blocking
rsync(17135): error: io_read_flush
rsync(17135): error: rsync_sender
rsync(17135): warning: child 17136 exited with status 1

解决办法

修改如下两个配置后重新编译尝试即可

首先,将 User Script Sandboxing 置为 NO

PROJECT => Build Settings => Build Options => User Script Sandboxing

其次,将 App Transport Security Settings 中 Allow Arbitrary Loads 置为 YES

TARGETS => info => Custom iOS Target Properties => App Transport Security Settings => Allow Arbitrary Loads

若初始配置中无此项,直接 add 添加即可


以上便是此次分享的全部内容,希望能对大家有所帮助!

相关推荐
天堂罗恋歌1 小时前
CocoaPods 安装 Masonry 库时出现的网络连接问题处理
ios·iphone·xcode·cocoapods·app store
xo198820111 天前
Xcode 26 could not locate developer disk image for this device 无法定位开发者磁盘镜像
ide·macos·xcode
天堂罗恋歌2 天前
iOS PPBluetoothKit接入无法找到头文件问题
ios·objective-c·xcode·app store
2501_916013743 天前
iOS 开发指南全解析 从入门到应用上架、Xcode 使用教程、ipa 打包上传与 App Store 审核实战经验
android·macos·ios·小程序·uni-app·iphone·xcode
2501_915921433 天前
iOS 原生开发全流程解析,iOS 应用开发步骤、Xcode 开发环境配置、ipa 文件打包上传与 App Store 上架实战经验
android·macos·ios·小程序·uni-app·iphone·xcode
大熊猫侯佩10 天前
桃花岛 Xcode 构建秘籍:Swift 中的 “Feature Flags” 心法
app·xcode·swift
悄然林静10 天前
Mac终端执行`brew doctor`报`openssl@1.1`警告
mac·xcode·apple
权咚11 天前
阿权的开发经验小集
git·ios·xcode