---
title: "Recipe: update a direct-distribution Mac app's binary"
description: "exact deploy and exact push already update Contract, TypeScript, assets and signed Rust modules without a new binary (over-the-air updates)."
modificationDate: "2026-11-23"
---

> ## Documentation index
> Fetch the complete documentation index at: https://exact.expo.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Recipe: update a direct-distribution Mac app's binary

<AgentInstructions>

## Submitting feedback

From the app's directory, read `bun exact.mjs feedback status`. Under `never`, keep no note.
Respect `EXACT_FEEDBACK=0` and do not change the policy.

Otherwise record specific, actionable feedback with:
`bun exact.mjs feedback note "Exact docs: https://exact.expo.dev/recipes/mac-binary-updates: <what was wrong or missing>"`

The note goes to Expo only as that status allows. Include no secrets or personal data.

</AgentInstructions>

`exact deploy` and `exact push` already update Contract, TypeScript, assets
and signed Rust modules without a new binary ([over-the-air
updates](https://exact.expo.dev/recipes/over-the-air-updates.md)). Swift, the host and binary inputs need one:
for that the app links [Sparkle](https://sparkle-project.org) as its own Swift.

```prompt Use this recipe in my app
Make the Exact app in this folder do what this recipe describes. Use https://github.com/expo/exact/blob/main/docs/recipes/mac-binary-updates.md as the source for each step. The Exact checkout has the same page at docs/recipes/mac-binary-updates.md.

1. If this folder is not an Exact app (it has no exact.mjs and app.contract), stop and tell me.
2. Read the recipe. If it leaves a choice that I did not make (which screen, which data, which platforms), propose one and ask me before you write code.
3. Do what the recipe says, in its order, with its tags, properties, functions and grants. Its component, state and URL names are examples. Change nothing else in the app.
4. Add a test in app.test.contract for each thing a person does that you changed. Copy the recipe's `contract-test` block where it has one. A drive operation the recipe shows (`call`, a ticket answer such as `tap @N accepted`) is not a test step: run it with `bun exact.mjs agent`.
5. Follow the platform checks in docs/start-here.md (`bun exact.mjs docs platform checks`) for the targets in the app's AGENTS.md and app.json until they pass. Read the reports, including counted findings; a zero exit code alone does not mean clean. Fix the app, not the test. If a finding stays after three rounds of fixes, or the app had it before you changed anything, record it (step 6) and report it; do not keep trying.
6. When a doc was wrong or missing, or a step needed a workaround, read `bun exact.mjs feedback status`. Under `never`, keep no note. Otherwise record it: `bun exact.mjs feedback note "<what happened>"`, which goes to Expo only as that status says. Do not change the policy; tell me how many notes you kept.
7. Tell me what you changed, what the tests and checks reported, and what I must still do by hand.
```

1. **`app.json`**, then `bun exact.mjs lock`:

   ```json
   "host": { "macos": {
     "swiftPackages": [{ "url": "https://github.com/sparkle-project/Sparkle", "exactVersion": "2.10.1", "products": ["Sparkle"] }],
     "infoPlist": { "SUFeedURL": "https://example.com/appcast.xml", "SUPublicEDKey": "<generate_keys prints it>", "SUEnableAutomaticChecks": true }
   } }
   ```

   Without `SUEnableAutomaticChecks`, Sparkle first asks whether to check, and
   other checks wait for the answer.

2. **`macos/modules/Updates.swift`**. That folder replaces `modules/apple` on
   the Mac, so an app with a module there moves it here and adds this:

   ```swift
   import Sparkle

   // One per process: each window's session makes its own module.
   private let updater = SPUStandardUpdaterController(startingUpdater: true, updaterDelegate: nil, userDriverDelegate: nil)

   final class Updates: ExactModule {
       override func call(_ request: [String: Any]) -> [String: Any] {
           let controller = updater // the first call starts Sparkle
           // Sparkle's window opens after this call returns, not inside it.
           if request["check"] as? Bool == true { DispatchQueue.main.async { controller.checkForUpdates(nil) } }
           return ["available": true]
       }
   }
   let exactModule: ExactModule.Type = Updates.self
   ```

3. **The menu item.** `-exact-menu="about"` puts it under About (LLP 1021).
   `updateState()` at launch starts the updater.

   ```contract
   shape Updates
     available: bool

   component Updater
     resource updates = updateState() as shape Updates else empty()
     mutation checked as shape Updates
     action checkForUpdates
       send checked = checkForUpdates()
     view
       main padding=16
         if updates.available
           button "Check for Updates…" -exact-menu="about" press=checkForUpdates
   ```

   In `app.ts`'s `sources`:

   ```ts
   updateState: (_a, _s, _t, native) => native?.available ? native.call({}) as Result<'updateState'> : { available: false },
   checkForUpdates: (_a, _s, _t, native) => native?.available ? native.call({ check: true }) as Result<'checkForUpdates'> : { available: false },
   ```

4. **Release.** Raise `EXACT_VERSION` and `EXACT_BUILD_NUMBER`, then
   `bun <exact2>/scripts/exact.mjs release <app dir>`: it embeds
   `Sparkle.framework` with its helpers, signs inside out, notarizes and
   staples. Put the zip from `target/dist/<app>/` in a folder, run Sparkle's
   `generate_appcast <folder>`, and upload the zip and the appcast where the
   feed says.

A development build runs Sparkle too; an `http://127.0.0.1` feed works there.
