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


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

相关推荐
mobsmobs2 天前
Flutter开发环境搭建与工具链
android·flutter·ios·android studio·xcode
mobsmobs2 天前
Flutter之Widget体系与布局原理
android·flutter·xcode·dart
水木姚姚5 天前
图书管理软件iOS(iPhone)
macos·ios·iphone·xcode·swift
Keya9 天前
lipo 命令行指南
ios·xcode·swift
大熊猫侯佩11 天前
探秘 WWDC 25 全新 #Playground 宏:提升 Swift 开发效率的超级神器
xcode·swift·wwdc
bryceZh13 天前
Cursor/VScode+iOS开发工具链
ai编程·xcode·visual studio code
andyguo13 天前
语音识别的速度革命:从 Whisper 到 Whisper-CTranslate2,我经历了什么?
人工智能·学习·ai·whisper·语音识别·xcode·ai测评
阿里超级工程师17 天前
经验分享-没有xcode也可以上传App Store Connect
xcode·上传ipa
Keya18 天前
解决 pod install 警告信息显示不完全的方法
ios·xcode·cocoapods
杂雾无尘19 天前
开发者必看,全面解析应用更新策略,让用户无法拒绝你的应用更新!
ios·xcode·swift