Xcode15打包iOS 13以下安装崩溃修改,参考Xcode15 + iOS13崩溃中解决办法,主要是下面这几个,可以试试
build setting->other linker flags里面添加-ld64
使用 Cocoapods,还必须将 -Wl,-ld_classic 选项添加到 Pod 项目设置中的 OTHER_LDFLAGS中
iOS12崩溃,检查一下Asset Catalog Compiler这一项 Generate Swift Asset Symbol Framework Support,把SwiftUI去掉
其中CocoaPods添加方法如下:
need_otherlinkerflags_frameworks = ['XXX']
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['CODE_SIGN_IDENTITY'] = ''
if need_otherlinkerflags_frameworks.include?(target.name)
config.build_settings['OTHER_LDFLAGS'] = '-Wl,-weak-lswiftCoreGraphics, -ld_classic'
end
end
end
end