I have a SwiftPM package that has a binary target pointing to a static XCFramework with a binary for macOS x86_64 and arm64 and one for iOS on arm64. If I set the destination to my iPhone, it builds successfully, but if the target is my Mac, it fails with a linker warning saying that it Could not find or use auto-linked library
, and later terminating because some symbols are undefined. This only happens when building through Xcode; when I try using swift build
, the build completes normally.
Xcode won’t link a SwiftPM package on macOS using a static library in an XCFramework.
Whoops, I completely forgot to add a link to the repository with the framework and the arguments I used to build it. https://github.com/literally-anything/Fast-DDS-Prebuild.git