随着16.0体系正式发布,最近升级xcode14以调试16.0的真机。升级乐成后,发现调试11.x和12.x固件的iphone,运行app直接瓦解了,启动不了。
瓦解日记如下:
dyld: Library not loaded: /usr/lib/swift/libswiftCoreGraphics.dylibReferenced from: /var/containers/Bundle/Application/xxx/xxxxxxx.app/xxxxxxxReason: image not found 看字面上的意思是加载libswiftCoreGraphics动态库失败了,没有找到该库的文件。
这个库属于体系库,由于项目接纳了OC+Swift混编,以是必要依赖。
上网查找类似的标题,试了常见的办理方案如下:
Apps built with Xcode 13 or Xcode 13.1 that make use of Swift Concurrency features (such as async/await), deploy to iOS prior to 15, tvOS prior to 15, or watchOS prior to 8, and have bitcode enabled may crash at launch with an error reporting that the libswift_Concurrency.dylib library was not loaded.
Workaround: Add -Wl,-weak-lswift_Concurrency -Wl,-rpath,/usr/lib/swift to Other Linker Flags in the app’s build settings.