Pass the RCTAppDependencyProvider to the RCTAppDelegate (#47651)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47651

## This Change:

This change uses in the App's AppDelegate the newly generated `RCTAppDependencyProvider`, passing it to the `RCTAppDelegate`.

This change needs to be applied also to the template, when this stack lands.

## Context

React Native has a last temporal dependency on Codegen in the React-RCTAppDelegate pod.

The RCTAppDelegate has the responsibility to provide various dependencies to react native, like third party components and various modules. ReactCodegen is generated when the user create the project, while React-RCTAppDelegate eists in React Native itself.

This dependency means that we cannot prepare prebuilt for iOS for React Native because when we would have to create prebuilds, we would need the React Codegen, but we can't create a React codegen package that will fit all the apps, because React Codegen can contains App Specific modules and components and apps might have different dependencies.

## Changelog:
[iOS][Added] - Pass the `RCTAppDependencyProvider` to the `RCTAppDelegate`

Reviewed By: dmytrorykun

Differential Revision: D66074475

fbshipit-source-id: 93bf500fe37f115352ebd49d3d56955cbaeeea72
This commit is contained in:
Riccardo Cipolleschi 2024-11-18 08:06:13 -08:00 committed by Facebook GitHub Bot
parent 41c2502b36
commit 95fc906930
3 changed files with 94 additions and 142 deletions

View File

@ -8,12 +8,14 @@
#import "AppDelegate.h"
#import <React/RCTBundleURLProvider.h>
#import <ReactCodegen/RCTAppDependencyProvider.h>
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.moduleName = @"HelloWorld";
self.dependencyProvider = [RCTAppDependencyProvider new];
// You can add your custom initial props in the dictionary below.
// They will be passed down to the ViewController used by React Native.
self.initialProps = @{};

View File

@ -385,8 +385,8 @@ PODS:
- React-jsinspector
- React-NativeModulesApple
- React-RCTBlob
- React-RCTFBReactNativeSpec
- React-RCTImage (= 1000.0.0)
- ReactCodegen
- ReactCommon
- SocketRocket (= 0.7.1)
- React-cxxreact (1000.0.0):
@ -407,50 +407,24 @@ PODS:
- React-timing (= 1000.0.0)
- React-debug (1000.0.0)
- React-defaultsnativemodule (1000.0.0):
- DoubleConversion
- glog
- hermes-engine
- RCT-Folly (= 2024.10.14.00)
- RCTRequired
- RCTTypeSafety
- React-Core
- React-debug
- RCT-Folly
- React-domnativemodule
- React-Fabric
- React-featureflags
- React-featureflagsnativemodule
- React-graphics
- React-idlecallbacksnativemodule
- React-ImageManager
- React-jsi
- React-jsiexecutor
- React-microtasksnativemodule
- React-NativeModulesApple
- React-RCTFabric
- React-rendererdebug
- React-utils
- ReactCodegen
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- React-RCTFBReactNativeSpec
- React-domnativemodule (1000.0.0):
- DoubleConversion
- glog
- hermes-engine
- RCT-Folly (= 2024.10.14.00)
- RCTRequired
- RCTTypeSafety
- React-Core
- React-debug
- RCT-Folly
- React-Fabric
- React-FabricComponents
- React-featureflags
- React-graphics
- React-ImageManager
- React-NativeModulesApple
- React-RCTFabric
- React-rendererdebug
- React-utils
- ReactCodegen
- ReactCommon/turbomodule/bridging
- React-jsi
- React-jsiexecutor
- React-RCTFBReactNativeSpec
- ReactCommon/turbomodule/core
- Yoga
- React-Fabric (1000.0.0):
@ -942,7 +916,6 @@ PODS:
- React-rendererdebug
- React-runtimescheduler
- React-utils
- ReactCodegen
- ReactCommon/turbomodule/core
- Yoga
- React-FabricComponents/components (1000.0.0):
@ -975,7 +948,6 @@ PODS:
- React-rendererdebug
- React-runtimescheduler
- React-utils
- ReactCodegen
- ReactCommon/turbomodule/core
- Yoga
- React-FabricComponents/components/inputaccessory (1000.0.0):
@ -999,7 +971,6 @@ PODS:
- React-rendererdebug
- React-runtimescheduler
- React-utils
- ReactCodegen
- ReactCommon/turbomodule/core
- Yoga
- React-FabricComponents/components/iostextinput (1000.0.0):
@ -1023,7 +994,6 @@ PODS:
- React-rendererdebug
- React-runtimescheduler
- React-utils
- ReactCodegen
- ReactCommon/turbomodule/core
- Yoga
- React-FabricComponents/components/modal (1000.0.0):
@ -1047,7 +1017,6 @@ PODS:
- React-rendererdebug
- React-runtimescheduler
- React-utils
- ReactCodegen
- ReactCommon/turbomodule/core
- Yoga
- React-FabricComponents/components/rncore (1000.0.0):
@ -1071,7 +1040,6 @@ PODS:
- React-rendererdebug
- React-runtimescheduler
- React-utils
- ReactCodegen
- ReactCommon/turbomodule/core
- Yoga
- React-FabricComponents/components/safeareaview (1000.0.0):
@ -1095,7 +1063,6 @@ PODS:
- React-rendererdebug
- React-runtimescheduler
- React-utils
- ReactCodegen
- ReactCommon/turbomodule/core
- Yoga
- React-FabricComponents/components/scrollview (1000.0.0):
@ -1119,7 +1086,6 @@ PODS:
- React-rendererdebug
- React-runtimescheduler
- React-utils
- ReactCodegen
- ReactCommon/turbomodule/core
- Yoga
- React-FabricComponents/components/text (1000.0.0):
@ -1143,7 +1109,6 @@ PODS:
- React-rendererdebug
- React-runtimescheduler
- React-utils
- ReactCodegen
- ReactCommon/turbomodule/core
- Yoga
- React-FabricComponents/components/textinput (1000.0.0):
@ -1167,7 +1132,6 @@ PODS:
- React-rendererdebug
- React-runtimescheduler
- React-utils
- ReactCodegen
- ReactCommon/turbomodule/core
- Yoga
- React-FabricComponents/components/unimplementedview (1000.0.0):
@ -1191,7 +1155,6 @@ PODS:
- React-rendererdebug
- React-runtimescheduler
- React-utils
- ReactCodegen
- ReactCommon/turbomodule/core
- Yoga
- React-FabricComponents/textlayoutmanager (1000.0.0):
@ -1215,7 +1178,6 @@ PODS:
- React-rendererdebug
- React-runtimescheduler
- React-utils
- ReactCodegen
- ReactCommon/turbomodule/core
- Yoga
- React-FabricImage (1000.0.0):
@ -1228,6 +1190,7 @@ PODS:
- RCTRequired (= 1000.0.0)
- RCTTypeSafety (= 1000.0.0)
- React-Fabric
- React-featureflags
- React-graphics
- React-ImageManager
- React-jsi
@ -1239,26 +1202,13 @@ PODS:
- Yoga
- React-featureflags (1000.0.0)
- React-featureflagsnativemodule (1000.0.0):
- DoubleConversion
- glog
- hermes-engine
- RCT-Folly (= 2024.10.14.00)
- RCTRequired
- RCTTypeSafety
- React-Core
- React-debug
- React-Fabric
- RCT-Folly
- React-featureflags
- React-graphics
- React-ImageManager
- React-NativeModulesApple
- React-RCTFabric
- React-rendererdebug
- React-utils
- ReactCodegen
- ReactCommon/turbomodule/bridging
- React-jsi
- React-jsiexecutor
- React-RCTFBReactNativeSpec
- ReactCommon/turbomodule/core
- Yoga
- React-graphics (1000.0.0):
- DoubleConversion
- fast_float (= 6.1.4)
@ -1282,27 +1232,13 @@ PODS:
- React-perflogger (= 1000.0.0)
- React-runtimeexecutor
- React-idlecallbacksnativemodule (1000.0.0):
- DoubleConversion
- glog
- hermes-engine
- RCT-Folly (= 2024.10.14.00)
- RCTRequired
- RCTTypeSafety
- React-Core
- React-debug
- React-Fabric
- React-featureflags
- React-graphics
- React-ImageManager
- React-NativeModulesApple
- React-RCTFabric
- React-rendererdebug
- RCT-Folly
- React-jsi
- React-jsiexecutor
- React-RCTFBReactNativeSpec
- React-runtimescheduler
- React-utils
- ReactCodegen
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- React-ImageManager (1000.0.0):
- glog
- RCT-Folly/Fabric
@ -1318,6 +1254,7 @@ PODS:
- RCT-Folly/Fabric (= 2024.10.14.00)
- React-cxxreact
- React-debug
- React-featureflags
- React-jsi
- ReactCommon/turbomodule/bridging
- React-jsi (1000.0.0):
@ -1356,26 +1293,12 @@ PODS:
- glog
- React-debug
- React-microtasksnativemodule (1000.0.0):
- DoubleConversion
- glog
- hermes-engine
- RCT-Folly (= 2024.10.14.00)
- RCTRequired
- RCTTypeSafety
- React-Core
- React-debug
- React-Fabric
- React-featureflags
- React-graphics
- React-ImageManager
- React-NativeModulesApple
- React-RCTFabric
- React-rendererdebug
- React-utils
- ReactCodegen
- ReactCommon/turbomodule/bridging
- RCT-Folly
- React-jsi
- React-jsiexecutor
- React-RCTFBReactNativeSpec
- ReactCommon/turbomodule/core
- Yoga
- React-nativeconfig (1000.0.0)
- React-NativeModulesApple (1000.0.0):
- glog
@ -1404,7 +1327,7 @@ PODS:
- React-Core/RCTAnimationHeaders
- React-jsi
- React-NativeModulesApple
- ReactCodegen
- React-RCTFBReactNativeSpec
- ReactCommon
- React-RCTAppDelegate (1000.0.0):
- RCT-Folly (= 2024.10.14.00)
@ -1421,6 +1344,7 @@ PODS:
- React-nativeconfig
- React-NativeModulesApple
- React-RCTFabric
- React-RCTFBReactNativeSpec
- React-RCTImage
- React-RCTNetwork
- React-rendererdebug
@ -1429,7 +1353,6 @@ PODS:
- React-RuntimeHermes
- React-runtimescheduler
- React-utils
- ReactCodegen
- ReactCommon
- React-RCTBlob (1000.0.0):
- DoubleConversion
@ -1442,8 +1365,8 @@ PODS:
- React-jsi
- React-jsinspector
- React-NativeModulesApple
- React-RCTFBReactNativeSpec
- React-RCTNetwork
- ReactCodegen
- ReactCommon
- React-RCTFabric (1000.0.0):
- glog
@ -1468,20 +1391,30 @@ PODS:
- React-runtimescheduler
- React-utils
- Yoga
- React-RCTFBReactNativeSpec (1000.0.0):
- hermes-engine
- RCT-Folly
- RCTRequired
- RCTTypeSafety
- React-Core
- React-jsi
- React-jsiexecutor
- React-NativeModulesApple
- ReactCommon
- React-RCTImage (1000.0.0):
- RCT-Folly (= 2024.10.14.00)
- RCTTypeSafety
- React-Core/RCTImageHeaders
- React-jsi
- React-NativeModulesApple
- React-RCTFBReactNativeSpec
- React-RCTNetwork
- ReactCodegen
- ReactCommon
- React-RCTLinking (1000.0.0):
- React-Core/RCTLinkingHeaders (= 1000.0.0)
- React-jsi (= 1000.0.0)
- React-NativeModulesApple
- ReactCodegen
- React-RCTFBReactNativeSpec
- ReactCommon
- ReactCommon/turbomodule/core (= 1000.0.0)
- React-RCTNetwork (1000.0.0):
@ -1490,14 +1423,14 @@ PODS:
- React-Core/RCTNetworkHeaders
- React-jsi
- React-NativeModulesApple
- ReactCodegen
- React-RCTFBReactNativeSpec
- ReactCommon
- React-RCTPushNotification (1000.0.0):
- RCTTypeSafety
- React-Core/RCTPushNotificationHeaders
- React-jsi
- React-NativeModulesApple
- ReactCodegen
- React-RCTFBReactNativeSpec
- ReactCommon
- React-RCTSettings (1000.0.0):
- RCT-Folly (= 2024.10.14.00)
@ -1505,7 +1438,7 @@ PODS:
- React-Core/RCTSettingsHeaders
- React-jsi
- React-NativeModulesApple
- ReactCodegen
- React-RCTFBReactNativeSpec
- ReactCommon
- React-RCTTest (1000.0.0):
- RCT-Folly (= 2024.10.14.00)
@ -1521,7 +1454,7 @@ PODS:
- React-Core/RCTVibrationHeaders
- React-jsi
- React-NativeModulesApple
- ReactCodegen
- React-RCTFBReactNativeSpec
- ReactCommon
- React-rendererconsistency (1000.0.0)
- React-rendererdebug (1000.0.0):
@ -1538,6 +1471,7 @@ PODS:
- React-Core/Default
- React-CoreModules
- React-cxxreact
- React-featureflags
- React-jserrorhandler
- React-jsi
- React-jsiexecutor
@ -1545,6 +1479,7 @@ PODS:
- React-Mapbuffer
- React-NativeModulesApple
- React-RCTFabric
- React-RCTFBReactNativeSpec
- React-RuntimeCore
- React-runtimeexecutor
- React-RuntimeHermes
@ -1615,6 +1550,7 @@ PODS:
- React-jsi
- React-jsiexecutor
- React-NativeModulesApple
- React-RCTAppDelegate
- React-rendererdebug
- React-utils
- ReactCommon/turbomodule/bridging
@ -1631,7 +1567,7 @@ PODS:
- React-cxxreact
- React-jsi
- React-NativeModulesApple
- ReactCodegen
- React-RCTFBReactNativeSpec
- ReactCommon
- ReactCommon/turbomodule (1000.0.0):
- DoubleConversion
@ -1750,6 +1686,7 @@ DEPENDENCIES:
- React-RCTAppDelegate (from `../react-native/Libraries/AppDelegate`)
- React-RCTBlob (from `../react-native/Libraries/Blob`)
- React-RCTFabric (from `../react-native/React`)
- React-RCTFBReactNativeSpec (from `../react-native/React`)
- React-RCTImage (from `../react-native/Libraries/Image`)
- React-RCTLinking (from `../react-native/Libraries/LinkingIOS`)
- React-RCTNetwork (from `../react-native/Libraries/Network`)
@ -1877,6 +1814,8 @@ EXTERNAL SOURCES:
:path: "../react-native/Libraries/Blob"
React-RCTFabric:
:path: "../react-native/React"
React-RCTFBReactNativeSpec:
:path: "../react-native/React"
React-RCTImage:
:path: "../react-native/Libraries/Image"
React-RCTLinking:
@ -1931,74 +1870,75 @@ SPEC CHECKSUMS:
FBLazyVector: d3c2dd739a63c1a124e775df075dc7c517a719cb
fmt: a40bb5bd0294ea969aaaba240a927bd33d878cdd
glog: eb93e2f488219332457c3c4eafd2738ddc7e80b8
hermes-engine: 0f8fb784efaddc3e98ce5b19a6cb1778be784ba1
hermes-engine: 6e6e58ec465c84d2f28c9e3adfd10b982ae5aaf6
MyNativeView: 8af68f7d37413c951b8444e32ec81747099f6959
NativeCxxModuleExample: 0666f3ce65aaba7fa125324ec9d193d0df44f052
OCMock: 589f2c84dacb1f5aaf6e4cec1f292551fe748e74
OSSLibraryExample: 6d432836e53c8f04c0c19b98f3f9fd61e12d9f03
RCT-Folly: 63ea034480807f66007e6e02437b15358c03511e
RCT-Folly: c89e7a98649622070413dc59b24a70a39a1fe5c6
RCTDeprecation: 3808e36294137f9ee5668f4df2e73dc079cd1dcf
RCTRequired: a00614e2da5344c2cda3d287050b6cee00e21dc6
RCTTypeSafety: 459a16418c6b413060d35434ba3e83f5b0bd2651
React: 170a01a19ba2525ab7f11243e2df6b19bf268093
React-callinvoker: f08f425e4043cd1998a158b6e39a6aed1fd1d718
React-Core: e14a20ce14bb220db6f15f99308bcb221ad860e1
React-CoreModules: 03b02c4f8312a22c1b3471e2e4061611f9f64b48
React-CoreModules: edb6fc80483cb9be1c0f0d19aea9cc744744f00d
React-cxxreact: e5dc26540b34869bdafe544a2dc98c729e911004
React-debug: 195df38487d3f48a7af04deddeb4a5c6d4440416
React-defaultsnativemodule: 22482f110d58c88bbbd46da565b8102b5ce77819
React-domnativemodule: 34a9b69d9c6dc8aea1d8f9a71d6fd4bcb1d665f3
React-defaultsnativemodule: 809281bb19b5ba6aad8973694f6a73f3e10d8c5d
React-domnativemodule: 31be96c046c8537cbdf92943b07cd9fe8d830d19
React-Fabric: e1e49a06ae12efbd1adac214862c0f919460b629
React-FabricComponents: c13525ccd846c2b9efb248a731c37637fd3558b6
React-FabricImage: 099a46c34a6f55abce3ee6c1d60ff4ee55c85504
React-FabricComponents: c66f8f2d689aaa3dac82b02fb391f2c9c6352a0f
React-FabricImage: ad0c2bf3d3727283f2db408b46d5f103ffd81c90
React-featureflags: ac152b9e505abad006bee368edb0a4851fecaf5f
React-featureflagsnativemodule: 509a04bf4640de4ba4e5b95ffdf5554283cbfddd
React-featureflagsnativemodule: 09e3acf24f068d883d93bbfc5a20a00d3835b6c0
React-graphics: cd09a3b0ea309e10c3bc93f01c606f95166b6ff5
React-hermes: f55ba975cf5358df190f8ade0afaeae543ffbeee
React-idlecallbacksnativemodule: 85f2b59c9650f5fc535f6a92e930ce76ce77cdbd
React-idlecallbacksnativemodule: a72749bd259cf1da5439b5ade707f6a1b10e6b92
React-ImageManager: 575cefd6f3fe4a9998409eebe9c26eee9ed702f7
React-jserrorhandler: 99b9dd182461c88d4d02756498d991e9b7ca3248
React-jsi: 53d26399177921b2e4153b6b90fdea3b466b1f2b
React-jserrorhandler: dd9e6363aa7d505f35eeadf2ea5f35a9beccd93e
React-jsi: 2feb8d9623f0e90d42ee14c64ef8e64af349da32
React-jsiexecutor: 41546c370e8ae9ccc1f05b85504f539a04a0acca
React-jsinspector: 3bbe8e8f28c9d17f6313fcf317a085123363fef5
React-jsitracing: ef82947481b8bf7d49adbaacd8ae0e01028b8ddb
React-logger: b19e99fbaaf73d83adaca8917c133d1da71df8de
React-Mapbuffer: 11fabe7a2a035584622004cd476699897492927b
React-microtasksnativemodule: 2ba56dfb6dcc1b3a189333d7c57037b87c3bbd7e
React-microtasksnativemodule: 8558ac343d183b631db1453dca484640b0eb3c05
React-nativeconfig: 8f2cb4bf2028acf616c4bdbef3aecb8312e84291
React-NativeModulesApple: 0596f545e307887fc7bcee2abf958190599934e1
React-perflogger: 35eb440e6a623c46f6c3b4b87eb7e3b07112138a
React-performancetimeline: 1d8884eae7282293cbba0293f5075adc227ff1c7
React-RCTActionSheet: 1bf8cc8086ad1c15da3407dfb7bc9dd94dc7595d
React-RCTAnimation: 8eb55e6604a163e6c50e0543dba49c2991d5559f
React-RCTAppDelegate: 067ff873f2cd24fa0fd35f08aca1c99b00f3fd57
React-RCTBlob: 38bc99ee05fa5111880b315c0e01079aa7a1c05c
React-RCTAnimation: 17b53b1d4e988612b03a9342b2ebcef2e0ff1bfd
React-RCTAppDelegate: 8b3505e89d480a0961fbcd97a9510ceb16f19fc4
React-RCTBlob: 66a3506498331262de60f22917eb3464136bb837
React-RCTFabric: e544aea023b719c985580cccf709bd0295ad175a
React-RCTImage: 8fa6e8edc2f9a6622559bead27d1388f577fc4c0
React-RCTLinking: a70c4fb248b10bc1c8733ae94452232ab877887f
React-RCTNetwork: 4d52636c4d5e4633d62e42785e063ad8112f2eb6
React-RCTPushNotification: 08f04e05ff994f93d74c406b51500688ae6e5541
React-RCTSettings: dd24f3c15d36c217b2facced07ce05e3f7e38f9a
React-RCTFBReactNativeSpec: 5ac2a4a112a4fdd830bf33816563cee67b0793f6
React-RCTImage: 9773bf66e0ed3b4aff4358403c54f16a04f7fb29
React-RCTLinking: 4b179cdacf8dfab5ee483546ff9353797361f520
React-RCTNetwork: 215f0293d3a55148e5e7dab601f45dec64360d44
React-RCTPushNotification: c9868b10d51b51081cdcec5833cc9567bfc27b59
React-RCTSettings: 2e19307a06f0e6627e1fcbbf8c5a1db211426302
React-RCTTest: 4adb0bfe9f33775a7868d5a55efb2f4b68ff7378
React-RCTText: e5a08c3829b35f1db001c9cbdf1917936f5dbd25
React-RCTVibration: 5bcce0239c34658a48da8d33f618f67075ed3a9f
React-RCTVibration: b778c942701314c17ea8831307c0f631dadaba10
React-rendererconsistency: 777c894edc43dde01499189917ac54ee76ae6a6a
React-rendererdebug: dcdb0febb40c690f680b57100cac68ed7069bd76
React-rncore: 4a81ce7b8e47448973a6b29c765b07e01715921e
React-RuntimeApple: 40747a7b79ce3c63c9f83d619f31a2ae7da564ef
React-RuntimeApple: 24dd225fee560c6cf36f3dffa5691bfcd4f8b639
React-RuntimeCore: dc69373e13f9c7221557c8bf3d2547855184621f
React-runtimeexecutor: fb2d342a477bb13f7128cceb711ee8311edce0c0
React-RuntimeHermes: 1444afb801cbd255e42a9759bac04f9db69d6bcb
React-runtimescheduler: ea6d18da4a0926b2906f06b575c534a34043c0a8
React-timing: 9d49179631e5e3c759e6e82d4c613c73da80a144
React-utils: 3635133e3bd480e3898075afdc00e8d2676f3758
ReactCodegen: e69ed600668a956ea337bbcf701d26eb7e403792
ReactCodegen: 0d3a929f6f511221580acda8af5a85d8107cc2cd
ReactCommon: 691e7f9c04e1eceb968f8ee1f3501837d61b59fb
ReactCommon-Samples: 98c203dad7e21c39663450b8dae0c01a356e249f
ReactCommon-Samples: 921a9a38ed66f267559171430ae000a5aa0973d8
ScreenshotManager: 0f4041b0b21840453d066283c50bb0186c7b513b
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
Yoga: 922136ed5790378cd675c3611f6f2b8c67103803
Yoga: 216ee0d4bcba7186f47624eeac1477a068bceea0
PODFILE CHECKSUM: 8591f96a513620a2a83a0b9a125ad3fa32ea1369
COCOAPODS: 1.14.3
COCOAPODS: 1.15.2

View File

@ -24,6 +24,13 @@
#import <RNTMyNativeViewComponentView.h>
#endif
#if __has_include(<ReactCodegen/RCTAppDependencyProvider.h>)
#define USE_OSS_CODEGEN 1
#import <ReactCodegen/RCTAppDependencyProvider.h>
#else
#define USE_OSS_CODEGEN 0
#endif
static NSString *kBundlePath = @"js/RNTesterApp.ios";
@interface AppDelegate () <UNUserNotificationCenterDelegate>
@ -34,6 +41,9 @@ static NSString *kBundlePath = @"js/RNTesterApp.ios";
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.moduleName = @"RNTesterApp";
#if USE_ODD_CODEGEN
self.dependencyProvider = [RCTAppDependencyProvider new];
#endif
// You can add your custom initial props in the dictionary below.
// They will be passed down to the ViewController used by React Native.
self.initialProps = [self prepareInitialProps];
@ -149,14 +159,14 @@ static NSString *kBundlePath = @"js/RNTesterApp.ios";
#ifndef RN_DISABLE_OSS_PLUGIN_HEADER
- (nonnull NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents
{
#if USE_OSS_CODEGEN
return [super thirdPartyFabricComponents].mutableCopy;
#else
NSMutableDictionary *dict = [super thirdPartyFabricComponents].mutableCopy;
dict[@"RNTMyNativeView"] = NSClassFromString(@"RNTMyNativeViewComponentView");
dict[@"SampleNativeComponent"] = NSClassFromString(@"RCTSampleNativeComponentComponentView");
if (!dict[@"RNTMyNativeView"]) {
dict[@"RNTMyNativeView"] = NSClassFromString(@"RNTMyNativeViewComponentView");
}
if (!dict[@"SampleNativeComponent"]) {
dict[@"SampleNativeComponent"] = NSClassFromString(@"RCTSampleNativeComponentComponentView");
}
return dict;
#endif
}
#endif