You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 20, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+10-11Lines changed: 10 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,9 @@
1
1
# React Native Module for CodePush
2
2
3
+
*Note: This README is only relevant to the latest version of our plugin. If you are using an older version, please switch to the relevant tag on [our GitHub repo](https://github.com/Microsoft/react-native-code-push) to view the docs for that particular version.*
This plugin provides client-side integration for the [CodePush service](http://codepush.tools), allowing you to easily add a dynamic update experience to your React Native app(s).
4
8
5
9
*[How does it work?](#how-does-it-work)
@@ -110,6 +114,8 @@ In order to accommodate as many developer preferences as possible, the CodePush
110
114
111
115
*Note: If you don't already have RNPM installed, you can do so by simply running `npm i -g rnpm` and then executing the above command. If you already have RNPM installed, make sure you have v1.9.0+ in order to benefit from this one step install.*
112
116
117
+
2. You will be prompted for the deployment key you'd like to use. If you don't already have it, you can retrieve this value by running `code-push deployment ls <appName> -k`, or you can choose to ignore it (by simply hitting `<ENTER>`) and add it in later. To get started, we would recommend just using your `Staging` deployment key, so that you can test out the CodePush end-to-end.
118
+
113
119
And that's it! Isn't RNPM awesome? :)
114
120
115
121
#### Plugin Installation (iOS - CocoaPods)
@@ -160,6 +166,8 @@ Add a new value, `$(SRCROOT)/../node_modules/react-native-code-push` and select
160
166
161
167
### Plugin Configuration (iOS)
162
168
169
+
*NOTE: If you used RNPM or `react-native link` to automatically link the plugin, these steps have already been done for you so you may skip this section.*
170
+
163
171
Once your Xcode project has been setup to build/link the CodePush plugin, you need to configure your app to consult CodePush for the location of your JS bundle, since it is responsible for synchronizing it with updates that are released to the CodePush server. To do this, perform the following steps:
164
172
165
173
1. Open up the `AppDelegate.m` file, and add an import statement for the CodePush headers:
@@ -230,15 +238,6 @@ In order to accommodate as many developer preferences as possible, the CodePush
230
238
231
239
2. If you're using RNPM >=1.6.0, you will be prompted for the deployment key you'd like to use. If you don't already have it, you can retreive this value by running `code-push deployment ls <appName> -k`, or you can choose to ignore it (by simply hitting `<ENTER>`) and add it in later. To get started, we would recommend just using your `Staging` deployment key, so that you can test out the CodePush end-to-end.
232
240
233
-
3. (Only needed in v1.8.0+ of the plugin) In your `android/app/build.gradle` file, add the `codepush.gradle` file as an additional build task definition underneath `react.gradle`:
And that's it for installation using RNPM! Continue below to the [Plugin Configuration](#plugin-configuration-android) section to complete the setup.
243
242
244
243
#### Plugin Installation (Android - Manual)
@@ -260,7 +259,7 @@ And that's it for installation using RNPM! Continue below to the [Plugin Configu
260
259
}
261
260
```
262
261
263
-
3. (Only needed in v1.8.0+ of the plugin) In your `android/app/build.gradle` file, add the `codepush.gradle` file as an additional build task definition underneath `react.gradle`:
262
+
3. In your `android/app/build.gradle` file, add the `codepush.gradle` file as an additional build task definition underneath `react.gradle`:
264
263
265
264
```gradle
266
265
...
@@ -271,7 +270,7 @@ And that's it for installation using RNPM! Continue below to the [Plugin Configu
271
270
272
271
### Plugin Configuration (Android)
273
272
274
-
*Note: If you are using an older version (<=1.9.0-beta) of the CodePush plugin, please refer to [these docs](https://github.com/Microsoft/react-native-code-push/tree/e717eb024fe9d1810ac21c40c097f7bc165ea5f1#plugin-configuration-android---react-native--v0180) instead.*
273
+
*NOTE: If you used RNPM or `react-native link` to automatically link the plugin, these steps have already been done for you so you may skip this section.*
275
274
276
275
After installing the plugin and syncing your Android Studio project with Gradle, you need to configure your app to consult CodePush for the location of your JS bundle, since it will "take control" of managing the current and all future versions. To do this:
0 commit comments