-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
fix(iOS): add missing forward blocks to RCTRootViewFactory #43526
fix(iOS): add missing forward blocks to RCTRootViewFactory #43526
Conversation
Base commit: 1c52d38 |
@cortinico has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
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.
helping review since Riccardo is off. i think we should especially address the respondsToSelector: change to prevent crash.
thanks @okwasniewski again for the great work.
* If the module was not registered, return NO to prevent further searches. | ||
*/ | ||
@property (nonatomic, nullable) RCTBridgeDidNotFindModuleBlock bridgeDidNotFindModule; | ||
|
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: there're other optional functions in RCTBridgeDelegate
shouldBridgeUseCustomJSC:
, loadSourceForBridge:onProgress:onComplete:
, and loadSourceForBridge:withBlock:
.
i don't think those are actually be used nowadays. just a note here that these functions are not going to support.
react-native/packages/react-native/React/Base/RCTBridgeDelegate.h
Lines 43 to 74 in 1c52d38
/** | |
* Configure whether the JSCExecutor created should use the system JSC API or | |
* alternative hooks provided. When returning YES from this method, you must have | |
* previously called facebook::react::setCustomJSCWrapper. | |
* | |
* @experimental | |
*/ | |
- (BOOL)shouldBridgeUseCustomJSC:(RCTBridge *)bridge; | |
/** | |
* The bridge will call this method when a module been called from JS | |
* cannot be found among registered modules. | |
* It should return YES if the module with name 'moduleName' was registered | |
* in the implementation, and the system must attempt to look for it again among registered. | |
* If the module was not registered, return NO to prevent further searches. | |
*/ | |
- (BOOL)bridge:(RCTBridge *)bridge didNotFindModule:(NSString *)moduleName; | |
/** | |
* The bridge will automatically attempt to load the JS source code from the | |
* location specified by the `sourceURLForBridge:` method, however, if you want | |
* to handle loading the JS yourself, you can do so by implementing this method. | |
*/ | |
- (void)loadSourceForBridge:(RCTBridge *)bridge | |
onProgress:(RCTSourceLoadProgressBlock)onProgress | |
onComplete:(RCTSourceLoadBlock)loadCallback; | |
/** | |
* Similar to loadSourceForBridge:onProgress:onComplete: but without progress | |
* reporting. | |
*/ | |
- (void)loadSourceForBridge:(RCTBridge *)bridge withBlock:(RCTSourceLoadBlock)loadCallback; |
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.
d93de5c
to
e42dd4b
Compare
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.
everything looks good now. thanks for following up to comment.
cc @cortinico that you may need to reimport the diff again.
@cortinico merged this pull request in 9d79f05. |
oops I missed those comments. I'll follow-up with the delta tomorrow 👍 |
Summary: PR facebook#43526 was accidentally merged with several changes excluded. I'm following up on those here. Changelog: [Internal] [Changed] - Follow-up with Review Feedback on RCTAppDelegate from facebook#43526 Differential Revision: D55240435
@okwasniewski @Kudo here the diff: Can I ask you to cross check that I haven't missed anything? |
…acebook#43607) Summary: PR facebook#43526 was accidentally merged with several changes excluded. I'm following up on those here. Changelog: [Internal] [Changed] - Follow-up with Review Feedback on RCTAppDelegate from facebook#43526 Differential Revision: D55240435
Summary: Pull Request resolved: #43607 PR #43526 was accidentally merged with several changes excluded. I'm following up on those here. Changelog: [Internal] [Changed] - Follow-up with Review Feedback on RCTAppDelegate from #43526 Reviewed By: dmytrorykun Differential Revision: D55240435 fbshipit-source-id: c296a1e14b7032b211551334ca7b5a6824e8d45c
@okwasniewski @Kudo Also if you could create a PR with the two commits included against the 0.74-stable branch, it would be extremely helpful for us 🙏 |
…43526) Summary: This PR adds missing forwarding blocks to RCTRootViewFactory, currently when a user tries to override `sourceURLForBridge` in AppDelegate it isn't overridden. ## Changelog: [IOS] [FIXED] - add missing forward blocks to RCTRootViewFactory Pull Request resolved: facebook#43526 Test Plan: Override: `extraModulesForBridge`, `extraLazyModuleClassesForBridge`, `bridge didNotFindModule`, `sourceURLForBridge:` methods in AppDelegate and check if they are called on old architecture Reviewed By: philIip Differential Revision: D55186872 Pulled By: cortinico fbshipit-source-id: 5988c7bab1439ccc4885b7337336c1e120ba9ea6 (cherry picked from commit 9d79f05)
…acebook#43607) Summary: Pull Request resolved: facebook#43607 PR facebook#43526 was accidentally merged with several changes excluded. I'm following up on those here. Changelog: [Internal] [Changed] - Follow-up with Review Feedback on RCTAppDelegate from facebook#43526 Reviewed By: dmytrorykun Differential Revision: D55240435 fbshipit-source-id: c296a1e14b7032b211551334ca7b5a6824e8d45c (cherry picked from commit 84c1c6e)
done here: reactwg/react-native-releases#177 and the pr is also merged and based on 0.74-stable |
* fix(iOS): add missing forward blocks to RCTRootViewFactory (#43526) Summary: This PR adds missing forwarding blocks to RCTRootViewFactory, currently when a user tries to override `sourceURLForBridge` in AppDelegate it isn't overridden. ## Changelog: [IOS] [FIXED] - add missing forward blocks to RCTRootViewFactory Pull Request resolved: #43526 Test Plan: Override: `extraModulesForBridge`, `extraLazyModuleClassesForBridge`, `bridge didNotFindModule`, `sourceURLForBridge:` methods in AppDelegate and check if they are called on old architecture Reviewed By: philIip Differential Revision: D55186872 Pulled By: cortinico fbshipit-source-id: 5988c7bab1439ccc4885b7337336c1e120ba9ea6 (cherry picked from commit 9d79f05) * Follow-up with Review Feedback on RCTAppDelegate from #43526 (#43607) Summary: Pull Request resolved: #43607 PR #43526 was accidentally merged with several changes excluded. I'm following up on those here. Changelog: [Internal] [Changed] - Follow-up with Review Feedback on RCTAppDelegate from #43526 Reviewed By: dmytrorykun Differential Revision: D55240435 fbshipit-source-id: c296a1e14b7032b211551334ca7b5a6824e8d45c (cherry picked from commit 84c1c6e) --------- Co-authored-by: Oskar Kwaśniewski <oskarkwasniewski@icloud.com> Co-authored-by: Nicola Corti <ncor@meta.com>
Summary:
This PR adds missing forwarding blocks to RCTRootViewFactory, currently when a user tries to override
sourceURLForBridge
in AppDelegate it isn't overridden.Changelog:
[IOS] [FIXED] - add missing forward blocks to RCTRootViewFactory
Test Plan:
Override:
extraModulesForBridge
,extraLazyModuleClassesForBridge
,bridge didNotFindModule
,sourceURLForBridge:
methods in AppDelegate and check if they are called on old architecture