Words cannot describe how bad SPM is. For the future record, here are the big reasons:
- Xcode fails to find Swift Package Manager Binary Target dependency… FB8743041
This manifests as "cannot find module Clibsodium" or "Realm" or whatever.
- Xcode Swift Package Manager checkout retry has 0-second delay FB8742078
Xcode's built-in version of git/curl has bugs with pipelining, forcing us to replace it with another version to get ci to be more reliable.
- xcframework via Swift Package Manager both statically links to library and embeds it FB8721223
This requires us massaging the output build products because Xcode produces invalid binaries, which fail all the validation Apple does on App Store Connect upload and on Developer ID Notarization.
-----
In total, this means using SPM produces invalid builds, often fails to build correctly, and often fails to check out dependencies correctly. What a let-down.