Skip to content

Commit

Permalink
Remove hacks from RNTester (#24924)
Browse files Browse the repository at this point in the history
Summary:
Removes the hacks we had in place to help Fabric run in RNTester. Runs fine without them now, so let's remove em!

## Changelog

[Internal] [Removed] - RNTester Fabric hax
Pull Request resolved: #24924

Differential Revision: D15391418

Pulled By: cpojer

fbshipit-source-id: d800f4c2f68f5e68a20a03c65fdf0317072d2c5e
  • Loading branch information
ericlewis authored and facebook-github-bot committed May 17, 2019
1 parent 7abfd23 commit cf9babf
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 76 deletions.
22 changes: 0 additions & 22 deletions RNTester/RNTester/AppDelegate.mm
Expand Up @@ -50,13 +50,6 @@ @interface AppDelegate() <RCTCxxBridgeDelegate>{
}
@end

#ifdef RN_FABRIC_ENABLED
// FIXME: remove when resolved https://github.com/facebook/react-native/issues/23910
@interface RCTSurfacePresenter ()
-(void)_startAllSurfaces;
@end
#endif

@implementation AppDelegate

- (BOOL)application:(__unused UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
Expand All @@ -76,12 +69,6 @@ - (BOOL)application:(__unused UIApplication *)application didFinishLaunchingWith
}

#ifdef RN_FABRIC_ENABLED
// FIXME: remove when resolved https://github.com/facebook/react-native/issues/23910
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(handleJavaScriptDidLoadNotification:)
name:RCTJavaScriptDidLoadNotification
object:_bridge];

_surfacePresenter = [[RCTSurfacePresenter alloc] initWithBridge:_bridge config:nil];
_bridge.surfacePresenter = _surfacePresenter;

Expand All @@ -98,15 +85,6 @@ - (BOOL)application:(__unused UIApplication *)application didFinishLaunchingWith
return YES;
}

#ifdef RN_FABRIC_ENABLED
// FIXME: remove when resolved https://github.com/facebook/react-native/issues/23910
- (void)handleJavaScriptDidLoadNotification:(__unused NSNotification*)notification {
dispatch_async(dispatch_get_main_queue(), ^{
[self->_surfacePresenter _startAllSurfaces];
});
}
#endif

- (NSURL *)sourceURLForBridge:(__unused RCTBridge *)bridge
{
NSString *bundlePrefix = [[[NSBundle mainBundle] infoDictionary] valueForKey:@"RN_BUNDLE_PREFIX"];
Expand Down
4 changes: 0 additions & 4 deletions RNTester/RNTesterPods.xcodeproj/project.pbxproj
Expand Up @@ -18,7 +18,6 @@
3D56F9F11D6F6E9B00F53A06 /* RNTesterBundle.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 3D13F83E1D6F6AE000E69E0E /* RNTesterBundle.bundle */; };
5C60EB1C226440DB0018C04F /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C60EB1B226440DB0018C04F /* AppDelegate.mm */; };
5CB07C9B226467E60039471C /* RNTesterTurboModuleProvider.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5CB07C99226467E60039471C /* RNTesterTurboModuleProvider.mm */; };
68D134442238528800D0B233 /* Swizzle_RCTFabricSurface.m in Sources */ = {isa = PBXBuildFile; fileRef = 68D134432238528800D0B233 /* Swizzle_RCTFabricSurface.m */; };
68E1E4BC2230DF2F00570185 /* ComponentRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 68E1E4BB2230DF2F00570185 /* ComponentRegistry.cpp */; };
B9C5BB1881F54450DBCA70F5 /* libPods-RNTester.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8508AD3C1DC3509924E63948 /* libPods-RNTester.a */; };
/* End PBXBuildFile section */
Expand Down Expand Up @@ -53,7 +52,6 @@
5C60EB1B226440DB0018C04F /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = RNTester/AppDelegate.mm; sourceTree = "<group>"; };
5CB07C99226467E60039471C /* RNTesterTurboModuleProvider.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = RNTesterTurboModuleProvider.mm; path = RNTester/RNTesterTurboModuleProvider.mm; sourceTree = "<group>"; };
5CB07C9A226467E60039471C /* RNTesterTurboModuleProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RNTesterTurboModuleProvider.h; path = RNTester/RNTesterTurboModuleProvider.h; sourceTree = "<group>"; };
68D134432238528800D0B233 /* Swizzle_RCTFabricSurface.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Swizzle_RCTFabricSurface.m; sourceTree = "<group>"; };
68E1E4BB2230DF2F00570185 /* ComponentRegistry.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ComponentRegistry.cpp; sourceTree = "<group>"; };
8508AD3C1DC3509924E63948 /* libPods-RNTester.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RNTester.a"; sourceTree = BUILT_PRODUCTS_DIR; };
98233960D1D6A1977D1C7EAF /* Pods-RNTester.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNTester.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RNTester/Pods-RNTester.debug.xcconfig"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -147,7 +145,6 @@
isa = PBXGroup;
children = (
68E1E4BB2230DF2F00570185 /* ComponentRegistry.cpp */,
68D134432238528800D0B233 /* Swizzle_RCTFabricSurface.m */,
);
name = Fabric;
sourceTree = "<group>";
Expand Down Expand Up @@ -333,7 +330,6 @@
files = (
68E1E4BC2230DF2F00570185 /* ComponentRegistry.cpp in Sources */,
272E6B3F1BEA849E001FCF37 /* UpdatePropertiesExampleView.m in Sources */,
68D134442238528800D0B233 /* Swizzle_RCTFabricSurface.m in Sources */,
5CB07C9B226467E60039471C /* RNTesterTurboModuleProvider.mm in Sources */,
27F441EC1BEBE5030039B79C /* FlexibleSizeExampleView.m in Sources */,
5C60EB1C226440DB0018C04F /* AppDelegate.mm in Sources */,
Expand Down
50 changes: 0 additions & 50 deletions RNTester/Swizzle_RCTFabricSurface.m

This file was deleted.

0 comments on commit cf9babf

Please sign in to comment.