当前位置:   article > 正文

Xcode 15 (iOS17) 打包的项目在iOS 12系统上启动崩溃_xcode15 打包crash

xcode15 打包crash

xcode 15打包出来的项目在iOS 12 的系统上启动就崩溃,并且是在进入appdelegate 之前的编译阶段就崩溃了

1、Build Settings -> Other Linker Flags -> Add -> -ld64

其中“-ld64”可以有三个值“-Wl、-ld_classic、-ld64” 理论上需要设置 “-ld64”即可

附上官方社区回复:

“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.”

2、当这个时候设置之后,当debug 环境可以正常时候,切换到release 环境会继续崩溃,虽然报错是汇编代码,但是很明显是和之前的不一样

需要处理:Build Settings ->Asset Catalog Compiler-> Generate Swift Asset Symbol Framework Support,把SwiftUI去掉,(iOS 12 是还不支持 swiftUI 的,当时的UI框架应该是UIKit 和storyboard)

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Gausst松鼠会/article/detail/276784
推荐阅读
相关标签
  

闽ICP备14008679号