Skip to content

Fix: use --arch instead of --triple for Swift universal build in Codemagic#5146

Merged
m13v merged 1 commit intomainfrom
fix/swift-build-arch
Feb 26, 2026
Merged

Fix: use --arch instead of --triple for Swift universal build in Codemagic#5146
m13v merged 1 commit intomainfrom
fix/swift-build-arch

Conversation

@m13v
Copy link
Copy Markdown
Contributor

@m13v m13v commented Feb 26, 2026

--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.

--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>
@m13v m13v merged commit a1632db into main Feb 26, 2026
2 checks passed
@m13v m13v deleted the fix/swift-build-arch branch February 26, 2026 03:02
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Feb 26, 2026

Greptile Summary

This 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.

  • Changed Swift build flags from --triple arm64-apple-macosx and --triple x86_64-apple-macosx to --arch arm64 and --arch x86_64
  • Ensures build outputs are consistently placed in .build/arm64-apple-macosx/release/ and .build/x86_64-apple-macosx/release/ regardless of host architecture
  • Resolves the "Missing built binaries" error in the universal app bundle creation step

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The change is minimal (2 lines), well-documented, and addresses a specific build failure. The --arch flag is the correct Swift build parameter and ensures consistent build output paths across different host architectures. No logic changes or potential side effects.
  • No files require special attention

Important Files Changed

Filename Overview
codemagic.yaml Replaced --triple with --arch flag for Swift builds to ensure consistent output paths across different host architectures

Last reviewed commit: b373d26

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant