You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Unity导出iOS项目后Xcode归档时无法定位IL2CPP相关文件的问题求助

Unity导出iOS项目后Xcode归档时无法定位IL2CPP相关文件的问题求助

大家好,我们现在在macOS Sequoia 15.5系统上,使用Unity 2023.2.20f1和Xcode 16.4开发iOS平台的Unity项目。将项目从Unity导出到Xcode后,尝试归档(Archive)时,遇到了一系列chmod命令找不到指定文件的错误,具体错误信息如下:

chmod: /Users/MacUserName/Library/Developer/Xcode/DerivedData/Unity-iPhone-bbzoczqihurrglecppuekjecujtf/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/artifacts/arm64/buildstate/Il2CppOutputProject/IL2CPP/build/deploy_arm64/il2cpp: No such file or directory
chmod: /Users/MacUserName/Library/Developer/Xcode/DerivedData/Unity-iPhone-bbzoczqihurrglecppuekjecujtf/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/artifacts/arm64/buildstate/Il2CppOutputProject/IL2CPP/build/deploy_arm64/il2cpp-compile: No such file or directory
chmod: /Users/MacUserName/Library/Developer/Xcode/DerivedData/Unity-iPhone-bbzoczqihurrglecppuekjecujtf/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/artifacts/arm64/buildstate/Il2CppOutputProject/IL2CPP/build/deploy_arm64/bee_backend/mac-arm64/bee_backend: No such file or directory
chmod: /Users/MacUserName/Library/Developer/Xcode/DerivedData/Unity-iPhone-bbzoczqihurrglecppuekjecujtf/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/GameAssembly.build/Script-C62A2A42F32E085EF849CF0B.sh: line 27: /Users/MacUserName/Library/Developer/Xcode/DerivedData/Unity-iPhone-bbzoczqihurrglecppuekjecujtf/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/artifacts/arm64/buildstate/Il2CppOutputProject/IL2CPP/build/deploy_arm64/il2cpp: No such file or directory

问题复现步骤

  • 在Unity 2023.2.20f1中完成iOS平台的项目构建导出
  • 打开导出后的Xcode项目文件
  • 尝试执行归档(Archive)或常规构建(Build)操作,触发上述文件缺失错误

我们已经尝试过的解决方法

  • 在Unity构建设置中启用了Symlink Sources选项
  • 彻底清理了Xcode的DerivedData目录及其他缓存文件
  • 修改GameAssembly的运行脚本,手动指定IL2CPP项目的路径
  • 在Xcode构建前,手动将Unity生成的IL2CPP文件夹复制到指定的Xcode临时路径
  • 完全卸载并重装了Xcode和Unity
  • 为Xcode和Unity授予了系统的完全磁盘访问权限
  • 确认项目的所有路径中没有空格字符
  • 甚至重置了Mac系统,并测试了Xcode 16.2、16.3、16.4等多个版本,但问题依然存在

我们已经尝试了上述所有方案但都没有解决问题,有没有大佬遇到过类似的情况,或者能给我们一些新的排查方向?非常感谢大家的帮助!

内容来源于stack exchange

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.07 10:44:35