I figured out a workaround: Add a new “Copy Files” build phase to the target with the destination “Frameworks” with the following file /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-6.2/macosx/libswiftCompatibilitySpan.dylib That is, copying the libswiftCompatibilitySpan.dylib file manually into the “Frameworks” directory of the bundle. The bundle now loads on older OS versions like macOS 15. However, this workaround is not a good solution as it requires me to manually find the libswiftCompatibilitySpan.dylib file and ensure to keep its path updated in the Xcode project settings each time the toolchain is updated. Ideally, Xcode would recognize that libswiftCompatibilitySpan.dylib is linked using rpath and include the file in the “Frameworks” directory automatically. Maybe there is a build setting that I need to enable that would do this, but I could not find anything.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: