Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Conversation

CHOIMINSEOK
Copy link

@CHOIMINSEOK CHOIMINSEOK commented Jan 4, 2025

@kmsbernard and I have updated react-native-code-push to support the new architecture of React Native. We believe the best way to deploy these updates is through this main repository, and we are submitting this pull request to synchronize the following changes with the upstream master branch. Please let us know if you are open to new contributions. We are also committed to maintaining this code going forward.

Changes included in this pull request:

1. Support for the new architecture on Android and iOS

  • Android:
    • The CodePush implementation relies on React Native’s internals. In the new architecture, the JsBundleLoader is managed by ReactHostDelegate. Replace the JsBundleLoader in ReactHostDelegate using reflection when new architecture is on. Most of the relevant changes can be found in this commit.
    • When using the new architecture on Android, ReactHost is instantiated with ReactNativeHost via the getDefaultReactHost helper function. This could result in redundant CodePush instances during a CodePush restart. To address this, we have provided guidance to initialize PackageList only once during the application’s lifetime. 41f0e1b
  • iOS:
    • No additional changes are required for the new architecture on iOS.

2. Fix for E2E test scripts to support the new architecture

  • update test template app version to 0.76.5

@CHOIMINSEOK CHOIMINSEOK requested a review from a team as a code owner January 4, 2025 15:36
@CHOIMINSEOK
Copy link
Author

@microsoft-github-policy-service agree

@DordeDimitrijev
Copy link
Contributor

DordeDimitrijev commented Jan 8, 2025

Hello @CHOIMINSEOK thank you for the contribution, as you probably saw we won't support NA for RNCP but i encourage you to use it on your fork. I've also tried testing the changes and can't seem to fetch the changes from codepush server. I'll attach the logcat output for reference.
log.txt

@CHOIMINSEOK
Copy link
Author

For anyone who needs code-push-react-native on 0.76+ RN & New Architecture, we released 10.0.0-beta.

https://github.com/CodePushNext/react-native-code-push

Minishlink added a commit to AppZung/react-native-code-push that referenced this pull request Feb 5, 2025
Minishlink added a commit to AppZung/react-native-code-push that referenced this pull request Feb 6, 2025
Minishlink added a commit to AppZung/react-native-code-push that referenced this pull request Feb 6, 2025
@Minishlink
Copy link

Hello @CHOIMINSEOK, we added new arch support to AppZung thanks to your PR. For the problem of multiple instantiation you may simply use a singleton, here is a commit that does that.

Our vision is to keep compatibility with the old CodePush API so that our users may switch back/to our managed solution or Microsoft's open source codepush server (from which our backend is not based on since it is not production ready). It is a drop-in replacement for AppCenter CodePush developed for the clients of our dev consulting activities (mostly established businesses). It is now open publicly too. It provides a very easy migration from AppCenter (one command migration of your AppCenter projects and deployment keys), feature-parity with the original module, EU hosting, fast worldwide CDN. We have some innovative and exciting ideas planned for the near future too ;) Since we maintain and enhance the service for our private clients, you are pretty much guaranteed to have a lasting service. Cost-wise it is an affordable solution compared to Expo-updates.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants