Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(iOS) [0.74]: properly warn about createRootViewWithBridge (#43146)
Summary: This PR fixes an issue that `_logWarnIfCreateRootViewWithBridgeIsOverridden` was called in wrong place. Assuming user overrides this method and call to `[super]`: ```objc - (UIView *)createRootViewWithBridge:(RCTBridge *)bridge moduleName:(NSString *)moduleName initProps:(NSDictionary *)initProps { UIView *view = [super createRootViewWithBridge:bridge moduleName:moduleName initProps:initProps]; view.backgroundColor = [UIColor redColor]; return view; } ``` This method still wasn't called in bridgeless (and not showing the error). Checking if user overrides this method in `appDidFinishWithLaunching` works every time ![simulator_screenshot_0E22557C-CE37-4617-A25A-F39A6ED4D3D0](https://github.com/facebook/react-native/assets/52801365/d7865f37-32f0-40ad-a252-74ab7c5b7757) ## Changelog: [IOS] [FIXED] - Properly warn about `createRootViewWithBridge` being deprecated Pull Request resolved: #43146 Test Plan: Check if warning is shown when message is overridden Reviewed By: huntie Differential Revision: D54303506 Pulled By: cipolleschi fbshipit-source-id: cf30555c791493f28b3015a189cf93b60cace8f8
- Loading branch information