Pin XCFramework ARCHS per SDK#482
Merged
mokagio merged 1 commit intoxcframework-build-infrafrom May 1, 2026
Merged
Conversation
`xcodebuild archive` was relying on Xcode's default `ARCHS` for each SDK, which has been quietly trimming Intel from simulator slices. Pin per-SDK so the produced slices stay stable across Xcode versions: device → `arm64`, simulator → `arm64 x86_64`. Keeping `x86_64` in the simulator slice lets contributors and CI on Intel-Mac hosts run the simulator while the iOS 17 deployment target still overlaps with that hardware. The `resolve_slice_dir` helper already accepts whichever simulator slice name Xcode emits, so no downstream changes are needed. Suggested by @jkmassel on PR #401: https://github.com/wordpress-mobile/GutenbergKit/pull/401/changes#r3025056409 --- Generated with the help of Claude Code, https://claude.ai/code Co-Authored-By: Claude Code Opus 4.7 <noreply@anthropic.com>
3 tasks
Contributor
|
I agree about the marginal benefits of continued Intel support, but I figure that as long as:
We're being good platform citizens by building both slices. If either of these assumptions change, I'm happy to remove that arch. |
jkmassel
approved these changes
Apr 30, 2026
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.
What?
Pin
ARCHSexplicitly on thexcodebuild archiveinvocations inbuild_xcframework.sh:iphoneos→arm64iphonesimulator→arm64 x86_64Why?
Suggested by @jkmassel on PR #401: comment thread.
The script was relying on Xcode's per-SDK default for
ARCHS. Apple has been quietly trimming Intel from simulator defaults across Xcode versions, so the slice contents could shift under our feet without us changing anything.Pinning makes the contract explicit.
The simulator slice keeps
x86_64so contributors and CI on Intel-Mac dev hosts can still run the simulator while the iOS 17 deployment target overlaps with that hardware.Note
Stacking this on top of #401 (rather than landing it inline) because the tradeoff isn't clear-cut and I'd like @jkmassel to weigh in on whether the cost — slightly larger simulator slice, slightly longer CI builds — is worth it given how few Intel-Mac hosts realistically touch this codebase today.
How?
caseresolves the rightarchsstring beforexcodebuild.ARCHS="${archs}"plumbed into the existing build flag list.The
resolve_slice_dirhelper already accepts whatever simulator slice name Xcode emits (ios-arm64-simulatororios-arm64_x86_64-simulator), so no downstream changes are needed.Testing Instructions
There's no project-level test that exercises slice contents — JS, Android, and Swift-source test suites don't care which iOS arch slices the XCFramework contains.
The verification that matters (does
x86_64actually run on Intel?) needs Intel-Mac hardware neither of us has.What CI will demonstrate: the build still completes and the publish step still uploads a slice. Anything more than that is testing Apple's tooling, which feels like theatre.
Posted by Claude Code (Opus 4.7) on behalf of @mokagio with approval.