Fix: use --arch instead of --triple for Swift universal build in Codemagic#5146
Merged
Fix: use --arch instead of --triple for Swift universal build in Codemagic#5146
Conversation
--triple arm64-apple-macosx on Xcode 16.4 (arm64 host) places the native binary in .build/release/ instead of .build/arm64-apple-macosx/release/, causing 'Missing built binaries' error. --arch arm64 reliably outputs to the arch-specific path. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
Greptile SummaryThis PR fixes a Swift build issue in the Codemagic CI/CD workflow where binaries were being placed in the wrong directory on Xcode 16.4 running on arm64 hosts.
Confidence Score: 5/5
Important Files Changed
Last reviewed commit: b373d26 |
Contributor
There was a problem hiding this comment.
Code Review
This pull request addresses a build failure in the Codemagic CI pipeline for the Swift macOS application. The change replaces the --triple flag with --arch for the swift build commands. This ensures build artifacts are placed in predictable, architecture-specific directories, which is necessary for the subsequent step that creates a universal binary. The fix is correct and effectively resolves the issue.
Glucksberg
pushed a commit
to Glucksberg/omi-local
that referenced
this pull request
Apr 28, 2026
…magic (BasedHardware#5146) `--triple arm64-apple-macosx` on Xcode 16.4 running on an arm64 host (mac_mini_m2) places the binary in `.build/release/` (native, non-arch-prefixed) instead of `.build/arm64-apple-macosx/release/`. This caused the "Create universal app bundle" step to fail immediately with "ERROR: Missing built binaries". **Fix**: Replace `--triple arch-apple-macosx` with `--arch arm64` / `--arch x86_64`, which reliably outputs to `.build/arm64-apple-macosx/release/` and `.build/x86_64-apple-macosx/release/` regardless of host architecture.
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.
--triple arm64-apple-macosxon Xcode 16.4 running on an arm64 host (mac_mini_m2) places the binary in.build/release/(native, non-arch-prefixed) instead of.build/arm64-apple-macosx/release/. This caused the "Create universal app bundle" step to fail immediately with "ERROR: Missing built binaries".Fix: Replace
--triple arch-apple-macosxwith--arch arm64/--arch x86_64, which reliably outputs to.build/arm64-apple-macosx/release/and.build/x86_64-apple-macosx/release/regardless of host architecture.