Add Mac App Store distribution scaffolding#29
Open
msollami wants to merge 1 commit into
Open
Conversation
Make the Tauri notebook shippable to the Mac App Store by making the C engine sidecar self-contained and adding the MAS build configuration. - build-sidecar-appstore.sh: bundles the Homebrew dylibs (gmp, mpfr, pcre2, raylib and transitive deps) next to the sidecar, rewrites all install names to @rpath/@loader_path, adds rpaths, and ad-hoc re-signs. Verified free of /opt/homebrew references and runs self-contained with Homebrew unreachable. - Entitlements.plist: App Sandbox, application/team identifiers, and user-selected file read-write (notebook open/save). No network use. - tauri.appstore.conf.json: overlay config wiring entitlements, bundled frameworks, and the provisioning profile without affecting .dmg builds. - docs/appstore.md: end-to-end runbook and pitfalls. - Changelog note for the week of 2026-07-20.
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.
Summary
Makes the Tauri notebook (
frontend/) shippable to the Mac App Store (MAS). The core blocker was that the compiled C engine, spawned as a Tauri sidecar, linked Homebrew dylibs under/opt/homebrew— paths that don't exist on user machines and are disallowed under the App Sandbox that MAS mandates. This PR makes the sidecar self-contained and adds the MAS build config, entitlements, and a full runbook. Packaging only — no C-engine changes. arm64-only for now (universal is documented as future work).Changes
frontend/build-sidecar-appstore.sh— builds the engine, copies the sidecar, recursively bundles the four Homebrew dylibs (gmp, mpfr, pcre2, raylib; only transitive dep is mpfr→gmp) intosrc-tauri/binaries/libs/, rewrites all install names viainstall_name_tool(dylib IDs and sidecar loads →@rpath/…; inter-dylib refs →@loader_path/…), adds@executable_path/../Frameworksand@executable_path/libsrpaths, and ad-hoc re-signs. Self-verifies no/opt/homebrewpaths remain.frontend/src-tauri/Entitlements.plist— App Sandbox (mandatory),application-identifier/team-identifierplaceholders, andfiles.user-selected.read-write(the notebook opens/saves.lbfiles via the dialog plugin). No network entitlement — sidecar comms are local stdio only.frontend/src-tauri/tauri.appstore.conf.json— overlay config so normal.dmgbuilds are unaffected: setsbundle.macOS.entitlements,bundle.macOS.frameworks(bundled dylibs →Contents/Frameworks), andbundle.macOS.filesforembedded.provisionprofile. Base identifiercom.mathilda.notebookis already a real reverse-DNS id (no fix needed).docs/appstore.md— end-to-end runbook (enrollment, App ID, certs, provisioning profile, signed.app/.pkg, upload) plus common pitfalls.docs/spec/changelog/2026-07-20.md.Testing
Done & verified in this PR
build-sidecar-appstore.sh;otool -Lon the final sidecar and every bundled dylib shows no/opt/homebrewpaths (before/after below).Contents/MacOS+Contents/Frameworks) on/tmpand ran it with Homebrew scrubbed fromPATHandDYLD_*cleared (env -i).Series[Exp[x],{x,0,3}]andFactor[x^4-1]both returned correct pretty output over the stdio pipe protocol.binaries/is already gitignored so no build artifacts are committed.Before:
After (sidecar):
(
libmpfr.6.dylib→@loader_path/libgmp.10.dylib; system//usr/librefs intentionally left alone.)Requires your Apple Developer account (manual — cannot be done in-repo)
com.mathilda.notebook) + App Store Connect app record.frontend/src-tauri/embedded.provisionprofile.$IDENTIFIER/$TEAM_IDinEntitlements.plist.APPLE_SIGNING_IDENTITY=... npm run tauri build -- --bundles app --config src-tauri/tauri.appstore.conf.json),productbuildinto a signed.pkg, andaltool --upload-app.Full steps in
docs/appstore.md.Ticket
beads-planning-fes / App Store follow-up