Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow multiple RN instances to run at the same time (#49300)
Summary: Pull Request resolved: #49300 With the refactor of the AppDelegate in favor ReactNativeFactory, the users can now instantiate multiple instances of react native. However, currently, if you try to run multiple instances, the app will crash with the message: ``` libc++abi: terminating due to uncaught exception of type std::runtime_error: Feature flags cannot be overridden more than once ``` This happens also when the feature flags we would like to set are the same that we already applied. This should be an allowed scenario because reapplying the excatly same features flags should have no effect on React native and that's not the use case we want to forbid. With this change, we are creating a static variable that checks whether we already apply that set of feature flags and it allows you to create multiple instances by keeping the same flags ## Changelog: [iOS][Fixed] - Allow multiple RN instances to run at the same time Reviewed By: rubennorte Differential Revision: D69398441 fbshipit-source-id: a377c6a1402d38d66d348fa8c6a65e645973aadc
- Loading branch information