File tree Expand file tree Collapse file tree
ReactCommon/react/runtime/platform/ios/ReactCommon Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,6 +18,14 @@ NS_ASSUME_NONNULL_BEGIN
1818
1919@interface RCTBridgeProxy : NSProxy
2020
21+ - (instancetype )initWithViewRegistry : (RCTViewRegistry *)viewRegistry
22+ moduleRegistry : (RCTModuleRegistry *)moduleRegistry
23+ bundleManager : (RCTBundleManager *)bundleManager
24+ callableJSModules : (RCTCallableJSModules *)callableJSModules
25+ dispatchToJSThread : (void (^)(dispatch_block_t ))dispatchToJSThread
26+ registerSegmentWithId : (void (^)(NSNumber *, NSString *))registerSegmentWithId
27+ runtime : (void *)runtime __deprecated;
28+
2129- (instancetype )initWithViewRegistry : (RCTViewRegistry *)viewRegistry
2230 moduleRegistry : (RCTModuleRegistry *)moduleRegistry
2331 bundleManager : (RCTBundleManager *)bundleManager
Original file line number Diff line number Diff line change @@ -41,6 +41,24 @@ @implementation RCTBridgeProxy {
4141 void *_runtime;
4242}
4343
44+ - (instancetype )initWithViewRegistry : (RCTViewRegistry *)viewRegistry
45+ moduleRegistry : (RCTModuleRegistry *)moduleRegistry
46+ bundleManager : (RCTBundleManager *)bundleManager
47+ callableJSModules : (RCTCallableJSModules *)callableJSModules
48+ dispatchToJSThread : (void (^)(dispatch_block_t ))dispatchToJSThread
49+ registerSegmentWithId : (void (^)(NSNumber *, NSString *))registerSegmentWithId
50+ runtime : (void *)runtime
51+ {
52+ return [self initWithViewRegistry: viewRegistry
53+ moduleRegistry: moduleRegistry
54+ bundleManager: bundleManager
55+ callableJSModules: callableJSModules
56+ dispatchToJSThread: dispatchToJSThread
57+ registerSegmentWithId: registerSegmentWithId
58+ runtime: runtime
59+ launchOptions: @{}];
60+ }
61+
4462- (instancetype )initWithViewRegistry : (RCTViewRegistry *)viewRegistry
4563 moduleRegistry : (RCTModuleRegistry *)moduleRegistry
4664 bundleManager : (RCTBundleManager *)bundleManager
Original file line number Diff line number Diff line change @@ -59,6 +59,11 @@ typedef std::shared_ptr<facebook::react::JSRuntimeFactory> (^RCTHostJSEngineProv
5959 jsEngineProvider : (RCTHostJSEngineProvider)jsEngineProvider
6060 launchOptions : (nullable NSDictionary *)launchOptions __deprecated;
6161
62+ - (instancetype )initWithBundleURL : (NSURL *)bundleURL
63+ hostDelegate : (id <RCTHostDelegate>)hostDelegate
64+ turboModuleManagerDelegate : (id <RCTTurboModuleManagerDelegate>)turboModuleManagerDelegate
65+ jsEngineProvider : (RCTHostJSEngineProvider)jsEngineProvider __deprecated;
66+
6267@property (nonatomic , weak , nullable ) id <RCTHostRuntimeDelegate> runtimeDelegate;
6368
6469@property (nonatomic , readonly ) RCTSurfacePresenter *surfacePresenter;
Original file line number Diff line number Diff line change @@ -79,6 +79,21 @@ + (void)initialize
7979 _RCTInitializeJSThreadConstantInternal ();
8080}
8181
82+ - (instancetype )initWithBundleURL : (NSURL *)bundleURL
83+ hostDelegate : (id <RCTHostDelegate>)hostDelegate
84+ turboModuleManagerDelegate : (id <RCTTurboModuleManagerDelegate>)turboModuleManagerDelegate
85+ jsEngineProvider : (RCTHostJSEngineProvider)jsEngineProvider
86+ {
87+ return [self
88+ initWithBundleURLProvider: ^{
89+ return bundleURL;
90+ }
91+ hostDelegate: hostDelegate
92+ turboModuleManagerDelegate: turboModuleManagerDelegate
93+ jsEngineProvider: jsEngineProvider
94+ launchOptions: @{}];
95+ }
96+
8297- (instancetype )initWithBundleURL : (NSURL *)bundleURL
8398 hostDelegate : (id <RCTHostDelegate>)hostDelegate
8499 turboModuleManagerDelegate : (id <RCTTurboModuleManagerDelegate>)turboModuleManagerDelegate
Original file line number Diff line number Diff line change @@ -56,14 +56,22 @@ typedef void (^_Null_unspecified RCTInstanceInitialBundleLoadCompletionBlock)();
5656 */
5757@interface RCTInstance : NSObject
5858
59+ - (instancetype )initWithDelegate : (id <RCTInstanceDelegate>)delegate
60+ jsRuntimeFactory : (std::shared_ptr<facebook::react::JSRuntimeFactory>)jsRuntimeFactory
61+ bundleManager : (RCTBundleManager *)bundleManager
62+ turboModuleManagerDelegate : (id <RCTTurboModuleManagerDelegate>)turboModuleManagerDelegate
63+ onInitialBundleLoad : (RCTInstanceInitialBundleLoadCompletionBlock)onInitialBundleLoad
64+ moduleRegistry : (RCTModuleRegistry *)moduleRegistry
65+ parentInspectorTarget : (facebook::react::jsinspector_modern::PageTarget *)parentInspectorTarget __deprecated;
66+
5967- (instancetype )initWithDelegate : (id <RCTInstanceDelegate>)delegate
6068 jsRuntimeFactory : (std::shared_ptr<facebook::react::JSRuntimeFactory>)jsRuntimeFactory
6169 bundleManager : (RCTBundleManager *)bundleManager
6270 turboModuleManagerDelegate : (id <RCTTurboModuleManagerDelegate>)turboModuleManagerDelegate
6371 onInitialBundleLoad : (RCTInstanceInitialBundleLoadCompletionBlock)onInitialBundleLoad
6472 moduleRegistry : (RCTModuleRegistry *)moduleRegistry
6573 parentInspectorTarget : (facebook::react::jsinspector_modern::PageTarget *)parentInspectorTarget
66- launchOptions : (nullable NSDictionary *)launchOptions ;
74+ launchOptions : (nullable NSDictionary *)launchOptions NS_DESIGNATED_INITIALIZER ;
6775
6876- (void )callFunctionOnJSModule : (NSString *)moduleName method : (NSString *)method args : (NSArray *)args ;
6977
Original file line number Diff line number Diff line change @@ -93,6 +93,24 @@ @implementation RCTInstance {
9393
9494#pragma mark - Public
9595
96+ - (instancetype )initWithDelegate : (id <RCTInstanceDelegate>)delegate
97+ jsRuntimeFactory : (std::shared_ptr<facebook::react::JSRuntimeFactory>)jsRuntimeFactory
98+ bundleManager : (RCTBundleManager *)bundleManager
99+ turboModuleManagerDelegate : (id <RCTTurboModuleManagerDelegate>)turboModuleManagerDelegate
100+ onInitialBundleLoad : (RCTInstanceInitialBundleLoadCompletionBlock)onInitialBundleLoad
101+ moduleRegistry : (RCTModuleRegistry *)moduleRegistry
102+ parentInspectorTarget : (facebook::react::jsinspector_modern::PageTarget *)parentInspectorTarget
103+ {
104+ return [self initWithDelegate: delegate
105+ jsRuntimeFactory: jsRuntimeFactory
106+ bundleManager: bundleManager
107+ turboModuleManagerDelegate: turboModuleManagerDelegate
108+ onInitialBundleLoad: onInitialBundleLoad
109+ moduleRegistry: moduleRegistry
110+ parentInspectorTarget: parentInspectorTarget
111+ launchOptions: @{}];
112+ }
113+
96114- (instancetype )initWithDelegate : (id <RCTInstanceDelegate>)delegate
97115 jsRuntimeFactory : (std::shared_ptr<facebook::react::JSRuntimeFactory>)jsRuntimeFactory
98116 bundleManager : (RCTBundleManager *)bundleManager
You can’t perform that action at this time.
0 commit comments