Skip to content

Commit de07bfa

Browse files
Remove newArchEnabled from root view factory initializers (#58488)
Summary: Remove the unused `newArchEnabled` parameter from `RCTRootViewFactoryConfiguration` initializers and update callers. Changelog: [iOS][Breaking] - Remove `newArchEnabled` from `RCTRootViewFactoryConfiguration` initializers; use `initWithBundleURL:` or `initWithBundleURLBlock:` instead Differential Revision: D119673104
1 parent a7f5e2d commit de07bfa

6 files changed

Lines changed: 9 additions & 20 deletions

File tree

packages/react-native/Libraries/AppDelegate/RCTReactNativeFactory.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ - (RCTRootViewFactory *)createRCTRootViewFactory
289289
};
290290

291291
RCTRootViewFactoryConfiguration *configuration =
292-
[[RCTRootViewFactoryConfiguration alloc] initWithBundleURLBlock:bundleUrlBlock newArchEnabled:YES];
292+
[[RCTRootViewFactoryConfiguration alloc] initWithBundleURLBlock:bundleUrlBlock];
293293

294294
configuration.customizeRootView = ^(UIView *_Nonnull rootView) {
295295
[weakSelf.delegate customizeRootView:(RCTRootView *)rootView];

packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,9 @@ typedef void (^RCTLoadSourceForBridgeBlock)(RCTBridge *bridge, RCTSourceLoadBloc
5555
* pointing to a path inside the app resources, e.g. `file://.../main.jsbundle`.
5656
*
5757
*/
58-
- (instancetype)initWithBundleURLBlock:(RCTBundleURLBlock)bundleURLBlock
59-
newArchEnabled:(BOOL)newArchEnabled NS_DESIGNATED_INITIALIZER;
58+
- (instancetype)initWithBundleURLBlock:(RCTBundleURLBlock)bundleURLBlock NS_DESIGNATED_INITIALIZER;
6059

61-
- (instancetype)initWithBundleURL:(NSURL *)bundleURL newArchEnabled:(BOOL)newArchEnabled;
60+
- (instancetype)initWithBundleURL:(NSURL *)bundleURL;
6261

6362
/**
6463
* Block that allows to override logic of creating root view instance.

packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.mm

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,6 @@
3232

3333
@implementation RCTRootViewFactoryConfiguration
3434

35-
- (instancetype)initWithBundleURL:(NSURL *)bundleURL newArchEnabled:(BOOL)newArchEnabled
36-
{
37-
return [self initWithBundleURL:bundleURL];
38-
}
39-
40-
- (instancetype)initWithBundleURLBlock:(RCTBundleURLBlock)bundleURLBlock newArchEnabled:(BOOL)newArchEnabled
41-
{
42-
return [self initWithBundleURLBlock:bundleURLBlock];
43-
}
44-
4535
- (instancetype)initWithBundleURLBlock:(RCTBundleURLBlock)bundleURLBlock
4636
{
4737
if (self = [super init]) {

scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1694,8 +1694,8 @@ interface RCTRootViewFactoryConfiguration : public NSObject {
16941694
public @property (assign) RCTLoadSourceForBridgeWithProgressBlock loadSourceForBridgeWithProgress;
16951695
public @property (assign) RCTSourceURLForBridgeBlock sourceURLForBridge;
16961696
public @property (weak) id<RCTJSRuntimeConfiguratorProtocol> jsRuntimeConfiguratorDelegate;
1697-
public virtual instancetype initWithBundleURL:newArchEnabled:(NSURL* bundleURL, BOOL newArchEnabled);
1698-
public virtual instancetype initWithBundleURLBlock:newArchEnabled:(RCTBundleURLBlock bundleURLBlock, BOOL newArchEnabled);
1697+
public virtual instancetype initWithBundleURL:(NSURL* bundleURL);
1698+
public virtual instancetype initWithBundleURLBlock:(RCTBundleURLBlock bundleURLBlock);
16991699
}
17001700

17011701
interface RCTSafeAreaViewComponentView : public RCTViewComponentView {

scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1693,8 +1693,8 @@ interface RCTRootViewFactoryConfiguration : public NSObject {
16931693
public @property (assign) RCTLoadSourceForBridgeWithProgressBlock loadSourceForBridgeWithProgress;
16941694
public @property (assign) RCTSourceURLForBridgeBlock sourceURLForBridge;
16951695
public @property (weak) id<RCTJSRuntimeConfiguratorProtocol> jsRuntimeConfiguratorDelegate;
1696-
public virtual instancetype initWithBundleURL:newArchEnabled:(NSURL* bundleURL, BOOL newArchEnabled);
1697-
public virtual instancetype initWithBundleURLBlock:newArchEnabled:(RCTBundleURLBlock bundleURLBlock, BOOL newArchEnabled);
1696+
public virtual instancetype initWithBundleURL:(NSURL* bundleURL);
1697+
public virtual instancetype initWithBundleURLBlock:(RCTBundleURLBlock bundleURLBlock);
16981698
}
16991699

17001700
interface RCTSafeAreaViewComponentView : public RCTViewComponentView {

scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1694,8 +1694,8 @@ interface RCTRootViewFactoryConfiguration : public NSObject {
16941694
public @property (assign) RCTLoadSourceForBridgeWithProgressBlock loadSourceForBridgeWithProgress;
16951695
public @property (assign) RCTSourceURLForBridgeBlock sourceURLForBridge;
16961696
public @property (weak) id<RCTJSRuntimeConfiguratorProtocol> jsRuntimeConfiguratorDelegate;
1697-
public virtual instancetype initWithBundleURL:newArchEnabled:(NSURL* bundleURL, BOOL newArchEnabled);
1698-
public virtual instancetype initWithBundleURLBlock:newArchEnabled:(RCTBundleURLBlock bundleURLBlock, BOOL newArchEnabled);
1697+
public virtual instancetype initWithBundleURL:(NSURL* bundleURL);
1698+
public virtual instancetype initWithBundleURLBlock:(RCTBundleURLBlock bundleURLBlock);
16991699
}
17001700

17011701
interface RCTSafeAreaViewComponentView : public RCTViewComponentView {

0 commit comments

Comments
 (0)