Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit f0c93e5

Browse files
committed
update docs
1 parent 7af04c2 commit f0c93e5

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

README.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# React Native Module for CodePush
22

3+
*Note: This README is only relevant to the latest version of our plugin in source. If you are using an older version, please switch to the relevant tag to view the docs for that particular version.*
4+
5+
![Switching tags](https://cloud.githubusercontent.com/assets/8598682/17350832/ce0dec40-58de-11e6-9c8c-906bb114c34f.png)
6+
37
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).
48

59
* [How does it work?](#how-does-it-work)
@@ -110,6 +114,8 @@ In order to accommodate as many developer preferences as possible, the CodePush
110114
111115
*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.*
112116
117+
2. 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.
118+
113119
And that's it! Isn't RNPM awesome? :)
114120
115121
#### Plugin Installation (iOS - CocoaPods)
@@ -160,6 +166,8 @@ Add a new value, `$(SRCROOT)/../node_modules/react-native-code-push` and select
160166
161167
### Plugin Configuration (iOS)
162168
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+
163171
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:
164172
165173
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
230238
231239
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.
232240
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`:
234-
235-
```gradle
236-
...
237-
apply from: "../../node_modules/react-native/react.gradle"
238-
apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"
239-
...
240-
```
241-
242241
And that's it for installation using RNPM! Continue below to the [Plugin Configuration](#plugin-configuration-android) section to complete the setup.
243242
244243
#### Plugin Installation (Android - Manual)
@@ -260,7 +259,7 @@ And that's it for installation using RNPM! Continue below to the [Plugin Configu
260259
}
261260
```
262261
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`:
264263
265264
```gradle
266265
...
@@ -271,7 +270,7 @@ And that's it for installation using RNPM! Continue below to the [Plugin Configu
271270
272271
### Plugin Configuration (Android)
273272
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.*
275274
276275
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:
277276

0 commit comments

Comments
 (0)