Skip to content

Expo setup

Expo projects use @aetherpush/expo-code-push-plugin instead of editing native files by hand. The plugin applies the SDK’s native changes during expo prebuild. Check Expo requirements and limitations first.

Terminal window
npx expo install @aetherpush/expo-code-push-plugin @aetherpush/react-native-code-push

Add the plugin to your app config with your deployment keys (print them with aether deployment ls MyApp -k):

{
"expo": {
"plugins": [
[
"@aetherpush/expo-code-push-plugin",
{
"iosDeploymentKey": "your-ios-deployment-key",
"androidDeploymentKey": "your-android-deployment-key"
}
]
]
}
}
Prop Required Purpose
iosDeploymentKey yes Deployment key written to Info.plist.
androidDeploymentKey yes Deployment key written to strings.xml.
serverUrl no Alternative Aether server. Omitted, the SDK uses https://api.aetherpush.com/.
publicKey no PEM public key for code signing. Must contain BEGIN PUBLIC KEY.

serverPathMode is deliberately not a prop: it is a JavaScript option, so pass it to the SDK in code. The plugin fails prebuild if you try to set it here.

Terminal window
npx expo prebuild
npx expo run:ios
npx expo run:android

Wrap your root component with the codePush wrapper as in any React Native app.

On iOS it writes the configuration keys to Info.plist and points bundleURL() at CodePush.bundleURL() in release builds; debug builds keep loading from Metro. On Android it writes the keys to strings.xml, wires CodePush.getJSBundleFile() into bundle resolution, and applies the SDK’s codepush.gradle, which records the binary build time the SDK uses to detect new app builds.