react-native-code-push-expo-plugin
A plugin for use with Expo and react-native-code-push
Setup
- Copy the files from this repo and place them into your Expo app directory.
- Add the following to your Expo app config
- Adjust the plugin files as needed for your use case. This will not be a plug-and-play situation in most cases.
Plugin Installation for Expo (Android)
-
Open your Expo app config file (app.config.json or app.config.js instead of app.json).
-
Insert the following into the plugins section of your config (Don't duplicate configuration, if the './app.plugin' item already exists, simply add the android portion.). Create the plugins section if it doesn't already exist.
"plugins": [ [ './app.plugin', { android: { CodePushDeploymentKey: 'YOUR_ANDROID_CODE_PUSH_KEY', } } ] ]
-
Replace
YOUR_ANDROID_CODE_PUSH_KEY
with the Deployment key. -
Run
npx expo prebuild
to regenerate your native code with the codepush dependencies.
Plugin Installation for Expo (IOS)
React Native Code Push comes packaged with a plugin to automate some of the setup process:
-
Open your Expo app config file (app.config.json or app.config.js instead of app.json).
-
Insert the following into the plugins section of your config (Don't duplicate configuration, if the './app.plugin' item already exists, simply add the ios portion.). Create the plugins section if it doesn't already exist.
"plugins": [ [ './app.plugin', { ios: { CodePushDeploymentKey: 'YOUR_IOS_CODE_PUSH_KEY', }, } ] ]
-
Replace
YOUR_IOS_CODE_PUSH_KEY
with the Deployment key. -
Run
npx expo prebuild
to regenerate your native code with the codepush dependencies.