Patchbay
Sign inStart free trial

Configure your app

Patchbay speaks the open Expo Updates protocol, so you only change where expo-updates looks and which channel it asks for.

Expo (managed or prebuild)

// app.config.ts
export default {
  updates: {
    url: 'https://patchbay.sozenz.com/v1/apps/<app id>/manifest',
    requestHeaders: { 'expo-channel-name': 'production' },
  },
  runtimeVersion: { policy: 'appVersion' },
};

Your app id is on the app's page in the dashboard, along with this snippet already filled in.

EAS Build

EAS Build sets the expo-channel-name header from the channel of each build profile in eas.json, so you can leave requestHeaders out and keep one channel per profile:

// eas.json
{
  "build": {
    "production": { "channel": "production" },
    "preview":    { "channel": "staging" }
  }
}

Keep updates.url pointing at Patchbay. If the project used EAS Update before, the store build made with the Patchbay URL is the first one that gets updates from Patchbay; older builds keep using EAS Update until users upgrade.

Bare React Native

Set the same values natively. iOS, in ios/<App>/Supporting/Expo.plist:

<key>EXUpdatesURL</key>
<string>https://patchbay.sozenz.com/v1/apps/<app id>/manifest</string>
<key>EXUpdatesRequestHeaders</key>
<dict><key>expo-channel-name</key><string>production</string></dict>

Android, in android/app/src/main/AndroidManifest.xml inside <application>:

<meta-data android:name="expo.modules.updates.EXPO_UPDATE_URL"
  android:value="https://patchbay.sozenz.com/v1/apps/<app id>/manifest"/>
<meta-data android:name="expo.modules.updates.UPDATES_CONFIGURATION_REQUEST_HEADERS_KEY"
  android:value="{"expo-channel-name":"production"}"/>

Code signing

Patchbay doesn't sign updates per customer yet. Leave updates.codeSigningCertificate unset; a build that expects signed updates will reject unsigned ones. Updates travel over HTTPS and every file is checked against the hash in the manifest before it runs.

Checking the setup

Ask the update URL for a manifest the way a device would:

curl -i https://patchbay.sozenz.com/v1/apps/<app id>/manifest \
  -H 'expo-platform: ios' -H 'expo-runtime-version: 1.0.0' \
  -H 'expo-protocol-version: 1' -H 'expo-channel-name: production'

Before anything is published you get a noUpdateAvailable directive. After publishing, you get the manifest.