Xcode 15 相关问题修复方案总结(含 Creator 2.x, 3.x)

悲剧了,用的2.4.5版本,项目或者脚本修改后重新构建项目在Xcode中必报错,不管是完全构建还是只构建脚本,每次修改后只能把全部项目删除然后重新构建才能正常运行测试,这个要怎么破啊,求救

如果是因为每次构建引发的问题, 就可以试试将ios工程独立出去,修改ios工程使用的构建资源路径,

降级 xcode,用 xcode 15 以下的版本。

过一阵估计低于15构建出的包就不让提了

这是 xcode 15 的已知问题,如果 xcode 要做这种限制,那么他肯定要解决自己的已知问题啊。

https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#Linking

Linking
New Features
A new linker has been written to significantly speed up static linking. It’s the default for all macOS, iOS, tvOS and visionOS binaries and anyone using the “Mergeable Libraries” feature. The classic linker can still be explicitly requested using -ld64, and will be removed in a future release.  (108915312)

Known Issues
Binaries using symbols with a weak definition crash at runtime on iOS 14/macOS 12 or older. This impacts primarily C++ projects due to their extensive use of weak symbols. (114813650) (FB13097713)

Workaround: Bump the minimum deployment target to iOS 15, macOS 12, watchOS 8 or tvOS 15, or add -Wl,-ld_classic to the OTHER_LDFLAGS build setting.

Weak symbol imports are linked as non-weak imports, when used from LTO object files. (115521975) (FB13171424)

Workaround: Add -Wl,-weak_reference_mismatches,weak or -Wl,-ld_classic options to the OTHER_LDFLAGS build setting.

在 xcode 15.1 中修复了

https://developer.apple.com/documentation/xcode-release-notes/xcode-15_1-release-notes

Linking
Resolved Issues
Fixed: Binaries using symbols with a weak definition crash at runtime on iOS 14/macOS 12 or older. This impacts primarily C++ projects due to their extensive use of weak symbols. (114813650) (FB13097713)

Fixed: Weak symbol imports are linked as non-weak imports, when used from LTO object files. (115521975) (FB13171424)


1赞

Xcode15.4 ,cocos creator 3.7.3
启动崩溃,试了手动合并补丁,并没有用

感觉不是同一个崩溃问题。试试空工程是否也会出现?

我用根据cocos手册做的第一个2D项目,构建了iOS版本,没有遇到崩溃问题,可以正常运行,空的项目也没有问题

那你这个问题,是自己的项目中出现的了?能否剥离一个最小复现此问题的工程出来?
另外,可以尝试升级到 3.8.3 看看,是否最新的 3.8.3 上也依然有问题?如果没有,那么说明在新版本中有修复了。

刚试了用3.8.3是没有问题的,项目比较复杂,剥离不了一个最小复现此问题的工程,我之前用的Xcode14.2是没有问题的,刚升级Xcode15.4才遇到的问题

那有可能是3.8中有修复过这个问题,得查看看哪个pr修的了,明天我看看。

现在3.8.3稳定吗?我现在是3.7.3开发的,打包ios有一些问题,有UI操作未在主线程,我使用了fgui,引擎应该没有这个线程问题吧。我可能要排查fgui的问题

好的,3.7.3中我也遇到了这个问题,未在主线程中操作,麻烦把这两个问题都看下

你是xcode15吗?我是最新的Xcode

Xcode 15.4

我的也是,你有尝试过3.7.3的裸包有UI线程问题吗?,搞个简单的Ui界面

有的,这个问题一直没修复,不知道他们发现没

Issue 已建立。https://github.com/cocos/cocos-engine/issues/17346