Skip to content
This repository has been archived by the owner on Aug 19, 2024. It is now read-only.

Commit

Permalink
Replace App Store version with binary version in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandergoncharov committed Jun 18, 2019
1 parent 840f25f commit 6461b8a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ code-push release-cordova MyApp-ios ios
code-push release-cordova MyApp-Android android
```

*NOTE: When releasing updates to CodePush, you do not need to bump your app's version in the `config.xml` file, since you aren't modifying the app store version at all. You only need to bump this version when you upgrade Cordova and/or one of your plugins, at which point, you need to release an update to the native store(s). CodePush will automatically generate a "label" for each release you make (e.g. `v3`) in order to help identify it within your release history.*
*NOTE: When releasing updates to CodePush, you do not need to bump your app's version in the `config.xml` file, since you aren't modifying the binary version at all. You only need to bump this version when you upgrade Cordova and/or one of your plugins, at which point, you need to release an update to the native store(s). CodePush will automatically generate a "label" for each release you make (e.g. `v3`) in order to help identify it within your release history.*

The `release-cordova` command enables such a simple workflow because it understands the standard layout of a Cordova app, and therefore, can generate your update and know exactly which files to upload. Additionally, in order to support flexible release strategies, the `release-cordova` command exposes numerous optional parameters that let you customize how the update should be distributed to your end users (e.g. Which binary versions are compatible with it? Should the release be viewed as mandatory?).

Expand Down
4 changes: 2 additions & 2 deletions samples/advanced/www/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ var app = {
onDeviceReady: function () {
// Migrate data from older versions
window.codePush.getCurrentPackage(function (currentPackage) {
// getCurrentPackage returns null if no update was installed (app store version)
// getCurrentPackage returns null if no update was installed (binary version)
if (currentPackage && currentPackage.isFirstRun) {
// First run after an update, migrate data
if (currentPackage.appVersion === "1.0.0") {
// migrate data from store version to version 1.0.0
// migrate data from binary version to version 1.0.0
} else if (currentPackage.appVersion === "2.0.0") {
// migrate data to version 2.0.0
}
Expand Down
2 changes: 1 addition & 1 deletion src/android/CodePush.java
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ protected Void doInBackground(Void... params) {

private boolean execNotifyApplicationReady(CallbackContext callbackContext) {
if (this.codePushPackageManager.isBinaryFirstRun()) {
// Report first run of a store version app
// Report first run of a binary version app
this.codePushPackageManager.saveBinaryFirstRunFlag();
try {
String appVersion = Utilities.getAppVersionName(cordova.getActivity());
Expand Down
4 changes: 2 additions & 2 deletions src/ios/CodePush.m
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ - (void)handleUnconfirmedInstall:(BOOL)navigate {
CodePushPackageMetadata* currentMetadata = [CodePushPackageManager getCurrentPackageMetadata];
bool revertSuccess = (nil != currentMetadata && [self loadPackage:currentMetadata.localPath]);
if (!revertSuccess) {
/* first update failed, go back to store version */
/* first update failed, go back to binary version */
[self loadStoreVersion];
}
}
Expand All @@ -139,7 +139,7 @@ - (void)handleUnconfirmedInstall:(BOOL)navigate {
- (void)notifyApplicationReady:(CDVInvokedUrlCommand *)command {
[self.commandDelegate runInBackground:^{
if ([CodePushPackageManager isBinaryFirstRun]) {
// Report first run of a store version app
// Report first run of a binary version app
[CodePushPackageManager markBinaryFirstRunFlag];
NSString* appVersion = [Utilities getApplicationVersion];
NSString* deploymentKey = ((CDVViewController *)self.viewController).settings[DeploymentKeyPreference];
Expand Down

0 comments on commit 6461b8a

Please sign in to comment.