diff --git a/RNTester/RNTester/AppDelegate.mm b/RNTester/RNTester/AppDelegate.mm index 95f00488891..44a7ceda3ca 100644 --- a/RNTester/RNTester/AppDelegate.mm +++ b/RNTester/RNTester/AppDelegate.mm @@ -50,13 +50,6 @@ } @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 @@ -76,12 +69,6 @@ } #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; @@ -98,15 +85,6 @@ 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"]; diff --git a/RNTester/RNTesterPods.xcodeproj/project.pbxproj b/RNTester/RNTesterPods.xcodeproj/project.pbxproj index 917ee51354c..63e244730cb 100644 --- a/RNTester/RNTesterPods.xcodeproj/project.pbxproj +++ b/RNTester/RNTesterPods.xcodeproj/project.pbxproj @@ -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 */ @@ -53,7 +52,6 @@ 5C60EB1B226440DB0018C04F /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = RNTester/AppDelegate.mm; sourceTree = ""; }; 5CB07C99226467E60039471C /* RNTesterTurboModuleProvider.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = RNTesterTurboModuleProvider.mm; path = RNTester/RNTesterTurboModuleProvider.mm; sourceTree = ""; }; 5CB07C9A226467E60039471C /* RNTesterTurboModuleProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RNTesterTurboModuleProvider.h; path = RNTester/RNTesterTurboModuleProvider.h; sourceTree = ""; }; - 68D134432238528800D0B233 /* Swizzle_RCTFabricSurface.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Swizzle_RCTFabricSurface.m; sourceTree = ""; }; 68E1E4BB2230DF2F00570185 /* ComponentRegistry.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ComponentRegistry.cpp; sourceTree = ""; }; 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 = ""; }; @@ -147,7 +145,6 @@ isa = PBXGroup; children = ( 68E1E4BB2230DF2F00570185 /* ComponentRegistry.cpp */, - 68D134432238528800D0B233 /* Swizzle_RCTFabricSurface.m */, ); name = Fabric; sourceTree = ""; @@ -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 */, diff --git a/RNTester/Swizzle_RCTFabricSurface.m b/RNTester/Swizzle_RCTFabricSurface.m deleted file mode 100644 index 60125ccef8d..00000000000 --- a/RNTester/Swizzle_RCTFabricSurface.m +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -#ifdef RN_FABRIC_ENABLED -#import -#import - -// FIXME: remove when resolved https://github.com/facebook/react-native/issues/23910 -@implementation RCTFabricSurface (SwizzleMeTimbers) - -+ (void)load { - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - Class class = [self class]; - - SEL originalSelector = @selector((start)); - SEL swizzledSelector = @selector(xxx_start); - - Method originalMethod = class_getInstanceMethod(class, originalSelector); - Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector); - - BOOL didAddMethod = - class_addMethod(class, - originalSelector, - method_getImplementation(swizzledMethod), - method_getTypeEncoding(swizzledMethod)); - - if (didAddMethod) { - class_replaceMethod(class, - swizzledSelector, - method_getImplementation(originalMethod), - method_getTypeEncoding(originalMethod)); - } else { - method_exchangeImplementations(originalMethod, swizzledMethod); - } - }); -} - -#pragma mark - Method Swizzling - -- (void)xxx_start { - NSLog(@"RCTSurface start: %@", self); -} - -@end -#endif