-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace deprecated method for reloading bundle on iOS #2784
Conversation
Hello @esbenvb can you provide more details about these changes. How do these change affect RNCP behavior and why do you need them? |
I've added a description now, thanks for the reminder |
Thank you for updating the description. Since this contribution involves replacement of deprecated method and not actual implementation of changes for new architecture, could you please update the title and description accordingly? Currently it seems we support NA, but that is not the case. |
Done. If possible, I'd like to assist with other feedback regarding NA support, which would make much sense now that it's enabled default, and CodePush can live on as a standalone product. |
@esbenvb Do you have a similar solution for android in mind, also could you test the changes with older versions of react native? |
Unfortunately, no. Tried to look into the Android code as well but I have more experience debugging iOS code, and didn't find a solution for reloading the bundle properly on Android with NA. Regarding older versions, the |
Tested and verified the changes. Set up demo app with these changes with and without NA to test out reload of bundle. |
hi~ maybe can use this away |
The code is currently using a deprecated method to reload the bundle. This PR will switch to the recommended method of using
RCTTriggerReloadCommandListeners
.When using New Architecture, the iOS app does not restart properly using the deprecated method. (tested in RN 0.76.3, RN CodePush 9.0.0).
It either hangs or crashes. However, the new bundle is installed and loaded properly when the app is killed and restarted.
Switching to the one in this PR, makes the iOS app restart properly and use the new bundle, when New Architecture is enabled, and also works when it's disabled.