Skip to content

Commit 2c17c4a

Browse files
authored
Merge pull request #6 from srcpush/fix/adjust-native-deps
Fix/adjust native deps
2 parents b1a074f + 79d6a49 commit 2c17c4a

117 files changed

Lines changed: 99 additions & 26901 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/ISSUE_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ What actually happens?
1616

1717
### Reproducible Demo
1818

19-
* Download https://github.com/microsoft/react-native-code-push/archive/master.zip and unzip. From `Examples` folder run `node create-app.js appName react-native@0.71.19 react-native-code-push@9.0.1` command to generate plain CodePushified React Native app. Please see description on top of `create-app.js` file content if needed
19+
* Download https://github.com/srcpush/react-native-code-push/archive/main.zip and unzip. From the `Examples` folder run `node create-app.js appName react-native@0.71.19 @srcpush/react-native-code-push@1.1.5` to generate a plain Source Push-enabled React Native app. See the description at the top of `create-app.js` if needed.
2020
* If you can't reproduce the bug on it, provide us as much info as possible about your project
2121

2222
### Environment
2323

24-
* react-native-code-push version:
24+
* @srcpush/react-native-code-push version:
2525
* react-native version:
2626
* iOS/Android/Windows version:
2727
* Does this reproduce on a debug build or release build?

LICENSE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
Microsoft CodePush Plugin for React Native
1+
Source Push React Native CodePush Plugin
22

3-
Copyright (c) Microsoft Corporation
3+
Copyright (c) Source Push
44

55
All rights reserved.
66

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#### [Sign up With Source Push](https://console.srcpush.com/register) to use Source Push SDK
1+
#### [Sign up with Source Push](https://srcpush.com/) to use the Source Push SDK
22

33
# React Native SDK for Source Push (CodePush compatible service)
44

@@ -14,7 +14,7 @@ This plugin provides client-side integration for the [Source Push service](https
1414
* [Android Setup](docs/setup-android.md)
1515
* [Plugin Usage](#plugin-usage)
1616
* [Releasing Updates](#releasing-updates)
17-
* [Migrate from Appcenter to Source Push](#migrate-from-appcenter)
17+
* [Migrate from App Center to Source Push](#migrate-from-appcenter)
1818
* [Continuous Integration / Delivery](#continuous-integration--delivery)
1919
* [Multi-Deployment Testing](#multi-deployment-testing)
2020
* [Android](docs/multi-deployment-testing-android.md)
@@ -34,9 +34,9 @@ This plugin provides client-side integration for the [Source Push service](https
3434

3535
A React Native app is composed of JavaScript files and any accompanying [images](https://reactnative.dev/docs/image), which are bundled together by the [metro bundler](https://github.com/facebook/metro) and distributed as part of a platform-specific binary (i.e. an `.ipa` or `.apk` file). Once the app is released, updating either the JavaScript code (e.g. making bug fixes, adding new features) or image assets, requires you to recompile and redistribute the entire binary, which of course, includes any review time associated with the store(s) you are publishing to.
3636

37-
The Source Push plugin helps get product improvements in front of your end users instantly, by keeping your JavaScript and images synchronized with updates you release to the Source Push server. This way, your app gets the benefits of an offline mobile experience, as well as the "web-like" agility of side-loading updates as soon as they are available. It's a win-win!
37+
The Source Push SDK helps get product improvements in front of your end users instantly, by keeping your JavaScript and images synchronized with updates you release to the Source Push service. This way, your app gets the benefits of an offline mobile experience, as well as the "web-like" agility of side-loading updates as soon as they are available. It's a win-win!
3838

39-
In order to ensure that your end users always have a functioning version of your app, the Source Push plugin maintains a copy of the previous update, so that in the event that you accidentally push an update which includes a crash, it can automatically roll back. This way, you can rest assured that your newfound release agility won't result in users becoming blocked before you have a chance to roll back on the server. It's a win-win-win!
39+
In order to ensure that your end users always have a functioning version of your app, the Source Push SDK maintains a copy of the previous update, so that in the event that you accidentally push an update which includes a crash, it can automatically roll back. This way, you can rest assured that your newfound release agility won't result in users becoming blocked before you have a chance to roll back on the server. It's a win-win-win!
4040

4141
*Note: Any product changes which touch native code (e.g. modifying your `AppDelegate.m`/`MainActivity.java` file, adding a new plugin) cannot be distributed via Source Push, and therefore, must be updated via the appropriate store(s).*
4242

@@ -45,11 +45,11 @@ In order to ensure that your end users always have a functioning version of your
4545
* iOS (7+)
4646
* Android (4.1+) on TLS 1.2 compatible devices
4747

48-
We try our best to maintain backwards compatibility of our plugin with previous versions of React Native, but due to the nature of the platform, and the existence of breaking changes between releases, it is possible that you need to use a specific version of the Source Push plugin in order to support the exact version of React Native you are using. The following table outlines which Source Push plugin versions officially support the respective React Native versions:
48+
We try our best to maintain backwards compatibility of our plugin with previous versions of React Native, but due to the nature of the platform, and the existence of breaking changes between releases, it is possible that you need to use a specific version of the Source Push SDK in order to support the exact version of React Native you are using. The following table outlines which Source Push SDK versions officially support the respective React Native versions:
4949

5050
| React Native version(s) | Supporting Source Push version(s) |
5151
|-------------------------|---------------------------------------------------------------------------------------------|
52-
| <v0.76 | Use [microsoft/code-push-react-native](https://github.com/microsoft/react-native-code-push) |
52+
| <v0.76 | Use [srcpush/react-native-code-push](https://github.com/srcpush/react-native-code-push) |
5353
| v0.76, v0.77, 0.78 | v1.0+ *(Support both New and Old Architectures)* |
5454

5555
We work hard to respond to new RN releases, but they do occasionally break us. We will update this chart with each RN release, so that users can check to see what our "official" support is.
@@ -101,7 +101,7 @@ Then continue with installing the native module
101101

102102
## Plugin Usage
103103

104-
With the Source Push plugin downloaded and linked, and your app asking Source Push where to get the right JS bundle from, the only thing left is to add the necessary code to your app to control the following policies:
104+
With the Source Push SDK downloaded and linked, and your app asking Source Push where to get the right JS bundle from, the only thing left is to add the necessary code to your app to control the following policies:
105105

106106
1. When (and how often) to check for an update? (for example app start, in response to clicking a button in a settings page, periodically at some fixed interval)
107107

@@ -160,7 +160,7 @@ The simplest way to do this is to "Source Push-ify" your app's root component. T
160160

161161
By default, CodePush will check for updates on every app start. If an update is available, it will be silently downloaded, and installed the next time the app is restarted (either explicitly by the end user or by the OS), which ensures the least invasive experience for your end users. If an available update is mandatory, then it will be installed immediately, ensuring that the end user gets it as soon as possible.
162162

163-
If you would like your app to discover updates more quickly, you can also choose to sync up with the CodePush server every time the app resumes from the background.
163+
If you would like your app to discover updates more quickly, you can also choose to sync up with the Source Push service every time the app resumes from the background.
164164

165165
* For class component
166166

@@ -217,7 +217,7 @@ If you would like to display an update confirmation dialog (an "active install")
217217
218218
## Releasing Updates
219219
220-
Once your app is configured and distributed to your users, and you have made some JS or asset changes, it's time to release them. The recommended way to release them is using the `release-react` command in the App Center CLI, which will bundle your JavaScript files, asset files, and release the update to the CodePush server.
220+
Once your app is configured and distributed to your users, and you have made some JS or asset changes, it's time to release them. The recommended way to release them is using the `release-react` command in the Source Push CLI, which will bundle your JavaScript files, asset files, and release the update to the Source Push service.
221221

222222
```shell
223223
npm install -g @srcpush/code-push-cli
@@ -253,15 +253,15 @@ srcpush release-react MyApp android --targetBinaryVersion "~1.1.0"
253253
254254
The CodePush client supports differential updates, so even though you are releasing your JS bundle and assets on every update, your end users will only actually download the files they need. The service handles this automatically so that you can focus on creating awesome apps, and we can worry about optimizing end user downloads.
255255
256-
For more details about how the `release-react` command works, as well as the various parameters it exposes, refer to the [CLI docs](https://github.com/srcpush/code-push-cli/blob/main/README.md). Additionally, if you would prefer to handle running the `react-native bundle` command yourself, and therefore, want an even more flexible solution than `release-react`, refer to the [`release` command](https://github.com/microsoft/code-push/tree/v3.0.1/cli#releasing-updates-general) for more details.
256+
For more details about how the `release-react` command works, as well as the various parameters it exposes, refer to the [CLI docs](https://github.com/srcpush/code-push-cli/blob/main/README.md). Additionally, if you would prefer to handle running the `react-native bundle` command yourself, and therefore, want an even more flexible solution than `release-react`, refer to the [`release` command](https://github.com/srcpush/code-push-cli#releasing-updates-general) for more details.
257257
258258
If you run into any issues, or have any questions/comments/feedback, [e-mail us](mailto:support@srcpush.com) and/or check out the [troubleshooting](#debugging--troubleshooting) details below.
259259
260260
*NOTE: CodePush updates should be tested in modes other than Debug mode. In Debug mode, React Native app always downloads JS bundle generated by packager, so JS bundle downloaded by CodePush does not apply.*
261261
262-
### Migrate from Appcenter to Source Push
262+
### Migrate from App Center to Source Push
263263
264-
Follow our [comprehensive guide](https://github.com/srcpush/code-push-cli/blob/main/README.md) that will help you migrate your applications from App Center.
264+
Follow our [comprehensive guide](https://docs.srcpush.com/) to migrate your applications from App Center.
265265
266266
### Continuous Integration / Delivery
267267
@@ -389,7 +389,7 @@ Now you'll be able to see CodePush logs in either debug or release mode, on both
389389
|-----------------|-------------------|
390390
| Compilation Error | Double-check that your version of React Native is [compatible](#supported-react-native-platforms) with the CodePush version you are using. |
391391
| Network timeout / hang when calling `sync` or `checkForUpdate` in the iOS Simulator | Try resetting the simulator by selecting the `Simulator -> Reset Content and Settings..` menu item, and then re-running your app. |
392-
| Server responds with a `404` when calling `sync` or `checkForUpdate` | Double-check that the deployment key you added to your `Info.plist` (iOS), `build.gradle` (Android) or that you're passing to `sync`/`checkForUpdate`, is in fact correct. You can run `appcenter codepush deployment list <ownerName>/<appName> --displayKeys` to view the correct keys for your app deployments. |
392+
| Server responds with a `404` when calling `sync` or `checkForUpdate` | Double-check that the deployment key you added to your `Info.plist` (iOS), `build.gradle` (Android) or that you're passing to `sync`/`checkForUpdate`, is in fact correct. You can run `srcpush deployment ls <ownerName>/<appName> -k` to view the correct keys for your app deployments. |
393393
| Update not being discovered | Double-check that the version of your running app (like `1.0.0`) matches the version you specified when releasing the update to CodePush. Additionally, make sure that you are releasing to the same deployment that your app is configured to sync with. |
394394
| Update not being displayed after restart | If you're not calling `sync` on app start (like within `componentDidMount` of your root component), then you need to explicitly call `notifyApplicationReady` on app start, otherwise, the plugin will think your update failed and roll it back. |
395395
| I've released an update for iOS but my Android app also shows an update and it breaks it | Be sure you have different deployment keys for each platform in order to receive updates correctly |
@@ -398,6 +398,6 @@ Now you'll be able to see CodePush logs in either debug or release mode, on both
398398

399399
### TypeScript Consumption
400400

401-
This module ships its `*.d.ts` file as part of its NPM package, which allows you to simply `import` it, and receive intellisense in supporting editors (like Visual Studio Code), as well as compile-time type checking if you're using TypeScript. For the most part, this behavior should just work out of the box, however, if you've specified `es6` as the value for either the `target` or `module` [compiler option](http://www.typescriptlang.org/docs/handbook/compiler-options.html) in your [`tsconfig.json`](http://www.typescriptlang.org/docs/handbook/tsconfig-json.html) file, then just make sure that you also set the `moduleResolution` option to `node`. This ensures that the TypeScript compiler will look within the `node_modules` for the type definitions of imported modules. Otherwise, you'll get an error like the following when trying to import the `react-native-code-push` module: `error TS2307: Cannot find module 'react-native-code-push'`.
401+
This module ships its `*.d.ts` file as part of its NPM package, which allows you to simply `import` it, and receive intellisense in supporting editors (like Visual Studio Code), as well as compile-time type checking if you're using TypeScript. For the most part, this behavior should just work out of the box, however, if you've specified `es6` as the value for either the `target` or `module` [compiler option](http://www.typescriptlang.org/docs/handbook/compiler-options.html) in your [`tsconfig.json`](http://www.typescriptlang.org/docs/handbook/tsconfig-json.html) file, then just make sure that you also set the `moduleResolution` option to `node`. This ensures that the TypeScript compiler will look within the `node_modules` for the type definitions of imported modules. Otherwise, you'll get an error like the following when trying to import the `@srcpush/react-native-code-push` module: `error TS2307: Cannot find module '@srcpush/react-native-code-push'`.
402402

403403
---

0 commit comments

Comments
 (0)