升级Ventura与Xcode后Xcode项目无法归档求助
升级Ventura+Xcode后项目归档失败(AppAuth.framework找不到)解决方案
问题核心
升级MacOS Ventura和Xcode后,项目可正常运行构建,但归档时触发以下错误:
rsync: link_stat "/Users/macuser/Desktop/Rovespiere-capacitor/ios/App/../../../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AppAuth.framework" failed: No such file or directory (2) rsync error: some files could not be transferred (code 23) Command PhaseScriptExecution failed with a nonzero exit code
已尝试操作:
- 删除
Library/Developer/Xcode/DerivedData目录 - 确认AppAuth存在于Pods目录
- 已在Build Settings的Framework Search Paths中配置
${PODS_CONFIGURATION_BUILD_DIR}/AppAuth等路径
解决步骤
1. 彻底重置Pods依赖
在项目的ios目录下执行以下命令,完全清理并重新安装Pods:
pod deintegrate pod clean rm Podfile.lock pod install
若Podfile中指定了AppAuth版本,确认版本与当前Xcode兼容(比如~> 1.6.0及以上版本适配Ventura)。
2. 调整Pod target的Build Settings
打开Pods.xcodeproj,找到AppAuth target,修改以下配置:
- Build Settings → Build Options:将
Skip Install设置为NO(归档流程需要将框架打包到UninstalledProducts目录) - Deployment Target:确保与主项目的部署目标版本一致,避免版本不兼容导致的构建路径错误
3. 验证主项目的Embed脚本配置
进入主项目target的Build Phases → [CP] Embed Pods Frameworks,检查脚本中的路径变量:
- 确认
${BUILT_PRODUCTS_DIR}、${FRAMEWORKS_FOLDER_PATH}等系统变量未被错误修改 - 若脚本路径异常,可尝试删除该Build Phase,然后执行
pod install让CocoaPods重新生成脚本
4. 修正归档Scheme配置
- 点击Xcode顶部项目名称 → Edit Scheme
- 切换到Archive标签页,将Build Configuration设置为
Release - 勾选Use the Run action's build configuration,确保归档与运行使用一致的配置
5. 深度清理Xcode缓存
执行以下命令清空Xcode缓存并重启:
rm -rf ~/Library/Developer/Xcode/DerivedData rm -rf ~/Library/Caches/com.apple.dt.Xcode killall Xcode
重启后先执行Cmd+Shift+K清理Build Folder,再尝试归档
额外排查项
- 确认
Pods/AppAuth/AppAuth目录下存在完整的AppAuth.framework,若缺失则重新执行pod install - 检查主项目target的Frameworks, Libraries, and Embedded Content中,AppAuth.framework的状态为
Embed & Sign
内容的提问来源于stack exchange,提问作者SimonIoa
相关产品推荐
相关产品推荐

