From f19371f28ddbb660ed08a3e38aef85f27f0876a7 Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Wed, 1 May 2024 03:54:55 -0700 Subject: [PATCH] Remove `getSurfacePresenter` and `getModuleRegistry` from RCTHost Summary: This change removes a couple of method from RCTHost which were not following the iOS convention for names. We deprecated them in 0.74 and now that the branch is cut, we can remove them. ## Changelog: [iOS][Breaking] - Remove `getSurfacePresenter` and `getModuleRegistry` from RCTHost Reviewed By: sammy-SC Differential Revision: D56633554 fbshipit-source-id: 88fd1525bfe68ca1f6c2d8403d0dec505a23e9f8 --- .../react/runtime/platform/ios/ReactCommon/RCTHost.h | 6 ------ .../runtime/platform/ios/ReactCommon/RCTHost.mm | 12 ------------ 2 files changed, 18 deletions(-) diff --git a/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.h b/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.h index 87f6de0b7fa..8f323006072 100644 --- a/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.h +++ b/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.h @@ -77,12 +77,6 @@ typedef std::shared_ptr (^RCTHostJSEngineProv - (RCTFabricSurface *)createSurfaceWithModuleName:(NSString *)moduleName initialProperties:(NSDictionary *)properties; -- (RCTSurfacePresenter *)getSurfacePresenter __attribute__((deprecated("Use `surfacePresenter` property instead."))); - -// Native module API - -- (RCTModuleRegistry *)getModuleRegistry __attribute__((deprecated("Use `moduleRegistry` property instead."))); - @end NS_ASSUME_NONNULL_END diff --git a/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.mm b/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.mm index da00e6805ef..add74db26c7 100644 --- a/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.mm +++ b/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.mm @@ -289,23 +289,11 @@ class RCTHostHostTargetDelegate : public facebook::react::jsinspector_modern::Ho return _moduleRegistry; } -// Deprecated -- (RCTModuleRegistry *)getModuleRegistry -{ - return self.moduleRegistry; -} - - (RCTSurfacePresenter *)surfacePresenter { return [_instance surfacePresenter]; } -// Deprecated -- (RCTSurfacePresenter *)getSurfacePresenter -{ - return self.surfacePresenter; -} - - (void)callFunctionOnJSModule:(NSString *)moduleName method:(NSString *)method args:(NSArray *)args { [_instance callFunctionOnJSModule:moduleName method:method args:args];