Codepush/Native update? in RN 0.61
I have been using code-push in production for more than 2 years.
How I implemented?
- Whenever
androidfolder of my react native app was modified, I assumed there is a native change and my CI/CD tool created a native apk file. - In all other cases, I generated an JS bundle and pushed via CodePush.
In the latest RN version >=0.60, we have auto-linking of native modules. Because of this, I am not able to identify if any library newly added requires a native APK to be generated or just a bundle update.
Please provide suggestion how can this be done?
Environment
- react-native-code-push version: 6.0.0
- react-native version: 0.61.4
I lock down versions of libs in package-lock.json. If I upgrade a lib I check if it has binary code. If it does I assume the built binary will be incompatible with new js, so I bump the major version of the app and distribute new binaries.
code-pushes in this scheme are always compatible in the same major range.
I lock down versions of libs in package-lock.json. If I upgrade a lib I check if it has binary code. If it does I assume the built binary will be incompatible with new js, so I bump the major version of the app and distribute new binaries.
code-pushes in this scheme are always compatible in the same major range.
When you say I check if it has binary code you do this manually? or do you have a script?
Manually unfortunately. Not that many libs to go through though.
On Wed, 29 Jan 2020 at 08:09, Hannan Shaik [email protected] wrote:
I lock down versions of libs in package-lock.json. If I upgrade a lib I check if it has binary code. If it does I assume the built binary will be incompatible with new js, so I bump the major version of the app and distribute new binaries.
code-pushes in this scheme are always compatible in the same major range.
When you say I check if it has binary code you do this manually? or do you have a script?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/microsoft/react-native-code-push/issues/1764?email_source=notifications&email_token=AAGPI4JFP5VUTP65XH5CENDRAETSJA5CNFSM4KJPLZH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKGFW6I#issuecomment-579623801, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGPI4NE5ZXRECQFHLRQODTRAETSJANCNFSM4KJPLZHQ .
Hi @HannanShaikYara, Thank you for reporting!
Code Push allows you to create bundle update only for js part of your application. If the package you added has a native code (This happens in most cases), it cannot be distributed via CodePush.
I'm going to close this issue for now. Please let me know if you have any other questions.
Thanks for clarification @andreidubov.
For others who may have similar need. I did it with comparing if ios/Podfile.lock to decide if it is a native build to be generated or a JS build.
I use circle CI v.2.1 and have followed documentation here https://medium.com/labs42/monorepo-with-circleci-conditional-workflows-69e65d3f1bd0.