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


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

相关推荐
秋雨梧桐叶落莳15 天前
iOS——QQ音乐仿写项目总结
学习·macos·ui·ios·mvc·objective-c·xcode
92year19 天前
Xcode 27 AI Agent 实测:苹果把 Claude、ChatGPT、Gemini 都塞进了 IDE
agent·ai编程·xcode·apple·wwdc
健了个平_2420 天前
iOS 27 适配笔记
ios·xcode·wwdc
邓小乐21 天前
Workaround: Xcode27 下载iOS 27.0 Simulator
ios·xcode
2601_9611940221 天前
27考研资料|百度网盘|夸克网盘
android·xml·考研·ios·iphone·xcode·webview
大熊猫侯佩21 天前
WWDC26 前瞻:苹果可能放出的“王炸”,不只是 Siri
xcode·swift·wwdc
pop_xiaoli24 天前
【iOS】通知传值实现
macos·ios·xcode
小宋10211 个月前
Mina Meeting Assistant 新手极速上手指南
ide·macos·ai·xcode·mina
欧阳天羲1 个月前
AI智能水枪完整开发攻略
人工智能·macos·xcode
会编程的土豆1 个月前
Go 语言匿名函数详解
c++·golang·xcode