mirror of
https://github.com/zhigang1992/react-native-code-push.git
synced 2026-06-13 09:25:36 +08:00
Adding deployment key detail to Java sample
This commit is contained in:
@@ -125,7 +125,7 @@ NSURL *jsCodeLocation;
|
||||
|
||||
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 key for the `Staging` deployment for the `FooBar` app). You can retrieve this value by running `code-push deployment ls <appName> -k` 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 <appName> -k` in the CodePush CLI (the `-k` flag is necessary since keys aren't displayed by default) 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.
|
||||
|
||||

|
||||
|
||||
@@ -176,7 +176,8 @@ After installing the plugin and syncing your Android Studio project with Gradle,
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
...
|
||||
// 3. Initialize CodePush with your deployment key and an instance of your MainActivity.
|
||||
// 3. Initialize CodePush with your deployment key and an instance of your MainActivity. If you don't
|
||||
// already have it, you can run "code-push deployment ls <appName> -k" in order to retrieve your key.
|
||||
CodePush codePush = new CodePush("d73bf5d8-4fbd-4e55-a837-accd328a21ba", this, BuildConfig.DEBUG);
|
||||
...
|
||||
mReactInstanceManager = ReactInstanceManager.builder()
|
||||
@@ -239,7 +240,8 @@ After installing the plugin and syncing your Android Studio project with Gradle,
|
||||
|
||||
@Override
|
||||
protected List<ReactPackage> getPackages() {
|
||||
// 4. Instantiate an instance of the CodePush runtime, using the right deployment key
|
||||
// 4. Instantiate an instance of the CodePush runtime, using the right deployment key. If you don't
|
||||
// already have it, you can run "code-push deployment ls <appName> -k" to retrieve your key.
|
||||
this._codePush = new CodePush("0dsIDongIcoH0mqAmoR0CYb5FhBZNy1w4Bf-l", this, BuildConfig.DEBUG);
|
||||
|
||||
// 5. Add the CodePush package to the list of existing packages
|
||||
|
||||
Reference in New Issue
Block a user