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

Commit d013935

Browse files
committed
Merge pull request #88 from Microsoft/doc_update
Adding detail around deployment key vs name
2 parents 466ff11 + 862d4dd commit d013935

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,17 @@ This change configures your app to always load the most recent version of your a
9494
9595
To let the CodePush runtime know which deployment it should query for updates against, perform the following steps:
9696
97-
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 <appName>` in the CodePush CLI, and copying the value of the `Deployment Key` column which corresponds to the deployment you want to use.
97+
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 <appName>` 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.
98+
99+
![Deployment list](https://cloud.githubusercontent.com/assets/116461/11601733/13011d5e-9a8a-11e5-9ce2-b100498ffb34.png)
100+
98101
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)
99102
100103
## Plugin Configuration - Android
101104
102105
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:
103106
104-
1. Update the `MainActivity.java` file to use CodePush.
107+
1. Update the `MainActivity.java` file to use CodePush via the following changes:
105108
106109
```java
107110
...
@@ -135,7 +138,7 @@ After installing the plugin and syncing your Android Studio project with Gradle,
135138
}
136139
```
137140
138-
2. Ensure that the versionName property in your `android/app/build.gradle` file is set to a semver compliant value.
141+
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")
139142
140143
```gradle
141144
android {
@@ -229,7 +232,7 @@ codePush.checkForUpdate()
229232
codePush.getCurrentPackage(): Promise<LocalPackage>;
230233
```
231234

232-
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.
235+
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.
233236

234237
This method returns a `Promise` which resolves to the `LocalPackage` instance that represents the currently running update.
235238

0 commit comments

Comments
 (0)