Commit 98dc7d6
Forward host:didInitializeRuntime: callback to user delegate (#57438)
Summary:
`RCTReactNativeFactory` acts as `RCTHost`'s delegate but did not implement `host:didInitializeRuntime:`, causing the optional callback to never reach the user's `RCTReactNativeFactoryDelegate`.
Add the missing forwarding method following the same pattern as `hostDidStart:` so the runtime reference is properly delivered to the user delegate.
Fixes #57349.
## Changelog:
[IOS] [FIXED] - Forward `host:didInitializeRuntime:` callback to user delegate in `RCTReactNativeFactory`
Pull Request resolved: #57438
Test Plan:
1. Implement `host:didInitializeRuntime:` in a custom `RCTReactNativeFactoryDelegate` subclass (e.g. RNTester's `AppDelegate`)
2. Build and launch the app
3. Verify the callback is invoked and the `jsi::Runtime` reference is received
4. Confirm `hostDidStart:` continues to work as before
NOTE: No automated test. This mirrors the existing hostDidStart: forwarding in the same RCTReactNativeFactory, which is also untested. host:didInitializeRuntime: is declared on RCTHostDelegate and inherited by RCTReactNativeFactoryDelegate under optional, and the respondsToSelector: guard makes it a no-op for delegates that don't implement it, so there's no logic to regress. No RCTReactNativeFactory delegate-forwarding test harness exists, so a test would be net-new iOS XCTest scaffolding disproportionate to a one-line forward.
Reviewed By: cortinico
Differential Revision: D113653288
Pulled By: fabriziocucci
fbshipit-source-id: 082bb340cd9d61bc30a10c8a7730eca14f69088e1 parent 433e79d commit 98dc7d6
1 file changed
Lines changed: 7 additions & 0 deletions
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
215 | 222 | | |
216 | 223 | | |
217 | 224 | | |
| |||
0 commit comments