You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 20, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+8-34Lines changed: 8 additions & 34 deletions
Original file line number
Diff line number
Diff line change
@@ -297,12 +297,7 @@ After installing the plugin and syncing your Android Studio project with Gradle,
297
297
import com.microsoft.codepush.react.CodePush;
298
298
299
299
public class MainActivity extends ReactActivity {
300
-
// 2. Define a private field to hold the CodePush runtime instance
301
-
private CodePush _codePush;
302
-
303
-
...
304
-
305
-
// 3. Override the getJSBundleFile method in order to let
300
+
// 2. Override the getJSBundleFile method in order to let
306
301
// the CodePush runtime determine where to get the JS
307
302
// bundle location from on each app start
308
303
@Override
@@ -312,41 +307,20 @@ After installing the plugin and syncing your Android Studio project with Gradle,
312
307
313
308
@Override
314
309
protected List<ReactPackage> getPackages() {
315
-
// 4. Instantiate an instance of the CodePush runtime, using the right deployment key. If you don't
316
-
// already have it, you can run "code-push deployment ls <appName> -k" to retrieve your key.
317
-
this._codePush = new CodePush("0dsIDongIcoH0mqAmoR0CYb5FhBZNy1w4Bf-l", this, BuildConfig.DEBUG);
318
-
319
-
// 5. Add the CodePush package to the list of existing packages
310
+
// 3. Instantiate an instance of the CodePush runtime and add it to the list of
311
+
// existing packages, specifying the right deployment key. If you don't already
312
+
// have it, you can run "code-push deployment ls <appName> -k" to retrieve your key.
320
313
return Arrays.<ReactPackage>asList(
321
-
new MainReactPackage(), this._codePush.getReactPackage());
322
-
}
323
-
324
-
...
325
-
}
326
-
```
327
-
328
-
2. If you used RNPM to install/link the CodePush plugin, there are two additional changes you'll need to make due to the fact that RNPM makes some assumptions about 3rd party modules that we don't currently support. If you're not using RNPM then simply skip to step #3:
new CodePush("0dsIDongIcoH0mqAmoR0CYb5FhBZNy1w4Bf-l", this, BuildConfig.DEBUG)
343
316
);
344
317
}
318
+
345
319
...
346
320
}
347
321
```
348
322
349
-
3. Ensure that the `android.defaultConfig.versionName` property in your `android/app/build.gradle` file is set to a semver compliant value. Note that if the value provided is missing a patch version, the CodePush server will assume it is `0`, i.e. `1.0` will be treated as `1.0.0`.
323
+
2. Ensure that the `android.defaultConfig.versionName` property in your `android/app/build.gradle` file is set to a semver compliant value. Note that if the value provided is missing a patch version, the CodePush server will assume it is `0`, i.e. `1.0` will be treated as `1.0.0`.
0 commit comments