feat: distribute precompiled framework #5
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
We want to start distributing Amplitude-Swift as a precompiled package, which means compiling it with BUILD_LIBRARY_FOR_DISTRIBUTION (this enables compatibility with future swift compilers, which is why we still target the oldest supported version on macos-latest) and packaging it as an XCFramework. Most build systems will also want dependencies to conform to this as well.
This PR adds a script to create the xcframework, then add it as an artifact to our releases. Initially, this will only be picked up by Carthage builds. Once I can test with an actual release, I'll add an other option for SPM to just use the precompiled version.
Successful release dry run: https://github.com/amplitude/analytics-connector-ios/actions/runs/11512316382
Checklist