Add script to build and publish the Darwin Swift SDK to GHCR#7059
Draft
JayShortway wants to merge 1 commit into
Draft
Add script to build and publish the Darwin Swift SDK to GHCR#7059JayShortway wants to merge 1 commit into
JayShortway wants to merge 1 commit into
Conversation
Co-authored-by: JayShortway <JayShortway@users.noreply.github.com>
Generated by 🚫 Danger |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Checklist
purchases-androidand hybridsMotivation
To cross-compile
RevenueCat/RevenueCatUIfor Apple platforms from Linux (e.g. Cursor cloud agents) via xtool, we need a Darwin Swift SDK extracted from Xcode. Since Xcode can't be redistributed and downloading it requires interactive Apple auth, this provides a maintainer-run script to produce that SDK once and publish it privately for reuse.Description
Adds
scripts/build-darwin-sdk.sh, which:Xcode.app, a provided.xip, or a version downloaded viaxcodesusing a pre-generatedFASTLANE_SESSIONto avoid interactive 2FA),xtool sdk buildto extract a redistributable Darwin Swift SDK.artifactbundle(target host arch configurable; defaults tox86_64to match cloud agents),oras, with version/arch/checksum annotations.The script header documents how to consume the artifact in a
.cursorenvironment Dockerfile (public base image + aRUN --mount=type=secretstep +swift sdk install), which is the Cursor-supported pattern — a privateFROMbase image is intentionally avoided since Cursor's builder has no documented way to authenticate a private base-image pull.Validated with
shellcheck(clean) and by exercising the argument-validation and dependency-check paths. The end-to-end build/push path requires Xcode +orasand was not run in CI.