Skip to content

feat(mac): add a launcher script that installs and updates the app - #162

Open
riteshshukla04 wants to merge 1 commit into
callstackincubator:mainfrom
riteshshukla04:feat/mac-launcher-script
Open

riteshshukla04 wants to merge 1 commit into
callstackincubator:mainfrom
riteshshukla04:feat/mac-launcher-script

Conversation

@riteshshukla04

Copy link
Copy Markdown

Summary

Adds apps/mac/scripts/mobile-dev.sh, a launcher for the standalone Mac app, and a README paragraph on installing it as a mobile-dev command.

  • App missing: it downloads the latest stable release's mobile-dev-<version>-mac-app-darwin-arm64.zip into /Applications, then opens the app.
  • App installed: it opens the app straight away, then checks for a newer release in the background and downloads it to ~/Library/Caches/com.callstack.mobile-dev/launcher/staged.
  • Next run: it installs the downloaded version only while the app is closed, so an open session is never quit or relaunched.

It follows the rules in MacAppRelease.swift: only stable vX.Y.Z tags whose Mac asset is uploaded, and a stable release replaces a prerelease of the same version. It uses only curl, ditto, plutil and lsappinfo, so it needs neither gh nor jq. MOBILE_DEV_APP overrides the install path.

Safety details:

  • A lock holds the process id, so a lock left by a killed download is replaced instead of blocking updates.
  • The old app is moved aside until the new one is in place and restored if the move fails.
  • A downloaded copy that isn't newer than the installed app is discarded.

Test plan

Run against a scratch install path (MOBILE_DEV_APP) on macOS 27 with releases 0.1.200 and 0.1.201:

  • No app installed: installs 0.1.201 and opens it.
  • 0.1.200 installed: opens immediately (0.05 s); 0.1.201 is downloaded in the background; the app's process is unchanged.
  • Run again while open: nothing is replaced.
  • Quit, run again: prints Updated Mobile Dev 0.1.200 to 0.1.201 and opens 0.1.201.
  • Lock left by a dead process: replaced, and the update still installs.
  • Background download killed mid-way: the next run finishes the download.
  • Downloaded copy older than the installed app: discarded.
  • Version comparison, including 0.1.10 vs 0.1.9 and a stable release over -beta builds.
  • shellcheck clean.

🤖 Generated with Claude Code

apps/mac/scripts/mobile-dev.sh installs the latest Mac app release when it
is missing and opens it. After opening, it downloads a newer stable release
in the background, using the same rules as the app's update check, and
installs it on the next run while the app is closed, so an open session is
never quit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Dec 4, 2026

Copy link
Copy Markdown

@riteshshukla04 is attempting to deploy a commit to the Margelo Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
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