mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
37e5fa3a6c
Summary: Changelog: [iOS][Internal] Refactor: Migrate Logbox surface initialization to Fabric when available, in Bridge and Bridgeless modes # Why This diff main purpose is to add `RCTErrorNewArchitectureValidation(RCTNotAllowedInAppWideFabric)` in `RCTSurface`, to ensure Paper surfaces are never created in FBiOS. # The Situation Before this diff, in Bridged Fabric, `[RCTLogbox show]` initializes a Paper `RCTSurface`, [using `[RCTLogBoxView initWithWindow]`](https://github.com/facebook/react-native/blob/main/React/CoreModules/RCTLogBoxView.mm#L46)) In this diff, in Bridged and Bridgeless Fabric, `[RCTLogbox show]` initializes a Fabric `RCTFabricSurface`. Before this diff, in Bridgeless Fabric, RCTLogBox posts a "CreateLogBoxSurface" notification to RCTInstance. In this diff, the notification hack is replaced by the same `RCTFabricSurface` initialization above. Behavior is the same. Reviewed By: RSNara Differential Revision: D35177311 fbshipit-source-id: 6de418af8a01f914c9a806bb8d74915015f9087a