MoccoDocs

Move to Mocco-hosted OTA

Mocco serves the Expo Updates protocol, so the app runs the stock expo-updates client. Moving is a new binary with a new update URL; updates can't move to an installed binary that still points elsewhere. Plan for both services to run until most users have the new binary.

From EAS Update

EAS Update already uses expo-updates, so the code stays the same.

EAS UpdateMocco
updates.url https://u.expo.dev/<project>the manifest URL from OTA updates → Hosted by Mocco (mocco ota init writes it)
eas update --channelmocco ota publish --channel (or the ota-publish action)
Channels and branchesChannels; a release is promoted between channels, never re-uploaded
Code signing (optional)Required: mocco ota init makes the key and certificate
eas update:rollbackRoll back (pre-signed, instant) or Roll back to embedded
Rollouts--rollout <percent> and the channel controls

Keep runtimeVersion as it is: Mocco serves updates per platform and runtime version, like EAS.

From App Center CodePush

CodePush needs a different client: replace react-native-code-push with expo-updates (npx install-expo-modules adds Expo modules to a bare app, then npx expo install expo-updates).

CodePushMocco
Deployment keys (Staging, Production)Channels in expo-channel-name; protect production
appcenter codepush release-reactmocco ota publish --channel staging
promote Staging ProductionPromote (an approval on a protected channel)
--rollout 20--rollout 20
--mandatory and installMode--mandatory; the app applies it at the next safe point
rollbackRoll back (instant, signed in advance)
Target binary version (--targetBinaryVersion)runtimeVersion (set it in app.json, e.g. the appVersion policy)

Remove the codePush() wrapper and its checkFrequency; expo-updates checks on launch by default.

Cut-over order

  1. Set up hosting (Host OTA updates on Mocco): the app, the certificate, channels and CI.

  2. Ship a binary built with the Mocco config. Keep publishing to the old service for older binaries.

  3. Publish each OTA release to both while the old binary is still in use. Mocco's adoption numbers show how many devices run the new binary's releases.

  4. When the old binary's share is negligible, stop publishing to the old service.