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 添加即可


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

相关推荐
gavin carter13 天前
一台电脑管理多个cocoapods账号
xcode·cocoapods
明似水15 天前
解决 Ruby Gem “rexml“ 版本不兼容问题 (CocoaPods/Firebase 相关错误)
开发语言·ruby·cocoapods
守城小轩15 天前
Chromium 136 编译指南 macOS篇:Xcode安装与配置(二)
macos·xcode·策略模式
march of Time16 天前
go在for循环中使用errgroup和channel进行并发处理
开发语言·golang·xcode
YungFan18 天前
Xcode26新特性与iOS26适配指南
ios·xcode
survivorsfyh21 天前
Xcode 16 集成 cocoapods 报错
macos·xcode·cocoapods