Implementing CodePush in React Native | React Native Code Push | #React Native |

preview_player
Показать описание
What is CodePush?
CodePush is a cloud service that enables Cordova and React Native developers to deploy mobile app updates directly to their users’ devices.

How does CodePush work in ReactNative?
A React Native app consists of JavaScript files and any accompanying images, which the packager bundles and distributes as part of a platform-specific binary (i.e., an .ipa or .apk file).

Once the app is released, updating the JavaScript code (e.g., fixing bugs or adding new features) or image assets, requires recompilation and redistribution of the entire binary, which includes, of course, any review time associated with the store(s) on which it is published.

The CodePush plugin helps get product enhancements to end users instantly, by keeping your JavaScript and images in sync with updates you release to the CodePush 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 become available. It’s a win-win!

The operation is based on wrapping our app in a CodePush HOC (higher-order component) that is responsible for checking if there are new updates to our code in CodePush and reloading the app with the new changes.

React Native CodePush uses its own server to store a copy of each CodePush deployment and a control version in case a rollback is needed; this can be done almost instantly. All of this is managed through a user-friendly control panel provided by Microsoft, which not only allows you to control CodePush deployments but also conventional ones.

It also allows simultaneous testing of versions on a wide variety of devices and platforms.

The library has a wide variety of configuration parameters that, among other things, allow you to choose when to check for and download new versions of React Native CodePush for the app and also give you the ability to use events to determine when each of these processes has been completed. For example, you can notify the end-user that a new version will be installed the next time the app is restarted.

Appcenter

npm link

Рекомендации по теме
Комментарии
Автор

Thank you so much. I finally use code-push with your tutorial. There's so much outdated blog post in internet but yours really worked well.

Koshick
Автор

Code Push only works with JS code. It doesn't allow to push native binaries. In that case, you have to update app bundles in stores to update your native dependencies.

JASACADAMY
Автор

Perfect. With your guide I've implemented my first codepush update. Thanks, God bless you.

TheSostenesg
Автор

Which parts of my React Native codebase are hosted on Microsoft's App Center servers when I use CodePush?

siddhantshelake
Автор

thank you so much sir, it is really helping video😊

tabishabbasi
Автор

Very helpful thank you very much for the video.

himanshuagarwal
Автор

this module works in applications that use expo and you can share the repo. Thank you

turnosmantencion
Автор

Marvelous, thank you very much!!! it worked awesomely... BTW, any idea if it is possible to do module federation and publish changes in independent proyects to send updates? thanks!

elmichiapologeta
Автор

Hi,

Consider the scenario,

1. There is an app, version v1, with code push HOC.
2. We need to update the current version in the play/app store with v2 and not updating code push cloud.
3. After updating to new version v2 from the store, which code will be working in the latest build, is it the code from code push cloud or code from app/play store.?

Thanks

akhilsanker
Автор

Thank you so much, Man. You really helped me. It was a smooth tutorial. Thanks a lot again

MahidharReddyG
Автор

An amazing guide! implemented successfully. Thank you 3>

tonyegreene
Автор

Everything was right.
I created a build with "npx react-native run-android" and then after making some changes I published them on AppCenter.

Changes ( Changed Text in <Text >ABC</Text> tag)

Changes were not reflected in My Oppo A5s devices (Real Device)

On Appcenter RollBacks and Active Devices are "-"

najeebullahkhan
Автор

Indian guys on youtube are way more helpful than the official documents, always.

zixincheng
Автор

Hİ. src/assets images are nothing visible after update. Do you know the solution?

yavuzcetin
Автор

Thank you so much. Is there a guide for ios?

anhvaemofficial
Автор

Thanks for providing this video. But Can you please share video link for iOS platform?

jainigandhi
Автор

What kind of android emulator do you use? Its look nice. And is it also possible to add for example a new <Text> Component or something else?

maxbraun
Автор

Thank you, bro. Appreciate you so much 🔥

orkhannabiev
Автор

Great tutorial, will this work for typescript?

nakshatrasingh
Автор

Hi! thanks a lot for this video. I use the latest react-native version, and for some reason I don't get my app updated, though the code-push releases do uploaded to my app-center. Furthermore seems like the 'Rollback" and the "Active Devices" columns are not getting updated. Can you figure why? I followed all the instructions. Thank you!

danbennatan