I'm currently helping the popular macOS updater Sparkle to transition to SPM via a binary target. For those wanting to learn more about how I first tried compiling from source and the changes it involved, it's a good read about resource management in Swift 5.3.
Sparkle is currently distributed via Cocoapods, more specifically it unpacks a release artifact containing
Sparkle.framework, debug symbols and binaries that are required in maintaining one's own project with Sparkle.
It seems that after generating the XCFramework via
xcodebuild archive and
xcodebuild -create-xcframework, it's entirely possible to bundle almost anything into the XCFramework before zipping it and distributing it via SPM. As another forum thread shows, it's possible to manually copy the dSYM files from the XCArchive to the XCFramework. I've been able to more or less any imaginable file in my XCFramework as well (license, changelog, symbols, etc.), including the aforementioned binaries.
Now here come the questions:
- Is having other files in an XCFramework officially supported?
- What limitations are there on the files you can put inside an XCFramework?
- More generally, how should a repo such as Sparkle bundle such other required files going forward? Within the XCFramework or within the ZIP-file (alongside the XCFramework)?
I hope you'll be able to bring clarity to some of these questions :)