Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -295,13 +295,6 @@ - (RCTRootViewFactory *)createRCTRootViewFactory
[weakSelf.delegate customizeRootView:(RCTRootView *)rootView];
};

if ([self.delegate respondsToSelector:@selector(extraModulesForBridge:)]) {
configuration.extraModulesForBridge = ^NSArray<id<RCTBridgeModule>> *_Nonnull(RCTBridge *_Nonnull bridge)
{
return [weakSelf.delegate extraModulesForBridge:bridge];
};
}

configuration.jsRuntimeConfiguratorDelegate = self;

return [[RCTRootViewFactory alloc] initWithTurboModuleDelegate:self hostDelegate:self configuration:configuration];
Expand Down
29 changes: 15 additions & 14 deletions packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ typedef void (^RCTLoadSourceForBridgeWithProgressBlock)(
RCTBridge *bridge,
RCTSourceLoadProgressBlock onProgress,
RCTSourceLoadBlock loadCallback);
typedef void (^RCTLoadSourceForBridgeBlock)(RCTBridge *bridge, RCTSourceLoadBlock loadCallback);

#pragma mark - RCTRootViewFactory Configuration
@interface RCTRootViewFactoryConfiguration : NSObject
Expand Down Expand Up @@ -80,7 +79,8 @@ typedef void (^RCTLoadSourceForBridgeBlock)(RCTBridge *bridge, RCTSourceLoadBloc
*
* @returns: a UIView properly configured with a bridge for React Native.
*/
@property (nonatomic, nullable) RCTCreateRootViewWithBridgeBlock createRootViewWithBridge;
@property (nonatomic, nullable) RCTCreateRootViewWithBridgeBlock createRootViewWithBridge __deprecated_msg(
"This API will be removed along with the legacy architecture.");

/**
* Block that allows to override default behavior of creating bridge.
Expand All @@ -93,7 +93,8 @@ typedef void (^RCTLoadSourceForBridgeBlock)(RCTBridge *bridge, RCTSourceLoadBloc
*
* @returns: a newly created instance of RCTBridge.
*/
@property (nonatomic, nullable) RCTCreateBridgeWithDelegateBlock createBridgeWithDelegate;
@property (nonatomic, nullable) RCTCreateBridgeWithDelegateBlock createBridgeWithDelegate __deprecated_msg(
"This API will be removed along with the legacy architecture.");

/**
* Block that allows to customize the rootView that is passed to React Native.
Expand All @@ -112,7 +113,8 @@ typedef void (^RCTLoadSourceForBridgeBlock)(RCTBridge *bridge, RCTSourceLoadBloc
* When running from a locally bundled JS file, this should be a `file://` url
* pointing to a path inside the app resources, e.g. `file://.../main.jsbundle`.
*/
@property (nonatomic, nullable) RCTSourceURLForBridgeBlock sourceURLForBridge;
@property (nonatomic, nullable) RCTSourceURLForBridgeBlock sourceURLForBridge __deprecated_msg(
"This API will be removed along with the legacy architecture.");

/**
* The bridge initializes any registered RCTBridgeModules automatically, however
Expand All @@ -128,12 +130,14 @@ typedef void (^RCTLoadSourceForBridgeBlock)(RCTBridge *bridge, RCTSourceLoadBloc
* not recommended in most cases - if the module methods and behavior do not
* match exactly, it may lead to bugs or crashes.
*/
@property (nonatomic, nullable) RCTExtraModulesForBridgeBlock extraModulesForBridge;
@property (nonatomic, nullable) RCTExtraModulesForBridgeBlock extraModulesForBridge __deprecated_msg(
"This API will be removed along with the legacy architecture.");

/**
* Retrieve the list of lazy-native-modules names for the given bridge.
*/
@property (nonatomic, nullable) RCTExtraLazyModuleClassesForBridge extraLazyModuleClassesForBridge;
@property (nonatomic, nullable) RCTExtraLazyModuleClassesForBridge extraLazyModuleClassesForBridge __deprecated_msg(
"This API will be removed along with the legacy architecture.");

/**
* The bridge will call this block when a module has been called from JS
Expand All @@ -142,20 +146,17 @@ typedef void (^RCTLoadSourceForBridgeBlock)(RCTBridge *bridge, RCTSourceLoadBloc
* 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.
*/
@property (nonatomic, nullable) RCTBridgeDidNotFindModuleBlock bridgeDidNotFindModule;
@property (nonatomic, nullable) RCTBridgeDidNotFindModuleBlock bridgeDidNotFindModule __deprecated_msg(
"This API will be removed along with the legacy architecture.");

/**
* 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 setting this property.
*/
@property (nonatomic, nullable) RCTLoadSourceForBridgeWithProgressBlock loadSourceForBridgeWithProgress;

/**
* Similar to loadSourceForBridgeWithProgress but without progress
* reporting.
*/
@property (nonatomic, nullable) RCTLoadSourceForBridgeBlock loadSourceForBridge;
@property (nonatomic, nullable)
RCTLoadSourceForBridgeWithProgressBlock loadSourceForBridgeWithProgress __deprecated_msg(
"This API will be removed along with the legacy architecture.");

@end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,14 +229,6 @@ - (RCTHost *)createReactHost:(NSDictionary *)launchOptions
reinterpret_cast<facebook::react::JSRuntimeFactory *>(jsRuntimeFactory), &js_runtime_factory_destroy);
}

- (NSArray<id<RCTBridgeModule>> *)extraModulesForBridge:(RCTBridge *)bridge
{
if (_configuration.extraModulesForBridge != nil) {
return _configuration.extraModulesForBridge(bridge);
}
return nil;
}

- (NSURL *)bundleURL
{
return self->_configuration.bundleURLBlock();
Expand Down
1 change: 0 additions & 1 deletion scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api
Original file line number Diff line number Diff line change
Expand Up @@ -1610,7 +1610,6 @@ interface RCTRootViewFactoryConfiguration : public NSObject {
public @property (assign) RCTCustomizeRootViewBlock customizeRootView;
public @property (assign) RCTExtraLazyModuleClassesForBridge extraLazyModuleClassesForBridge;
public @property (assign) RCTExtraModulesForBridgeBlock extraModulesForBridge;
public @property (assign) RCTLoadSourceForBridgeBlock loadSourceForBridge;
public @property (assign) RCTLoadSourceForBridgeWithProgressBlock loadSourceForBridgeWithProgress;
public @property (assign) RCTSourceURLForBridgeBlock sourceURLForBridge;
public @property (weak) id<RCTJSRuntimeConfiguratorProtocol> jsRuntimeConfiguratorDelegate;
Expand Down
1 change: 0 additions & 1 deletion scripts/cxx-api/api-snapshots/ReactAppleFrameworksCxx.api
Original file line number Diff line number Diff line change
Expand Up @@ -1653,7 +1653,6 @@ interface RCTRootViewFactoryConfiguration : public NSObject {
public @property (assign) RCTCustomizeRootViewBlock customizeRootView;
public @property (assign) RCTExtraLazyModuleClassesForBridge extraLazyModuleClassesForBridge;
public @property (assign) RCTExtraModulesForBridgeBlock extraModulesForBridge;
public @property (assign) RCTLoadSourceForBridgeBlock loadSourceForBridge;
public @property (assign) RCTLoadSourceForBridgeWithProgressBlock loadSourceForBridgeWithProgress;
public @property (assign) RCTSourceURLForBridgeBlock sourceURLForBridge;
public @property (weak) id<RCTJSRuntimeConfiguratorProtocol> jsRuntimeConfiguratorDelegate;
Expand Down
1 change: 0 additions & 1 deletion scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api
Original file line number Diff line number Diff line change
Expand Up @@ -1609,7 +1609,6 @@ interface RCTRootViewFactoryConfiguration : public NSObject {
public @property (assign) RCTCustomizeRootViewBlock customizeRootView;
public @property (assign) RCTExtraLazyModuleClassesForBridge extraLazyModuleClassesForBridge;
public @property (assign) RCTExtraModulesForBridgeBlock extraModulesForBridge;
public @property (assign) RCTLoadSourceForBridgeBlock loadSourceForBridge;
public @property (assign) RCTLoadSourceForBridgeWithProgressBlock loadSourceForBridgeWithProgress;
public @property (assign) RCTSourceURLForBridgeBlock sourceURLForBridge;
public @property (weak) id<RCTJSRuntimeConfiguratorProtocol> jsRuntimeConfiguratorDelegate;
Expand Down
1 change: 0 additions & 1 deletion scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api
Original file line number Diff line number Diff line change
Expand Up @@ -1610,7 +1610,6 @@ interface RCTRootViewFactoryConfiguration : public NSObject {
public @property (assign) RCTCustomizeRootViewBlock customizeRootView;
public @property (assign) RCTExtraLazyModuleClassesForBridge extraLazyModuleClassesForBridge;
public @property (assign) RCTExtraModulesForBridgeBlock extraModulesForBridge;
public @property (assign) RCTLoadSourceForBridgeBlock loadSourceForBridge;
public @property (assign) RCTLoadSourceForBridgeWithProgressBlock loadSourceForBridgeWithProgress;
public @property (assign) RCTSourceURLForBridgeBlock sourceURLForBridge;
public @property (weak) id<RCTJSRuntimeConfiguratorProtocol> jsRuntimeConfiguratorDelegate;
Expand Down
Loading