Skip to content

Commit

Permalink
delete unused RCTSurfaceHostingProxyRootView initializers (#38868)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #38868

## Changelog:

[iOS][Breaking] - After [#38864](#38864), these are not needed anymore. there's some logic with the bridge, but since we're treating new arch as one piece moving forward, i don't really think they're that important. plus that logic is like really old.

Reviewed By: mdvacca

Differential Revision: D48140101

fbshipit-source-id: 0137becbfca493589d20f9ac8abace2b4c908ddd
  • Loading branch information
philIip authored and facebook-github-bot committed Aug 17, 2023
1 parent aafbe7a commit 8b4a353
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,6 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, assign) NSTimeInterval loadingViewFadeDuration;
@property (nonatomic, assign) CGSize minimumSize;

- (instancetype)initWithBridge:(RCTBridge *)bridge
moduleName:(NSString *)moduleName
initialProperties:(NSDictionary *)initialProperties NS_DESIGNATED_INITIALIZER;

- (instancetype)initWithBundleURL:(NSURL *)bundleURL
moduleName:(NSString *)moduleName
initialProperties:(NSDictionary *)initialProperties
launchOptions:(NSDictionary *)launchOptions;

/**
* Bridgeless mode initializer
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,46 +53,6 @@ @implementation RCTSurfaceHostingProxyRootView {
RCTModuleRegistry *_moduleRegistry;
}

- (instancetype)initWithBridge:(RCTBridge *)bridge
moduleName:(NSString *)moduleName
initialProperties:(NSDictionary *)initialProperties
{
RCTAssertMainQueue();
RCTAssert(bridge, @"A bridge instance is required to create an RCTSurfaceHostingProxyRootView");
RCTAssert(moduleName, @"A moduleName is required to create an RCTSurfaceHostingProxyRootView");

RCT_PROFILE_BEGIN_EVENT(RCTProfileTagAlways, @"-[RCTSurfaceHostingProxyRootView init]", nil);

_bridge = bridge;
_minimumSize = CGSizeZero;

if (!bridge.isLoading) {
[bridge.performanceLogger markStartForTag:RCTPLTTI];
}

// `RCTRootViewSizeFlexibilityNone` is the RCTRootView's default.
RCTSurfaceSizeMeasureMode sizeMeasureMode = convertToSurfaceSizeMeasureMode(RCTRootViewSizeFlexibilityNone);

self = [super initWithBridge:bridge
moduleName:moduleName
initialProperties:initialProperties
sizeMeasureMode:sizeMeasureMode];

RCT_PROFILE_END_EVENT(RCTProfileTagAlways, @"");

return self;
}

- (instancetype)initWithBundleURL:(NSURL *)bundleURL
moduleName:(NSString *)moduleName
initialProperties:(NSDictionary *)initialProperties
launchOptions:(NSDictionary *)launchOptions
{
RCTBridge *bridge = [[RCTBridge alloc] initWithBundleURL:bundleURL moduleProvider:nil launchOptions:launchOptions];

return [self initWithBridge:bridge moduleName:moduleName initialProperties:initialProperties];
}

- (instancetype)initWithSurface:(id<RCTSurfaceProtocol>)surface moduleRegistry:(RCTModuleRegistry *)moduleRegistry
{
if (self = [self initWithSurface:surface]) {
Expand Down

0 comments on commit 8b4a353

Please sign in to comment.