Skip to content

Build for macOS 14 so the binary runs on macOS 14 and 15 - #46

Closed
mojila wants to merge 3 commits into
omlahore:mainfrom
mojila:fix/run-on-macos-14-and-newer
Closed

mojila wants to merge 3 commits into
omlahore:mainfrom
mojila:fix/run-on-macos-14-and-newer

Conversation

@mojila

@mojila mojila commented Oct 12, 2026 •

Copy link
Copy Markdown

What this fixes

The published 1.1.0 build (release tarball and the Homebrew bottle) crashes on every macOS older than 26, before main() even runs:

dyld[33157]: Library not loaded: /usr/lib/swift/libswift_DarwinFoundation1.dylib
  Referenced from: /opt/homebrew/Cellar/removemacai/1.1.0/bin/removemacai
  (built for macOS 26.0 which is newer than running OS)
Reason: tried: ... '/usr/lib/swift/libswift_DarwinFoundation1.dylib' (no such file, not in dyld cache)
[1]    33157 abort      removemacai

The binary's load command says it all:

LC_BUILD_VERSION  platform 1  minos 26.0  sdk 26.5

Because the deployment target is 26.0, the linker emits dependencies on Swift runtime libraries that only ship starting in macOS 26 (libswift_DarwinFoundation1.dylib, libswift_DarwinFoundation2.dylib). On macOS 14 and 15 they do not exist, so dyld aborts. The /opt/homebrew/opt/unixodbc path in the message is just a stray Homebrew rpath; none of the tried paths can exist on those systems.

This traces back to #70bf1af ("Build for macOS 26 so the app gets the current system design"), which changed exactly one line:

-  platforms: [.macOS(.v14)],
+  platforms: [.macOS("26.0")],

The premise behind that change is wrong: the new system design comes from building against the macOS 26 SDK, not from setting the deployment target to 26. Building with the 26 SDK and a lower minimum target keeps Liquid Glass on macOS 26 while letting the same binary run on macOS 14 and 15.

Changes

  • Package.swift — platforms: [.macOS("26.0")] → .macOS(.v14). The real crash fix; the SDK is still macOS 26.
  • Sources/removemacai/main.swift — the two hard runtime guards majorVersion >= 26 → >= 14. Even a correctly linked binary was refusing to run below 26.
  • tools/build-app.sh — LSMinimumSystemVersion 26.0 → 14.0 so the app bundle agrees with the binary.

Verified on macOS 15.8.1

Rebuilt and installed locally from this branch:

$ otool -l .../removemacai | grep -A3 LC_BUILD_VERSION
    minos 14.0
      sdk 26.2

$ otool -L .../removemacai | grep -i DarwinFoundation   # (no output)

$ removemacai selftest
all checks passed

$ removemacai --version
1.1.0

removemacai status also runs cleanly on 15.8.1.

Here is the app running on macOS 15.8.1 (built from this branch):

RemoveMacAI running on macOS 15.8.1

Notes

  • The catalog is already defensive about OS differences: Models.matching/Models.bytes skip asset sets this macOS does not describe, and tweaks carry a since: (major, minor) field, so 26-only entries are left alone rather than forced. A couple of Apple Intelligence entries (allowExternalIntelligenceIntegrations, Spatial Photos model sets) are 26-only and will show as skipped/unknown on 14–15. Happy to add per-feature since gating to the Apple Intelligence catalog as a follow-up if you want those hidden instead.
  • No destructive command (off, apply, clean) was run while verifying; only read-only status and selftest.
  • .github/workflows/* run on macos-26, so once this lands every new artifact will carry minos 14.0 and run back to Sonoma. The Homebrew formula pulls the prebuilt tarball, so it needs a new release (and bottle) to pick this up.

Summary by CodeRabbit

  • Compatibility
    • The app and command-line tool now support macOS 14 and later.

mojila added 2 commits October 12, 2026 17:48
The release was built with a macOS 26 deployment target, so the linker
made the executable depend on Swift runtime libraries that only exist on
macOS 26 (libswift_DarwinFoundation1.dylib and libswift_DarwinFoundation2.dylib).
On macOS 14 and 15 dyld cannot find them and the process aborts before
main() runs:

  dyld: Library not loaded: /usr/lib/swift/libswift_DarwinFoundation1.dylib
    Referenced from: .../removemacai (built for macOS 26.0 which is newer than running OS)

The new system design comes from building against the macOS 26 SDK, not
from setting the deployment target to 26, so lower the target back to 14
and keep the 26 SDK. The runtime guards and the app bundle's
LSMinimumSystemVersion are lowered to match.

Fixes running on macOS 14 (Sonoma) and macOS 15 (Sequoia).
@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cb2fb8d1-ea2c-4b5c-9d56-5eb6442ad9b9

📥 Commits

Reviewing files that changed from the base of the PR and between 3747c53 and 12b1cee.


📒 Files selected for processing (3)
  • Package.swift
  • Sources/removemacai/main.swift
  • tools/build-app.sh

 _________________________________________________
< Code Wars Episode II: Attack of the Git Clones. >
 -------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0411b299-b414-4ddb-9a77-a98d70c170e1

📥 Commits

Reviewing files that changed from the base of the PR and between e0d3fae and 3747c53.


⛔ Files ignored due to path filters (1)
  • docs/pr/macos15-overview.png is excluded by !**/*.png

📒 Files selected for processing (3)
  • Package.swift
  • Sources/removemacai/main.swift
  • tools/build-app.sh

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.



📝 Walkthrough
📝 Walkthrough

Walkthrough

The package, app-launch and CLI version guards, and generated app metadata now set macOS 14 as the minimum version. The CLI continues to allow selftest on earlier macOS versions.

Changes

macOS Minimum Version

Layer / File(s) Summary
Set minimum supported version
Package.swift, Sources/removemacai/main.swift, tools/build-app.sh
The package declaration, app-launch and CLI guards, and generated app metadata now use macOS 14 as the minimum version. The CLI guard still exempts selftest.

Priority: ➖ Normal

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Suggested reviewers: omlahore


Merge Risk: ⚪ Minimal · up to 3747c

The app and CLI now accept macOS 14. The inspected startup and optional-service paths revealed no actionable compatibility blocker, so no merge-blocking risk is evident.

Pre-merge checks | Passed 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: lowering the macOS deployment target to macOS 14 so the binary runs on macOS 14 and 15.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Apple Intelligence starts at macOS 15, so there is nothing to remove on 14.
Raise the deployment target, the runtime guards and the app bundle's
LSMinimumSystemVersion to 15.
@mojila

mojila commented Oct 12, 2026

Copy link
Copy Markdown
Author

Superseded by #47. Apple Intelligence starts at macOS 15, so the floor is 15 rather than 14. Closing this in favor of the correctly-scoped PR.

@mojila mojila closed this Oct 12, 2026
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