Skip to content

Add Apple Silicon (arm64) support#206

Open
gjohnhazel wants to merge 1 commit into
Mortennn:masterfrom
gjohnhazel:apple-silicon-support
Open

Add Apple Silicon (arm64) support#206
gjohnhazel wants to merge 1 commit into
Mortennn:masterfrom
gjohnhazel:apple-silicon-support

Conversation

@gjohnhazel

Copy link
Copy Markdown

Summary

Dozer did not run natively on Apple Silicon because Sparkle 1.26.0 had no ARM64 binary, and several dependencies had build issues with Xcode 16. This PR makes make build produce a universal (arm64 + x86_64) binary on Apple Silicon Macs.

Changes

  • Cartfile: Pin dependencies to last Carthage-compatible versions

    • Defaults ~> 4.2 (5.x+ dropped Carthage support)
    • Preferences ~> 2.2 (3.x+ dropped Carthage support)
    • Sparkle ~> 1.27 — 1.27.3 is the first release with ARM64 binaries; Sparkle 2.x cannot be built by Carthage because its Autoupdate command-line tool requires a valid code signing identity that Carthage does not provide
  • project.yml: Add ARCHS = "arm64 x86_64" and SUPPORTED_PLATFORMS = "macosx" to produce a universal binary; fix /usr/local/bin/swiftgen/opt/homebrew/bin/swiftgen for Apple Silicon Homebrew; add Dozer/Other/Generated as explicit source so XcodeGen includes SwiftGen output (which is gitignored)

  • Makefile: Replace carthage bootstrap with a two-step process that patches dependency xcodeproj files before building, working around Xcode 16 removing libarclite for deployment targets below 10.12 (affects MASShortcut and Preferences). Also automates downloading the pre-built Sparkle binary and fixing its framework symlinks after tar extraction.

  • Scripts/Swiftlint.sh: Use full /opt/homebrew/bin/swiftlint path (Xcode's build environment does not include /opt/homebrew/bin); add --lenient to avoid build failures from pre-existing identifier naming violations in IBOutlets.

Test plan

  • make build completes without errors on Apple Silicon
  • lipo -info Dozer.app/Contents/MacOS/Dozer reports x86_64 arm64
  • App launches and hides/shows menu bar icons correctly on Apple Silicon
  • Existing Intel Mac builds still work

🤖 Generated with Claude Code

- Pin Carthage dependencies to last versions with Carthage support:
  Defaults ~> 4.2, Preferences ~> 2.2, Sparkle ~> 1.27 (1.27.3 is
  the first release with ARM64 binaries; 2.x cannot be built by
  Carthage due to a code-signing issue with the Autoupdate tool)

- Add ARCHS = "arm64 x86_64" and SUPPORTED_PLATFORMS = "macosx" to
  project.yml so XcodeGen produces a universal binary target

- Update Makefile to automate Xcode 16 compatibility patches on
  carthage checkouts (libarclite was removed for deployment targets
  < 10.12, affecting MASShortcut and Preferences), and to download
  the pre-built Sparkle binary directly from GitHub releases

- Fix Homebrew tool paths for Apple Silicon (/opt/homebrew/bin
  instead of /usr/local/bin) in project.yml and Scripts/Swiftlint.sh

- Add Dozer/Other/Generated as explicit XcodeGen source so
  SwiftGen-generated files are included despite being gitignored

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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