Native Apple Silicon: migrate Carthage → Swift Package Manager, ship a universal binary - #209
Open
StealthWire wants to merge 1 commit into
Open
Conversation
…sal binary
The only published release (v4.0.0, 2019) ships an Intel-only (x86_64) binary,
so it runs on Apple Silicon only under Rosetta 2 — which Apple is removing.
Carthage also no longer builds cleanly on Apple Silicon with current Xcode
(libarclite removed, deprecated AppKit symbols, codesigning of Sparkle's helper
tools), making Dozer effectively unbuildable from a fresh clone.
This migrates all dependencies to Swift Package Manager so the project builds
natively on Apple Silicon with no manual patching, and produces a universal
(arm64 + x86_64) binary that runs natively on both Apple Silicon and Intel.
Dependencies:
- Defaults 4 -> 9: no source changes needed.
- Preferences -> Settings (renamed upstream): PreferencePane -> SettingsPane,
preferencePaneIdentifier -> paneIdentifier, PreferencesWindowController ->
SettingsWindowController, show(preferencePane:) -> show(pane:). The settings
window is now opened via a single AppDelegate.showPreferences() that calls
orderFrontRegardless(), because Settings' cooperative NSApp.activate() on
macOS 14+ does not reliably bring an accessory app's window to the front.
- Sparkle 1 -> 2: SUUpdater.shared() -> a shared SPUStandardUpdaterController
owned by AppDelegate. The EdDSA-signed, HTTPS appcast feed is unchanged.
- MASShortcut (unmaintained) -> KeyboardShortcuts: the recorder is created
programmatically and hosted in a plain NSView in General.xib, since
RecorderCocoa cannot be loaded from a nib. The global hotkey fires on
key-down to match MASShortcut's original behavior. Shortcuts saved by the
old MASShortcut integration are migrated on first launch (the legacy
"toggleMenuItems" {keyCode, modifierFlags} dictionary is converted to
KeyboardShortcuts' storage), so existing users keep their hotkey.
- LaunchAtLogin -> LaunchAtLogin-Legacy (SPM): same isEnabled API; embeds the
login-item helper via a build phase, keeping support for macOS < 13.
Project:
- Minimum macOS raised from 10.13 to 11 (Big Sur) so older Intel Macs are still
supported while the binary stays universal. This drops 10.13-10.15 users, so
it is a breaking change — release as a new major version.
- Dependencies are pinned to exact versions in project.yml (committed and
reviewable) — the SPM equivalent of the removed Cartfile.resolved.
- Remove Cartfile, Cartfile.resolved, the Carthage build scripts and the now
stale Brewfile.lock.json; update Brewfile, Makefile, README and CONTRIBUTING.
- .swiftlint.yml: use the current validates_start_with_lowercase syntax so the
lint phase passes on modern SwiftLint.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Considering that @Mortennn is not active in any of the 3 repos he created and didn't respond to any request in this repos since last release, I don't think it's useful to request to maintain this project. There is a fork https://github.com/callebtc/Dozer-X that updates this app (but drop support for older mac). Maybe you should consider to contribute to this fork? |
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.
Why
The only published release (v4.0.0, 2019) ships an Intel-only (x86_64) binary. On Apple Silicon it runs only under Rosetta 2 — which Apple is now phasing out, so Dozer is at risk of stopping working on future macOS. On top of that, Carthage no longer builds cleanly on Apple Silicon with current Xcode (
libarcliteremoved, deprecated AppKit symbols compiled as errors, Sparkle helper-tool codesigning), so the project is effectively unbuildable from a fresh clone today.This PR migrates all dependencies from Carthage → Swift Package Manager, so the project builds natively on Apple Silicon with no manual patching, and produces a universal (arm64 + x86_64) binary that runs natively on both Apple Silicon and Intel.
What changed
Cartfile,Cartfile.resolved, the Carthage build scripts (SignFrameworks.sh, the oldLaunchAtLogin.sh), and the staleBrewfile.lock.json; updatedBrewfile,Makefile,README,CONTRIBUTING.Dependency migration
PreferencePane→SettingsPane,PreferencesWindowController→SettingsWindowController,show(preferencePane:)→show(pane:).SUUpdater.shared()→ a sharedSPUStandardUpdaterControllerowned byAppDelegate. The EdDSA-signed, HTTPS appcast feed is unchanged.NSViewinGeneral.xib(RecorderCocoacan't be loaded from a nib). Hotkey fires on key-down to match the old behavior.isEnabledAPI; embeds the login-item helper via a build phase, keeping support for macOS < 13.Dependency versions are pinned exactly in
project.yml(committed and reviewable) — the SPM equivalent of the oldCartfile.resolved.Backward compatibility
toggleMenuItems{keyCode, modifierFlags}value into KeyboardShortcuts' storage (Cocoa→Carbon modifier conversion). Verified end-to-end (e.g. ⌥⌘D →carbonKeyCode 2, carbonModifiers 2304, legacy key cleaned up,isShortcutSetpreserved).Defaultskeys are unchanged, so other settings carry over untouched.Testing performed
x86_64 arm64) for the app, the Sparkle framework, and the login-item helper.Notes for the maintainer
appcast.xmlregenerated and re-signed with your EdDSA key — those are release-time steps and intentionally left to you.AppDelegate.showPreferences(), which callsorderFrontRegardless(). The Settings library uses the cooperativeNSApp.activate()on macOS 14+, which doesn't reliably front an accessory (menu-bar) app's window — this restores the always-on-top behavior.ENABLE_USER_SCRIPT_SANDBOXING: NOis set because LaunchAtLogin-Legacy's helper-copy build phase writes into the app bundle. It only affects build-time script phases, not the shipped app.🤖 Generated with Claude Code