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

Commit 84af139

Browse files
committed
readme change and bump version
1 parent 1183e28 commit 84af139

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ A React Native app is composed of a JavaScript bundle file, which is generated b
1010

1111
The CodePush plugin helps get product improvements in front of your end-users instantly, by keeping the JavaScript bundle 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. It's a win-win!
1212

13-
*Note: Any product changes which touch native code (e.g. modifying your `AppDelegate.m` file, adding a new plugin) cannot be distributed via CodePush, and therefore, must be updated via the appropriate store(s).*
13+
*Note: Any product changes which touch native code (e.g. modifying your `AppDelegate.m`/`MainActivity.java` file, adding a new plugin) cannot be distributed via CodePush, and therefore, must be updated via the appropriate store(s).*
1414

1515
## Supported React Native platforms
1616

@@ -175,7 +175,7 @@ If an update is available, it will be silently downloaded, and installed the nex
175175
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:
176176
177177
1. Execute `react-native bundle` in order to generate the updated JS bundle for your app.
178-
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).
178+
2. Execute `code-push release <appName> <jsBundleFilePath> <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, `<jsBundleFilePath>` could be `iOS/main.jsbundle` for iOS, or `android/app/src/main/assets/index.android.jsbundle` for Android.
179179
180180
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. Additionally, for more information regarding the CLI and how the release (or promote) commands work, refer to it's [documentation](http://microsoft.github.io/code-push/docs/cli.html).
181181

android/app/src/main/java/com/microsoft/codepush/react/CodePush.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141

4242
public class CodePush {
4343

44+
private static int rollbackTimeout = 0;
4445
private boolean resumablePendingUpdateAvailable = false;
4546
private boolean didUpdate = false;
4647
private Timer timer;
@@ -88,6 +89,11 @@ public CodePush(String deploymentKey, Activity mainActivity) {
8889
}
8990

9091
checkForPendingUpdate(/*needsRestart*/ false);
92+
93+
if (0 != rollbackTimeout) {
94+
startRollbackTimer(rollbackTimeout);
95+
rollbackTimeout = 0;
96+
}
9197
}
9298

9399
public ReactPackage getReactPackage() {
@@ -185,9 +191,7 @@ private void initializeUpdateWithRollbackTimeout(int rollbackTimeout, boolean ne
185191
codePushNativeModule.loadBundle();
186192
}
187193

188-
if (0 != rollbackTimeout) {
189-
startRollbackTimer(rollbackTimeout);
190-
}
194+
CodePush.rollbackTimeout = rollbackTimeout;
191195
}
192196

193197
private boolean isFailedHash(String packageHash) {
@@ -282,7 +286,7 @@ private class CodePushNativeModule extends ReactContextBaseJavaModule {
282286
private void loadBundle() {
283287
Intent intent = mainActivity.getIntent();
284288
mainActivity.finish();
285-
mainActivity.startActivity(intent);
289+
applicationContext.startActivity(intent);
286290
}
287291

288292
@ReactMethod

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-code-push",
3-
"version": "1.2.1-beta",
3+
"version": "1.3.0-beta",
44
"description": "React Native plugin for the CodePush service",
55
"main": "CodePush.js",
66
"homepage": "https://microsoft.github.io/code-push",

0 commit comments

Comments
 (0)