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


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

相关推荐
2501_916007475 天前
从零开始学习iOS App开发:Xcode、Swift和发布到App Store完整教程
android·学习·ios·小程序·uni-app·iphone·xcode
大熊猫侯佩5 天前
Swift 6.2 列传(第一篇):主线 Actor 的 “独尊令”
xcode·actor·swift 6.2·数据竞争·mainactor·swift evolution·isolated
数据饕餮8 天前
faster-whisper热词详解与程序设计
ide·macos·xcode
说话的鲸鱼10 天前
‌Python+WhisperX:医疗语音识别的精准与高效实践
python·语音识别·xcode
旺仔大牛11 天前
Xcode垃圾清理
ide·macos·xcode
—Qeyser13 天前
Flutter网络请求Dio封装实战
网络·flutter·php·xcode·android-studio
黄毛火烧雪下17 天前
ruby 、gem 和 cocoapods的联系与区别
开发语言·ruby·cocoapods
咸鱼一号18 天前
记录我适配iOS26遇到的一些问题
xcode
QuantumLeap丶19 天前
《Flutter全栈开发实战指南:从零到高级》- 04 - Widget核心概念与生命周期
flutter·xcode
大熊猫侯佩21 天前
思过崖上学「 subprocess 」:令狐冲的 Swift 6.2 跨平台进程心法
spm·xcode·进程控制·platform·subprocess·output·swift 6.2