From b79d0bd85df8ff03cff02e71d1e115f30ca15754 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 25 Feb 2026 22:30:40 -0500 Subject: [PATCH] Fix: normalize arm64 binary path after --arch arm64 build on native M2 host On Codemagic mac_mini_m2 with Xcode 16.4, xcrun swift build --arch arm64 outputs the binary to .build/release/ (native arch) instead of the expected .build/arm64-apple-macosx/release/. This caused 'Create universal app bundle' to fail with 'ERROR: Missing built binaries'. After the arm64 build, copy the binary (and Sparkle.framework, resource bundle) to the arch-specific path if not already there, so downstream steps find them at the expected location. --- codemagic.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/codemagic.yaml b/codemagic.yaml index 73394488d0d..6116baa2a66 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -1984,6 +1984,16 @@ workflows: unset TOOLCHAINS echo "Building arm64..." xcrun swift build -c release --package-path Desktop --arch arm64 + # On native arm64 host (M2), --arch arm64 outputs to .build/release/ not .build/arm64-apple-macosx/release/ + # Normalize to arch-specific path so downstream steps find the binary consistently + if [ -f "Desktop/.build/release/$BINARY_NAME" ] && [ ! -f "Desktop/.build/arm64-apple-macosx/release/$BINARY_NAME" ]; then + echo "Normalizing arm64 output to arch-specific path..." + mkdir -p "Desktop/.build/arm64-apple-macosx/release" + cp "Desktop/.build/release/$BINARY_NAME" "Desktop/.build/arm64-apple-macosx/release/$BINARY_NAME" + # Also copy Sparkle.framework and resource bundle if present + [ -d "Desktop/.build/release/Sparkle.framework" ] && cp -R "Desktop/.build/release/Sparkle.framework" "Desktop/.build/arm64-apple-macosx/release/" || true + [ -d "Desktop/.build/release/Omi Computer_Omi Computer.bundle" ] && cp -R "Desktop/.build/release/Omi Computer_Omi Computer.bundle" "Desktop/.build/arm64-apple-macosx/release/" || true + fi echo "Building x86_64..." xcrun swift build -c release --package-path Desktop --arch x86_64