Okechukwu Eze
Okechukwu Eze

Reputation: 149

How to deploy codespush bundle on old targets when there are native changes on the new build

Before i continue, let me let you know that i know the code to deply to a targeted build for codepush

appcenter codepush  release-react -a aountName/appName -d Production -m --description "CommentHere" -t versionName

I have tried to figure this out on my own and i have not been able to.

I have several versions of my app which i have deploy using CodePush and everything works well but I started having fears of crashes when i installed new packages on the latest build.

This implies the current code base would have new native differences as compaird to the old version.

The question is how can i deploy my new build with new native codes and packages present to an old version of my app which does not have those native packages without running into several crashes from all the users using the old version of the app...

I ask this cos i have a feeling if i push the new build with the new changes in UI and native chnages to the old version of my app, the app old app would crash.

If a bug comes in for an old version, how do I fix it and deploy it for the old version only? Bugs may be critical and not everyone will have the latest version of the app Or, the bug may only exist on a old version of the app.

I await your response.

Upvotes: 0

Views: 871

Answers (1)

Darsshan
Darsshan

Reputation: 956

Code push will not affect any native code written within the Android or the iOS projects of a React-Native application. If you read the documentations carefully, it specifically says that it does not change / modify / update the native portion of the app.

Why?

This is because of the way the CodePush mechanism works. In essence, CodePush only stores and triggers the update of the JS bundle of the React-Native application.

This is why we wrap only the JS main app instance with CodePush HOC (Higher Order Component). This is what's happening when you do:

CodePush(MyApp); //wrapping the js bundle at app-root

So, unfortunately in your case, if there are native codes involved, regardless of deployment to a new or old version of the app, it has to be a AppStore / Playstore driven deployment.

Upvotes: 1

Related Questions