From 42a0c64394227086cb314280e03da5288907f395 Mon Sep 17 00:00:00 2001 From: Jonathan Carter Date: Fri, 4 Dec 2015 13:28:40 -0800 Subject: [PATCH 1/2] Adding detail around deployment key vs name --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index da90a2f..bc7ba71 100644 --- a/README.md +++ b/README.md @@ -94,14 +94,17 @@ This change configures your app to always load the most recent version of your a To let the CodePush runtime know which deployment it should query for updates against, perform the following steps: -1. Open your app's `Info.plist` and add a new `CodePushDeploymentKey` entry, whose value is the key of the deployment you want to configure this app against (e.g. the Staging deployment for FooBar app). You can retreive this value by running `code-push deployment ls ` in the CodePush CLI, and copying the value of the `Deployment Key` column which corresponds to the deployment you want to use. +1. Open your app's `Info.plist` file and add a new entry named `CodePushDeploymentKey`, whose value is the key of the deployment you want to configure this app against (e.g. the Staging deployment for FooBar app). You can retreive this value by running `code-push deployment ls ` in the CodePush CLI, and copying the value of the `Deployment Key` column which corresponds to the deployment you want to use (see below). Note that using the deployment's name (e.g. Staging) will not work. That "friendly name" is intended only for authenticated management usage from the CLI, and not for public consumption within your app. + + ![Deployment list](https://cloud.githubusercontent.com/assets/116461/11601733/13011d5e-9a8a-11e5-9ce2-b100498ffb34.png) + 2. In your app's `Info.plist` make sure your `CFBundleShortVersionString` value is a valid [semver](http://semver.org/) version (e.g. 1.0.0 not 1.0) ## Plugin Configuration - Android 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, perform the following steps: -1. Update the `MainActivity.java` file to use CodePush. +1. Update the `MainActivity.java` file to use CodePush via the following changes: ```java ... @@ -135,7 +138,7 @@ After installing the plugin and syncing your Android Studio project with Gradle, } ``` -2. Ensure that the versionName property in your `android/app/build.gradle` file is set to a semver compliant value. +2. Ensure that the `android.defaultConfig.versionName` property in your `android/app/build.gradle` file is set to a semver compliant value (i.e. "1.0.0" not "1.0") ```gradle android { From 862d4ddc32e7d42c0f8a8e699ebecac8b5288566 Mon Sep 17 00:00:00 2001 From: Jonathan Carter Date: Fri, 4 Dec 2015 14:19:14 -0800 Subject: [PATCH 2/2] Fixing ambiguity and typo --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bc7ba71..b8ba6a5 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ This change configures your app to always load the most recent version of your a To let the CodePush runtime know which deployment it should query for updates against, perform the following steps: -1. Open your app's `Info.plist` file and add a new entry named `CodePushDeploymentKey`, whose value is the key of the deployment you want to configure this app against (e.g. the Staging deployment for FooBar app). You can retreive this value by running `code-push deployment ls ` in the CodePush CLI, and copying the value of the `Deployment Key` column which corresponds to the deployment you want to use (see below). Note that using the deployment's name (e.g. Staging) will not work. That "friendly name" is intended only for authenticated management usage from the CLI, and not for public consumption within your app. +1. Open your app's `Info.plist` file and add a new entry named `CodePushDeploymentKey`, whose value is the key of the deployment you want to configure this app against (e.g. the key for the `Staging` deployment for the `FooBar` app). You can retrieve this value by running `code-push deployment ls ` in the CodePush CLI, and copying the value of the `Deployment Key` column which corresponds to the deployment you want to use (see below). Note that using the deployment's name (e.g. Staging) will not work. That "friendly name" is intended only for authenticated management usage from the CLI, and not for public consumption within your app. ![Deployment list](https://cloud.githubusercontent.com/assets/116461/11601733/13011d5e-9a8a-11e5-9ce2-b100498ffb34.png) @@ -232,7 +232,7 @@ codePush.checkForUpdate() codePush.getCurrentPackage(): Promise; ``` -Retreives the metadata about the currently installed "package" (e.g. description, installation time). This can be useful for scenarios such as displaying a "what's new?" dialog after an update has been applied. +Retrieves the metadata about the currently installed "package" (e.g. description, installation time). This can be useful for scenarios such as displaying a "what's new?" dialog after an update has been applied. This method returns a `Promise` which resolves to the `LocalPackage` instance that represents the currently running update.