-
Couldn't load subscription status.
- Fork 26
feat: add method to deallocate reactNativeFactory instance for iOS #137
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
base: main
Are you sure you want to change the base?
feat: add method to deallocate reactNativeFactory instance for iOS #137
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this! 🚀
Overall looks good, left couple of questions.
98b8d14 to
9264071
Compare
c11f9c0 to
5bef4b4
Compare
|
@okwasniewski, I refactored the factory a bit and added some additional checks due to Cursor Bugbot comments. When it comes to the Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-09-24.at.22.52.53.mp4 |
|
@californiandreamer This looks like a expected behavior if you stop react native, let's ship it. |
| if let bridge = reactNativeFactory?.bridge, !bridge.isLoading { | ||
| DispatchQueue.main.async { [weak self] in | ||
| self?.jsLoaded(Notification(name: notificationName)) | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is changing the previous behavior. jsLoaded should be called by React Native sending this notification
| return | ||
| } | ||
|
|
||
| guard let factory = reactNativeFactory else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: guard let reactNativeFactory else
Summary
RCTHost).rootViewFactoryto avoid retaining the old runtime.startReactNative()API remains;view()now self‑heals if RN was previously stopped.Test plan
stopReactNativecalled before RN was initialize)