Xcode15升级适配问题记录

文章目录

近期把编译构建环境升级到Xcode15,在此统一记录遇到的问题跟解决方法

在iOS12及以下系统的设备上,Xcode15构建出的APP启动崩溃

崩溃报错如下。

bash 复制代码
Termination Description: DYLD, Library not loaded:
/System/Library/Frameworks/SwiftUI.framework/SwiftUI

解决方法就是在工程增加链接的参数:add the -weak_framework SwiftUI flag to the Other Linker Flags setting in the Build Settings tab

参考

https://stackoverflow.com/questions/57907817/dyld-library-not-loaded-swiftui-when-app-runs-on-ios-12-using-availableios-13

https://www.jianshu.com/p/26b431f93b61

https://medium.com/@liwp.stephen/solution-app-crash-on-ios-12-build-from-xcode-15-3e6123e31150

https://developer.apple.com/forums/thread/126506

https://github.com/rechsteiner/Parchment/issues/583

https://developer.apple.com/documentation/ios-ipados-release-notes/ios-13-release-notes

https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html#//apple_ref/doc/uid/20002378

https://blog.csdn.net/tongwei117/article/details/132860813

相关推荐
大熊猫侯佩2 天前
WWDC26:SwiftUI 8 的 @State 全新“懒加载”机制与最佳实践
性能优化·swiftui·observable·懒加载·state·swift宏·实例初始化
东坡肘子2 天前
WWDC 26:AI 帮你看完了,然后呢?-- 肘子的 Swift 周报 #140
人工智能·swiftui·swift
大熊猫侯佩5 天前
WWDC26 SwiftUI 进化之路:砸碎黑盒,彻底迎来开发自由!
ios·swiftui·swift
Fatbobman(东坡肘子)8 天前
WWDC 2026 初印象:符合预期,但更务实 -- 肘子的 Swift 周报 #139
人工智能·macos·ios·swiftui·swift·wwdc
大熊猫侯佩9 天前
WWDC26 全网首发:SwiftUI 8 “可重排序“操作符深度解析
ios·swiftui·swift
东坡肘子9 天前
WWDC 2026 初印象:符合预期,但更务实 -- 肘子的 Swift 周报 #139
人工智能·swiftui·swift
大熊猫侯佩12 天前
WWDC26 前瞻:告别野蛮生长,SwiftUI 即将迎来的「工业级」进化
swiftui·swift·wwdc
东坡肘子16 天前
稳定 > 新功能 -- 肘子的 Swift 周报 #138
人工智能·swiftui·swift