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
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,18 +4,18 @@ This plugin provides client-side integration for the [CodePush service](https://
4
4
5
5
## How does it work?
6
6
7
-
A React Native app is composed of a `.jsbundle` file which is generated by the packager and then distributed as part of your app's binary (the `.ipa` or `.apk` file). Traditionally, in order to update any of the JavaScript code, you'd need to recompile and re-distribute the binary, which includes any review time for the respective store(s) you are publishing to.
7
+
A React Native app is composed of a `.jsbundle` file which is generated by the packager and distributed as part of your app's binary (the `.ipa` or `.apk` file). Traditionally, in order to update any of the JavaScript code, you'd need to recompile and re-distribute the binary, which includes any review time associated with the respective store(s) you are publishing to.
8
8
9
-
The CodePush plugin for React Native helps simplify and speed up the process of getting JavaScript changes to your end-users by synchronizing the `.jsbundle` file with updates you release to the CodePush server. This way, you get the benefit of an offline, mobile experience, as well as "web-like" agility of side-loading updates as soon as they are made available.
9
+
The CodePush plugin for React Native helps simplify and speed up the process of getting JavaScript changes to your end-users by keeping the `.jsbundle` file synchronized with updates that are released to the CodePush server. This way, your app gets the benefits of an offline mobile experience, as well as the "web-like" agility of side-loading updates as soon as they are available.
10
10
11
11
## Supported React Native platforms
12
12
13
13
- iOS
14
14
- Coming soon: Android (Try it out on [this branch](https://github.com/Microsoft/react-native-code-push/tree/first-check-in-for-android))
15
15
16
-
## Plugin Acquisition
16
+
## Getting Started
17
17
18
-
To get started, you first need to acquire the React Native CodePush plugin by running the following command within your app's root directory:
18
+
To get started, you first need to acquire the React Native CodePush plugin by running the following command from within your app's root directory:
19
19
20
20
```
21
21
npm install --save react-native-code-push
@@ -42,7 +42,7 @@ Add a new value, `$(SRCROOT)/../node_modules/react-native-code-push` and select
42
42
43
43
## Plugin Configuration
44
44
45
-
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 will "take control" of managing the current and all future versions. To do this, perform the following steps:
45
+
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:
46
46
47
47
1. Open up the `AppDelegate.m` file, and add an import statement for the CodePush headers:
48
48
@@ -92,14 +92,14 @@ The simplest way to do this is to perform the following in your app's root compo
92
92
CodePush.sync();
93
93
```
94
94
95
-
If an update is available, it will be silently downloaded, and installed the next time the app is restarted (either explicitly by the end-user or by the OS). This experience ensures the least invasive experience for your end-users. If you would like to display a confirmation dialog (an "active install"), or customize the update experience in any way, refer to the `sync` method's [API reference](#codepushsync) for information on how to tweak this default behavior.
95
+
If an update is available, it will be silently downloaded, and installed the next time the app is restarted (either explicitly by the end-user or by the OS), which ensures the least invasive experience for your end-users. If you would like to display a confirmation dialog (an "active install"), or customize the update experience in any way, refer to the `sync` method's [API reference](#codepushsync) for information on how to tweak this default behavior.
96
96
97
97
## Releasing code updates
98
98
99
99
Once your app has been configured and distributed to your users, and you've made some JS changes, it's time to release it to them instantly! To do this, run the following steps:
100
100
101
101
1. Execute `react-native bundle` in order to generate the JS bundle for your app.
102
-
2. Execute `code-push release <appName> ./ios/main.jsbundle <appVersion>` in order to publish the generated JS bundle to the server (assuming your CWD is the root directory of your React Native app).
102
+
2. Execute `code-push release <appName> ./ios/main.jsbundle <appVersion> --deploymentName <deploymentName>` in order to publish the generated JS bundle to the server (assuming your CWD is the root directory of your React Native app).
103
103
104
104
And that's it! For more information regarding the CodePush API, including the various options you can pass to the `sync` method, refer to the reference section below.
0 commit comments