fix: build Universal Binary for Intel CPU support#9
Conversation
The project was only building for arm64 (Apple Silicon), making it unusable on Intel Macs. Add ARCHS="arm64 x86_64" to both project.yml and the CI workflow to produce a Universal Binary. Closes #7
There was a problem hiding this comment.
Pull request overview
This PR ensures the macOS app builds as a Universal Binary so it runs natively on both Intel (x86_64) and Apple Silicon (arm64) Macs, addressing Intel incompatibility reported in #7.
Changes:
- Added an explicit
ARCHS: "arm64 x86_64"build setting inproject.yml. - Updated the GitHub Actions workflow build step to invoke
xcodebuildwithARCHS="arm64 x86_64".
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
project.yml |
Sets project-wide architectures to produce a universal macOS build. |
.github/workflows/build.yml |
Forces universal-arch build in CI via xcodebuild arguments. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| SWIFT_VERSION: "5.9" | ||
| MACOSX_DEPLOYMENT_TARGET: "13.0" | ||
| ARCHS: "arm64 x86_64" | ||
| CODE_SIGN_IDENTITY: "-" | ||
| CODE_SIGN_STYLE: "Automatic" |
There was a problem hiding this comment.
Setting ARCHS at the global settings.base level applies to all configurations (including Debug), which can significantly slow local dev builds by always producing a universal binary. Consider scoping this to Release (or using XcodeGen per-config settings) so Debug can keep the default/active-arch behavior while Release produces the universal app.
| xcodebuild -project PureMac.xcodeproj \ | ||
| -scheme PureMac \ | ||
| -configuration Release \ | ||
| -derivedDataPath build \ | ||
| build \ | ||
| ARCHS="arm64 x86_64" \ | ||
| CODE_SIGN_IDENTITY="" \ | ||
| CODE_SIGNING_REQUIRED=NO \ |
There was a problem hiding this comment.
ARCHS is now set in project.yml, and the workflow also forces ARCHS on the command line. This duplication can drift over time; consider relying on the project setting (or alternatively removing it from project.yml and keeping CI as the single source of truth).
Summary
ARCHS: "arm64 x86_64"toproject.ymlbuild settingsARCHS="arm64 x86_64"to xcodebuildRoot Cause
The project had no explicit
ARCHSsetting, so Xcode defaulted to building only for the host architecture (arm64on Apple Silicon). Intel Mac users got an incompatible binary.Closes #7