diff --git a/packages/react-native/Libraries/AppDelegate/RCTDefaultReactNativeFactoryDelegate.mm b/packages/react-native/Libraries/AppDelegate/RCTDefaultReactNativeFactoryDelegate.mm index d94631a23d82..e72ceced8275 100644 --- a/packages/react-native/Libraries/AppDelegate/RCTDefaultReactNativeFactoryDelegate.mm +++ b/packages/react-native/Libraries/AppDelegate/RCTDefaultReactNativeFactoryDelegate.mm @@ -26,13 +26,6 @@ @implementation RCTDefaultReactNativeFactoryDelegate { @synthesize dependencyProvider; -- (NSURL *_Nullable)sourceURLForBridge:(nonnull RCTBridge *)bridge -{ - [NSException raise:@"RCTBridgeDelegate::sourceURLForBridge not implemented" - format:@"Subclasses must implement a valid sourceURLForBridge method"]; - return nil; -} - - (UIViewController *)createRootViewController { return [UIViewController new]; @@ -111,11 +104,6 @@ - (void)hostDidStart:(RCTHost *)host #pragma mark - RCTArchConfiguratorProtocol -- (BOOL)newArchEnabled -{ - return YES; -} - - (Class)getModuleClassFromName:(const char *)name { return nullptr; @@ -126,11 +114,4 @@ - (Class)getModuleClassFromName:(const char *)name return nullptr; } -- (void)loadSourceForBridge:(RCTBridge *)bridge - onProgress:(RCTSourceLoadProgressBlock)onProgress - onComplete:(RCTSourceLoadBlock)loadCallback -{ - [RCTJavaScriptLoader loadBundleAtURL:[self sourceURLForBridge:bridge] onProgress:onProgress onComplete:loadCallback]; -} - @end diff --git a/packages/react-native/Libraries/AppDelegate/RCTReactNativeFactory.mm b/packages/react-native/Libraries/AppDelegate/RCTReactNativeFactory.mm index e4ee18ccb518..f5d7e554e672 100644 --- a/packages/react-native/Libraries/AppDelegate/RCTReactNativeFactory.mm +++ b/packages/react-native/Libraries/AppDelegate/RCTReactNativeFactory.mm @@ -289,17 +289,12 @@ - (RCTRootViewFactory *)createRCTRootViewFactory }; RCTRootViewFactoryConfiguration *configuration = - [[RCTRootViewFactoryConfiguration alloc] initWithBundleURLBlock:bundleUrlBlock newArchEnabled:YES]; + [[RCTRootViewFactoryConfiguration alloc] initWithBundleURLBlock:bundleUrlBlock]; configuration.customizeRootView = ^(UIView *_Nonnull rootView) { [weakSelf.delegate customizeRootView:(RCTRootView *)rootView]; }; - configuration.sourceURLForBridge = ^NSURL *_Nullable(RCTBridge *_Nonnull bridge) - { - return [weakSelf.delegate bundleURL]; - }; - if ([self.delegate respondsToSelector:@selector(extraModulesForBridge:)]) { configuration.extraModulesForBridge = ^NSArray> *_Nonnull(RCTBridge *_Nonnull bridge) { diff --git a/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.h b/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.h index 000963c81e1a..53ade7d6fef2 100644 --- a/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.h +++ b/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.h @@ -6,11 +6,11 @@ */ #import +#import #import #import #import "RCTJSRuntimeConfiguratorProtocol.h" -@protocol RCTCxxBridgeDelegate; @protocol RCTComponentViewFactoryComponentProvider; @protocol RCTTurboModuleManagerDelegate; @protocol RCTHostDelegate; @@ -55,10 +55,16 @@ typedef void (^RCTLoadSourceForBridgeBlock)(RCTBridge *bridge, RCTSourceLoadBloc * pointing to a path inside the app resources, e.g. `file://.../main.jsbundle`. * */ +- (instancetype)initWithBundleURLBlock:(RCTBundleURLBlock)bundleURLBlock NS_DESIGNATED_INITIALIZER; + +- (instancetype)initWithBundleURL:(NSURL *)bundleURL; + - (instancetype)initWithBundleURLBlock:(RCTBundleURLBlock)bundleURLBlock - newArchEnabled:(BOOL)newArchEnabled NS_DESIGNATED_INITIALIZER; + newArchEnabled:(BOOL)newArchEnabled + __deprecated_msg("The flag is ignored; use initWithBundleURLBlock:."); -- (instancetype)initWithBundleURL:(NSURL *)bundleURL newArchEnabled:(BOOL)newArchEnabled; +- (instancetype)initWithBundleURL:(NSURL *)bundleURL + newArchEnabled:(BOOL)newArchEnabled __deprecated_msg("The flag is ignored; use initWithBundleURL:."); /** * Block that allows to override logic of creating root view instance. diff --git a/packages/react-native/Libraries/Image/RCTImageStoreManager.h b/packages/react-native/Libraries/Image/RCTImageStoreManager.h index 61f324d51cd4..87cd99a3ed61 100644 --- a/packages/react-native/Libraries/Image/RCTImageStoreManager.h +++ b/packages/react-native/Libraries/Image/RCTImageStoreManager.h @@ -40,12 +40,6 @@ @end -@interface RCTBridge (RCTImageStoreManager) - -@property (nonatomic, readonly) RCTImageStoreManager *imageStoreManager; - -@end - @interface RCTBridgeProxy (RCTImageStoreManager) @property (nonatomic, readonly) RCTImageStoreManager *imageStoreManager; diff --git a/packages/react-native/Libraries/Network/RCTNetworking.h b/packages/react-native/Libraries/Network/RCTNetworking.h index 430c94f582e7..f6e1313296b6 100644 --- a/packages/react-native/Libraries/Network/RCTNetworking.h +++ b/packages/react-native/Libraries/Network/RCTNetworking.h @@ -61,12 +61,6 @@ @end -@interface RCTBridge (RCTNetworking) - -@property (nonatomic, readonly) RCTNetworking *networking; - -@end - @interface RCTBridgeProxy (RCTNetworking) @property (nonatomic, readonly) RCTNetworking *networking; diff --git a/packages/react-native/React/Base/RCTBridge.h b/packages/react-native/React/Base/RCTBridge.h index 38894bea192b..a161887ca87a 100644 --- a/packages/react-native/React/Base/RCTBridge.h +++ b/packages/react-native/React/Base/RCTBridge.h @@ -43,15 +43,6 @@ NSString *RCTBridgeModuleNameForClass(Class bridgeModuleClass); */ NSMutableArray *getModulesLoadedWithOldArch(void); -/** - * The New Architecture is enabled by default. These APIs are no-ops and will - * be removed in a future release. - */ -BOOL RCTTurboModuleEnabled(void) - __attribute__((deprecated("TurboModules are always enabled; this always returns YES (NO in test env)."))); -void RCTEnableTurboModule(BOOL enabled) - __attribute__((deprecated("No-op. The New Architecture is enabled by default."))); - #ifndef RCT_REMOVE_LEGACY_MODULE_INTEROP // Turn on TurboModule interop BOOL RCTTurboModuleInteropEnabled(void); @@ -64,9 +55,6 @@ BOOL RCTFabricInteropLayerEnabled(void); void RCTEnableFabricInteropLayer(BOOL enabled); #endif // RCT_REMOVE_LEGACY_COMPONENT_INTEROP -BOOL RCTUIManagerDispatchAccessibilityManagerInitOntoMain(void); -void RCTUIManagerSetDispatchAccessibilityManagerInitOntoMain(BOOL enabled); - typedef enum { kRCTBridgeProxyLoggingLevelNone, kRCTBridgeProxyLoggingLevelWarning, @@ -124,17 +112,6 @@ RCT_EXTERN_C_END launchOptions:(NSDictionary *)launchOptions __deprecated_msg("This API will be removed along with the legacy architecture."); -/** - * This method is used to call functions in the JavaScript application context. - * It is primarily intended for use by modules that require two-way communication - * with the JavaScript code. Safe to call from any thread. - */ -- (void)enqueueJSCall:(NSString *)moduleDotMethod args:(NSArray *)args; -- (void)enqueueJSCall:(NSString *)module - method:(NSString *)method - args:(NSArray *)args - completion:(dispatch_block_t)completion; - /** * This method registers the file path of an additional JS segment by its ID. * @@ -159,38 +136,22 @@ RCT_EXTERN_C_END * When a NativeModule performs a lookup for a TurboModule, we need to query * the TurboModuleRegistry. */ -- (void)setRCTTurboModuleRegistry:(id)turboModuleRegistry; +- (void)setRCTTurboModuleRegistry:(id)turboModuleRegistry + __deprecated_msg("This API will be removed along with the legacy architecture."); /** * This hook is called by the TurboModule infra with every ObjC module that's created. * It allows the bridge to attach properties to ObjC modules that give those modules * access to Bridge APIs. */ -- (RCTBridgeModuleDecorator *)bridgeModuleDecorator; - -/** - * Convenience method for retrieving all modules conforming to a given protocol. - * Modules will be synchronously instantiated if they haven't already been, - * potentially blocking both the calling thread and main thread for a short time. - */ -- (NSArray *)modulesConformingToProtocol:(Protocol *)protocol; - -/** - * Test if a module has been initialized. Use this prior to calling - * `moduleForClass:` or `moduleForName:` if you do not want to cause the module - * to be instantiated if it hasn't been already. - */ -- (BOOL)moduleIsInitialized:(Class)moduleClass; - -/** - * All registered bridge module classes. - */ -@property (nonatomic, copy, readonly) NSArray *moduleClasses; +- (RCTBridgeModuleDecorator *) + bridgeModuleDecorator __deprecated_msg("This API will be removed along with the legacy architecture."); /** * URL of the script that was loaded into the bridge. */ -@property (nonatomic, strong, readonly) NSURL *bundleURL; +@property (nonatomic, strong, readonly) + NSURL *bundleURL __deprecated_msg("This API will be removed along with the legacy architecture."); /** * The class of the executor currently being used. Changes to this value will @@ -198,11 +159,6 @@ RCT_EXTERN_C_END */ @property (nonatomic, strong) Class executorClass; -/** - * The delegate provided during the bridge initialization - */ -@property (nonatomic, weak, readonly) id delegate; - /** * The launch options that were used to initialize the bridge. */ @@ -223,29 +179,9 @@ RCT_EXTERN_C_END */ @property (nonatomic, readonly, strong) RCTPerformanceLogger *performanceLogger; -/** - * Reload the bundle and reset executor & modules. Safe to call from any thread. - */ -- (void)reload __deprecated_msg("Use RCTReloadCommand instead"); - -/** - * Reload the bundle and reset executor & modules. Safe to call from any thread. - */ -- (void)reloadWithReason:(NSString *)reason __deprecated_msg("Use RCTReloadCommand instead"); - /** * Handle notifications for a fast refresh. Safe to call from any thread. */ - (void)onFastRefresh; -/** - * Inform the bridge, and anything subscribing to it, that it should reload. - */ -- (void)requestReload __deprecated_msg("Use RCTReloadCommand instead"); - -/** - * Says whether bridge has started receiving calls from JavaScript. - */ -- (BOOL)isBatchActive; - @end diff --git a/packages/react-native/React/Base/RCTBridge.mm b/packages/react-native/React/Base/RCTBridge.mm index ec1c948ed964..93d5bd2344d0 100644 --- a/packages/react-native/React/Base/RCTBridge.mm +++ b/packages/react-native/React/Base/RCTBridge.mm @@ -182,16 +182,6 @@ void RCTRegisterModule(Class moduleClass) return RCTDropReactPrefixes(name); } -BOOL RCTTurboModuleEnabled(void) -{ - return YES; -} - -void RCTEnableTurboModule(BOOL enabled) -{ - // The new Architecture is enabled by default and we are ignoring changes to the TurboModule system. -} - #ifndef RCT_REMOVE_LEGACY_MODULE_INTEROP static BOOL turboModuleInteropEnabled = NO; BOOL RCTTurboModuleInteropEnabled(void) @@ -228,17 +218,6 @@ void RCTSetTurboModuleInteropBridgeProxyLogLevel(RCTBridgeProxyLoggingLevel logL bridgeProxyLoggingLevel = logLevel; } -BOOL kDispatchAccessibilityManagerInitOntoMain = NO; -BOOL RCTUIManagerDispatchAccessibilityManagerInitOntoMain(void) -{ - return kDispatchAccessibilityManagerInitOntoMain; -} - -void RCTUIManagerSetDispatchAccessibilityManagerInitOntoMain(BOOL enabled) -{ - kDispatchAccessibilityManagerInitOntoMain = enabled; -} - @implementation RCTBridge - (instancetype)initWithDelegate:(id)delegate launchOptions:(NSDictionary *)launchOptions { @@ -252,17 +231,6 @@ - (instancetype)initWithBundleURL:(NSURL *)bundleURL return self; } -- (void)enqueueJSCall:(NSString *)moduleDotMethod args:(NSArray *)args -{ -} - -- (void)enqueueJSCall:(NSString *)module - method:(NSString *)method - args:(NSArray *)args - completion:(__strong dispatch_block_t)completion -{ -} - - (void)registerSegmentWithId:(NSUInteger)segmentId path:(NSString *)path { } @@ -291,37 +259,10 @@ - (RCTBridgeModuleDecorator *)bridgeModuleDecorator return nil; } -- (NSArray *)modulesConformingToProtocol:(Protocol *)protocol -{ - return @[]; -} - -- (BOOL)moduleIsInitialized:(Class)moduleClass -{ - return NO; -} - -- (void)reload __attribute__((deprecated("Use RCTReloadCommand instead"))) -{ -} - -- (void)reloadWithReason:(NSString *)reason __attribute__((deprecated("Use RCTReloadCommand instead"))) -{ -} - - (void)onFastRefresh { } -- (void)requestReload __attribute__((deprecated("Use RCTReloadCommand instead"))) -{ -} - -- (BOOL)isBatchActive -{ - return NO; -} - - (void)enqueueCallback:(NSNumber *)cbID args:(NSArray *)args { } diff --git a/packages/react-native/React/Base/RCTBridgeDelegate.h b/packages/react-native/React/Base/RCTBridgeDelegate.h index 9e5306f8fc7e..d5293d9f9db8 100644 --- a/packages/react-native/React/Base/RCTBridgeDelegate.h +++ b/packages/react-native/React/Base/RCTBridgeDelegate.h @@ -13,17 +13,6 @@ NS_ASSUME_NONNULL_BEGIN @protocol RCTBridgeDelegate -#ifndef RCT_REMOVE_LEGACY_ARCH - -/** - * The location of the JavaScript source file. When running from the packager - * this should be an absolute URL, e.g. `http://localhost:8081/index.ios.bundle`. - * When running from a locally bundled JS file, this should be a `file://` url - * pointing to a path inside the app resources, e.g. `file://.../main.jsbundle`. - */ -- (NSURL *__nullable)sourceURLForBridge:(RCTBridge *)bridge - __deprecated_msg("This API will be removed along with the legacy architecture."); -#endif @end NS_ASSUME_NONNULL_END diff --git a/packages/react-native/React/Base/RCTBridgeModule.h b/packages/react-native/React/Base/RCTBridgeModule.h index 005e10d84f69..3f52bbb17a3d 100644 --- a/packages/react-native/React/Base/RCTBridgeModule.h +++ b/packages/react-native/React/Base/RCTBridgeModule.h @@ -402,11 +402,6 @@ RCT_EXTERN_C_END */ - (NSDictionary *)constantsToExport; -/** - * Notifies the module that a batch of JS method invocations has just completed. - */ -- (void)batchDidComplete RCT_DEPRECATED; - @end /** diff --git a/packages/react-native/React/Base/RCTJavaScriptExecutor.h b/packages/react-native/React/Base/RCTJavaScriptExecutor.h index 965d78e7361c..2fdbe3079dbc 100644 --- a/packages/react-native/React/Base/RCTJavaScriptExecutor.h +++ b/packages/react-native/React/Base/RCTJavaScriptExecutor.h @@ -12,5 +12,3 @@ typedef void (^RCTJavaScriptCompleteBlock)(NSError *__strong) __deprecated_msg("This api will be removed along with the bridge."); -typedef void (^RCTJavaScriptCallback)(__strong id, NSError *__strong) - __deprecated_msg("This api will be removed along with the bridge."); diff --git a/packages/react-native/React/CoreModules/RCTAccessibilityManager.h b/packages/react-native/React/CoreModules/RCTAccessibilityManager.h index e2063e67c885..734b5fd39ced 100644 --- a/packages/react-native/React/CoreModules/RCTAccessibilityManager.h +++ b/packages/react-native/React/CoreModules/RCTAccessibilityManager.h @@ -32,12 +32,6 @@ extern NSString *const RCTAccessibilityManagerDidUpdateMultiplierNotification; / @end -@interface RCTBridge (RCTAccessibilityManager) - -@property (nonatomic, readonly) RCTAccessibilityManager *accessibilityManager; - -@end - @interface RCTBridgeProxy (RCTAccessibilityManager) @property (nonatomic, readonly) RCTAccessibilityManager *accessibilityManager; diff --git a/packages/react-native/React/CoreModules/RCTDevMenu.h b/packages/react-native/React/CoreModules/RCTDevMenu.h index 976cb8c517b5..ab6132f0a442 100644 --- a/packages/react-native/React/CoreModules/RCTDevMenu.h +++ b/packages/react-native/React/CoreModules/RCTDevMenu.h @@ -137,7 +137,8 @@ typedef NSString * (^RCTDevMenuItemTitleBlock)(void); */ @interface RCTBridge (RCTDevMenu) -@property (nonatomic, readonly) RCTDevMenu *devMenu; +@property (nonatomic, readonly) RCTDevMenu *devMenu __deprecated_msg( + "Access RCTDevMenu through the bridge proxy instead; this accessor will be removed."); @end diff --git a/packages/react-native/React/CoreModules/RCTDevSettings.h b/packages/react-native/React/CoreModules/RCTDevSettings.h index cffe380b9355..421b3d252948 100644 --- a/packages/react-native/React/CoreModules/RCTDevSettings.h +++ b/packages/react-native/React/CoreModules/RCTDevSettings.h @@ -142,12 +142,6 @@ typedef void (^RCTConnectedHandler)(void); @end -@interface RCTBridge (RCTDevSettings) - -@property (nonatomic, readonly) RCTDevSettings *devSettings; - -@end - @interface RCTBridgeProxy (RCTDevSettings) @property (nonatomic, readonly) RCTDevSettings *devSettings; diff --git a/packages/react-native/React/CoreModules/RCTPerfMonitor.mm b/packages/react-native/React/CoreModules/RCTPerfMonitor.mm index 2bb27c1eaebf..9a7c4a9d362a 100644 --- a/packages/react-native/React/CoreModules/RCTPerfMonitor.mm +++ b/packages/react-native/React/CoreModules/RCTPerfMonitor.mm @@ -22,7 +22,6 @@ #import #import #import -#import #import #import #import diff --git a/packages/react-native/React/CoreModules/RCTWebSocketModule.h b/packages/react-native/React/CoreModules/RCTWebSocketModule.h index 0deba70671ff..c0e240f10020 100644 --- a/packages/react-native/React/CoreModules/RCTWebSocketModule.h +++ b/packages/react-native/React/CoreModules/RCTWebSocketModule.h @@ -33,12 +33,6 @@ RCT_EXTERN void RCTSetCustomSRWebSocketProvider(SRWebSocketProvider provider); @end -@interface RCTBridge (RCTWebSocketModule) - -- (RCTWebSocketModule *)webSocketModule; - -@end - @interface RCTBridgeProxy (RCTWebSocketModule) - (RCTWebSocketModule *)webSocketModule; diff --git a/packages/react-native/React/CxxBridge/RCTCxxBridgeDelegate.h b/packages/react-native/React/CxxBridge/RCTCxxBridgeDelegate.h deleted file mode 100644 index e2d48db4548d..000000000000 --- a/packages/react-native/React/CxxBridge/RCTCxxBridgeDelegate.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -#include - -#import - -namespace facebook::react { - -class JSExecutorFactory; - -} // namespace facebook::react - -// This is a separate class so non-C++ implementations don't need to -// take a C++ dependency. - -@protocol RCTCxxBridgeDelegate - -/** - * In the RCTCxxBridge, if this method is implemented, return a - * ExecutorFactory instance which can be used to create the executor. - * If not implemented, or returns an empty pointer, JSIExecutorFactory - * will be used with a JSCRuntime. - */ -- (std::unique_ptr)jsExecutorFactoryForBridge:(RCTBridge *)bridge; - -@end diff --git a/packages/react-native/React/Modules/RCTUIManager.mm b/packages/react-native/React/Modules/RCTUIManager.mm index 1ab3804b0398..6bacf3f711d4 100644 --- a/packages/react-native/React/Modules/RCTUIManager.mm +++ b/packages/react-native/React/Modules/RCTUIManager.mm @@ -220,15 +220,6 @@ - (void)invalidate @end -@implementation RCTBridge (RCTUIManager) - -- (RCTUIManager *)uiManager -{ - return [self moduleForClass:[RCTUIManager class]]; -} - -@end - UIView *RCTPaperViewOrCurrentView(UIView *view) { if ([view respondsToSelector:@selector(paperView)]) { diff --git a/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.h b/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.h index d26d4f247ba7..2e37b5782360 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.h +++ b/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.h @@ -22,10 +22,6 @@ #import #import -#define RCT_IS_TURBO_MODULE_CLASS(klass) \ - ((RCTTurboModuleEnabled() && [(klass) conformsToProtocol:@protocol(RCTTurboModule)])) -#define RCT_IS_TURBO_MODULE_INSTANCE(module) RCT_IS_TURBO_MODULE_CLASS([(module) class]) - namespace facebook::react { class CallbackWrapper; diff --git a/packages/rn-tester/RNTester/SceneDelegate.mm b/packages/rn-tester/RNTester/SceneDelegate.mm index 26c4b217677f..bd9635151caa 100644 --- a/packages/rn-tester/RNTester/SceneDelegate.mm +++ b/packages/rn-tester/RNTester/SceneDelegate.mm @@ -89,11 +89,6 @@ - (void)scene:(UIScene *)scene continueUserActivity:(NSUserActivity *)userActivi [RCTLinkingManager scene:scene continueUserActivity:userActivity]; } -- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge -{ - return [self bundleURL]; -} - - (NSURL *)bundleURL { return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:kBundlePath]; diff --git a/packages/rn-tester/RNTesterIntegrationTests/RCTLoggingTests.m b/packages/rn-tester/RNTesterIntegrationTests/RCTLoggingTests.m deleted file mode 100644 index dd2336c0c220..000000000000 --- a/packages/rn-tester/RNTesterIntegrationTests/RCTLoggingTests.m +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -#import - -#import -#import -#import -#import - -// Time to wait for an expected log statement to show before failing the test -const int64_t LOGGER_TIMEOUT = 10 * NSEC_PER_SEC; - -@interface RCTLoggingTests : XCTestCase - -@end - -@implementation RCTLoggingTests { - RCTBridge *_bridge; - - dispatch_semaphore_t _logSem; - RCTLogLevel _lastLogLevel; - RCTLogSource _lastLogSource; - NSString *_lastLogMessage; -} - -- (void)setUp -{ - XCTSkip(@"Skipping RCTLoggingTests since they rely on deprecated RCTBridge functionality."); - - NSURL *scriptURL; - if (getenv("CI_USE_PACKAGER")) { - NSString *app = @"IntegrationTests/IntegrationTestsApp"; - scriptURL = [NSURL URLWithString:[NSString stringWithFormat:@"http://localhost:8081/%@.bundle?platform=%@&dev=true", - app, - RCTPlatformName]]; - } else { - scriptURL = [[NSBundle bundleForClass:[RCTBridge class]] URLForResource:@"main" withExtension:@"jsbundle"]; - } - RCTAssert(scriptURL != nil, @"No scriptURL set"); - - _bridge = [[RCTBridge alloc] initWithBundleURL:scriptURL moduleProvider:NULL launchOptions:nil]; - NSDate *date = [NSDate dateWithTimeIntervalSinceNow:60]; - while (date.timeIntervalSinceNow > 0 && _bridge.loading) { - [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; - } - XCTAssertFalse(_bridge.loading); - - _logSem = dispatch_semaphore_create(0); - - // Set the log function to signal the semaphore - RCTSetLogFunction( - ^(RCTLogLevel level, - RCTLogSource source, - __unused NSString *fileName, - __unused NSNumber *lineNumber, - NSString *message) { - if (source == RCTLogSourceJavaScript) { - self->_lastLogLevel = level; - self->_lastLogSource = source; - self->_lastLogMessage = message; - dispatch_semaphore_signal(self->_logSem); - } - }); -} - -- (void)tearDown -{ - [_bridge invalidate]; - _bridge = nil; - - RCTSetLogFunction(RCTDefaultLogFunction); -} - -- (void)testLogging -{ - intptr_t waitRet = 0; - - // First queue the marker and spin until it happens to be logged. - // This is to ensure we skip all of the other messages, that were logged earlier. - NSString *const LogMarker = @"===LOG_MARKER==="; - [_bridge enqueueJSCall:@"LoggingTestModule.logToConsole" args:@[ LogMarker ]]; - - do { - waitRet = dispatch_semaphore_wait(_logSem, dispatch_time(DISPATCH_TIME_NOW, LOGGER_TIMEOUT)); - XCTAssertEqual(waitRet, 0, @"Timed out waiting for log marker"); - } while (waitRet == 0 && ![_lastLogMessage isEqualToString:LogMarker]); - - [_bridge enqueueJSCall:@"LoggingTestModule.logToConsole" args:@[ @"Invoking console.log" ]]; - waitRet = dispatch_semaphore_wait(_logSem, dispatch_time(DISPATCH_TIME_NOW, LOGGER_TIMEOUT)); - XCTAssertEqual(waitRet, 0, @"Timed out waiting for logToConsole"); - - XCTAssertEqual(_lastLogLevel, RCTLogLevelInfo); - XCTAssertEqual(_lastLogSource, RCTLogSourceJavaScript); - XCTAssertEqualObjects(_lastLogMessage, @"Invoking console.log"); - - [_bridge enqueueJSCall:@"LoggingTestModule.warning" args:@[ @"Generating warning" ]]; - waitRet = dispatch_semaphore_wait(_logSem, dispatch_time(DISPATCH_TIME_NOW, LOGGER_TIMEOUT)); - XCTAssertEqual(waitRet, 0, @"Timed out waiting for warning"); - - XCTAssertEqual(_lastLogLevel, RCTLogLevelWarning); - XCTAssertEqual(_lastLogSource, RCTLogSourceJavaScript); - XCTAssertEqualObjects(_lastLogMessage, @"Generating warning"); - - [_bridge enqueueJSCall:@"LoggingTestModule.invariant" args:@[ @"Invariant failed" ]]; - waitRet = dispatch_semaphore_wait(_logSem, dispatch_time(DISPATCH_TIME_NOW, LOGGER_TIMEOUT)); - XCTAssertEqual(waitRet, 0, @"Timed out waiting for invariant"); - - XCTAssertEqual(_lastLogLevel, RCTLogLevelError); - XCTAssertEqual(_lastLogSource, RCTLogSourceJavaScript); - XCTAssertTrue([_lastLogMessage containsString:@"Invariant Violation: Invariant failed"]); - - [_bridge enqueueJSCall:@"LoggingTestModule.logErrorToConsole" args:@[ @"Invoking console.error" ]]; - waitRet = dispatch_semaphore_wait(_logSem, dispatch_time(DISPATCH_TIME_NOW, LOGGER_TIMEOUT)); - XCTAssertEqual(waitRet, 0, @"Timed out waiting for logErrorToConsole"); - - // For local bundles, we may first get a warning about symbolication - if (![_lastLogMessage isEqualToString:@"Invoking console.error"]) { - waitRet = dispatch_semaphore_wait(_logSem, dispatch_time(DISPATCH_TIME_NOW, LOGGER_TIMEOUT)); - XCTAssertEqual(waitRet, 0, @"Timed out waiting for logErrorToConsole #2"); - } - - XCTAssertEqual(_lastLogLevel, RCTLogLevelError); - XCTAssertEqual(_lastLogSource, RCTLogSourceJavaScript); - XCTAssertEqualObjects(_lastLogMessage, @"Invoking console.error"); - - [_bridge enqueueJSCall:@"LoggingTestModule.throwError" args:@[ @"Throwing an error" ]]; - waitRet = dispatch_semaphore_wait(_logSem, dispatch_time(DISPATCH_TIME_NOW, LOGGER_TIMEOUT)); - XCTAssertEqual(waitRet, 0, @"Timed out waiting for throwError"); - - // For local bundles, we may first get a warning about symbolication - if (![_lastLogMessage containsString:@"Error: Throwing an error"]) { - waitRet = dispatch_semaphore_wait(_logSem, dispatch_time(DISPATCH_TIME_NOW, LOGGER_TIMEOUT)); - XCTAssertEqual(waitRet, 0, @"Timed out waiting for throwError #2"); - } - - XCTAssertEqual(_lastLogLevel, RCTLogLevelError); - XCTAssertEqual(_lastLogSource, RCTLogSourceJavaScript); - XCTAssertTrue([_lastLogMessage containsString:@"Error: Throwing an error"]); -} - -@end diff --git a/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api index 1ca098e4b6f9..cf5e258bd17c 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api @@ -10,18 +10,10 @@ category RCTBridge(Inspector) { public @property (assign, readonly) facebook::react::jsinspector_modern::HostTarget* inspectorTarget; } -category RCTBridge(RCTAccessibilityManager) { - public @property (assign, readonly) RCTAccessibilityManager* accessibilityManager; -} - category RCTBridge(RCTDevMenu) { public @property (assign, readonly) RCTDevMenu* devMenu; } -category RCTBridge(RCTDevSettings) { - public @property (assign, readonly) RCTDevSettings* devSettings; -} - category RCTBridge(RCTEventDispatcher) { public virtual id eventDispatcher(); } @@ -30,14 +22,6 @@ category RCTBridge(RCTImageLoader) { public @property (assign, readonly) RCTImageLoader* imageLoader; } -category RCTBridge(RCTImageStoreManager) { - public @property (assign, readonly) RCTImageStoreManager* imageStoreManager; -} - -category RCTBridge(RCTNetworking) { - public @property (assign, readonly) RCTNetworking* networking; -} - category RCTBridge(RCTSurfacePresenterStub) { public virtual id surfacePresenter(); public virtual void setSurfacePresenter:(id presenter); @@ -47,10 +31,6 @@ category RCTBridge(RCTUIManager) { public @property (assign, readonly) RCTUIManager* uiManager; } -category RCTBridge(RCTWebSocketModule) { - public virtual RCTWebSocketModule* webSocketModule(); -} - category RCTBridgeProxy(Cxx) { public @property (assign) std::shared_ptr jsCallInvoker; } @@ -672,28 +652,18 @@ interface RCTBlobManager : public NSObject { public @property (assign, readonly) BOOL loading; public @property (assign, readonly) BOOL valid; - public @property (copy, readonly) NSArray* moduleClasses; public @property (copy, readonly) NSDictionary* launchOptions; public @property (strong) Class executorClass; public @property (strong, readonly) NSURL* bundleURL; public @property (strong, readonly) RCTPerformanceLogger* performanceLogger; - public @property (weak, readonly) id delegate; - public virtual BOOL isBatchActive(); - public virtual BOOL moduleIsInitialized:(Class moduleClass); - public virtual NSArray* modulesConformingToProtocol:(Protocol* protocol); public virtual RCTBridgeModuleDecorator* bridgeModuleDecorator(); public virtual id moduleForClass:(Class moduleClass); public virtual id moduleForName:(NSString* moduleName); public virtual id moduleForName:lazilyLoadIfNecessary:(NSString* moduleName, BOOL lazilyLoad); public virtual instancetype initWithBundleURL:moduleProvider:launchOptions:(NSURL* bundleURL, RCTBridgeModuleListProvider block, NSDictionary* launchOptions); public virtual instancetype initWithDelegate:launchOptions:(id delegate, NSDictionary* launchOptions); - public virtual void enqueueJSCall:args:(NSString* moduleDotMethod, NSArray* args); - public virtual void enqueueJSCall:method:args:completion:(NSString* module, NSString* method, NSArray* args, dispatch_block_t completion); public virtual void onFastRefresh(); public virtual void registerSegmentWithId:path:(NSUInteger segmentId, NSString* path); - public virtual void reload(); - public virtual void reloadWithReason:(NSString* reason); - public virtual void requestReload(); public virtual void setRCTTurboModuleRegistry:(id turboModuleRegistry); } @@ -1611,7 +1581,9 @@ interface RCTRootViewFactoryConfiguration : public NSObject { public @property (assign) RCTLoadSourceForBridgeWithProgressBlock loadSourceForBridgeWithProgress; public @property (assign) RCTSourceURLForBridgeBlock sourceURLForBridge; public @property (weak) id jsRuntimeConfiguratorDelegate; + public virtual instancetype initWithBundleURL:(NSURL* bundleURL); public virtual instancetype initWithBundleURL:newArchEnabled:(NSURL* bundleURL, BOOL newArchEnabled); + public virtual instancetype initWithBundleURLBlock:(RCTBundleURLBlock bundleURLBlock); public virtual instancetype initWithBundleURLBlock:newArchEnabled:(RCTBundleURLBlock bundleURLBlock, BOOL newArchEnabled); } @@ -2525,7 +2497,6 @@ protocol RCTBackedTextInputViewProtocol : public UITextInput { } protocol RCTBridgeDelegate : public NSObject { - public virtual NSURL* _Nullable sourceURLForBridge:(RCTBridge* bridge); } protocol RCTBridgeMethod : public NSObject { @@ -2546,7 +2517,6 @@ protocol RCTBridgeModule : public NSObject { public virtual _Nullable NSArray>* methodsToExport(); public virtual static BOOL requiresMainQueueSetup(); public virtual static NSString* moduleName(); - public virtual void batchDidComplete(); } protocol RCTCallInvokerModule : public NSObject { @@ -2597,10 +2567,6 @@ protocol RCTCustomRefreshControlProtocol { public @property (weak) UIScrollView* scrollView; } -protocol RCTCxxBridgeDelegate : public RCTBridgeDelegate { - public virtual std::unique_ptr jsExecutorFactoryForBridge:(RCTBridge* bridge); -} - protocol RCTDebuggingOverlayViewProtocol : public NSObject { public virtual void clearElementsHighlights(); public virtual void highlightElements:(const NSArray* elements); diff --git a/scripts/cxx-api/api-snapshots/ReactAppleFrameworksCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleFrameworksCxx.api index 4d74084f2445..0e9dcb2263cf 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleFrameworksCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleFrameworksCxx.api @@ -10,18 +10,10 @@ category RCTBridge(Inspector) { public @property (assign, readonly) facebook::react::jsinspector_modern::HostTarget* inspectorTarget; } -category RCTBridge(RCTAccessibilityManager) { - public @property (assign, readonly) RCTAccessibilityManager* accessibilityManager; -} - category RCTBridge(RCTDevMenu) { public @property (assign, readonly) RCTDevMenu* devMenu; } -category RCTBridge(RCTDevSettings) { - public @property (assign, readonly) RCTDevSettings* devSettings; -} - category RCTBridge(RCTEventDispatcher) { public virtual id eventDispatcher(); } @@ -30,14 +22,6 @@ category RCTBridge(RCTImageLoader) { public @property (assign, readonly) RCTImageLoader* imageLoader; } -category RCTBridge(RCTImageStoreManager) { - public @property (assign, readonly) RCTImageStoreManager* imageStoreManager; -} - -category RCTBridge(RCTNetworking) { - public @property (assign, readonly) RCTNetworking* networking; -} - category RCTBridge(RCTSurfacePresenterStub) { public virtual id surfacePresenter(); public virtual void setSurfacePresenter:(id presenter); @@ -47,10 +31,6 @@ category RCTBridge(RCTUIManager) { public @property (assign, readonly) RCTUIManager* uiManager; } -category RCTBridge(RCTWebSocketModule) { - public virtual RCTWebSocketModule* webSocketModule(); -} - category RCTBridgeProxy(Cxx) { public @property (assign) std::shared_ptr jsCallInvoker; } @@ -681,28 +661,18 @@ interface RCTBlobManager : public NSObject { public @property (assign, readonly) BOOL loading; public @property (assign, readonly) BOOL valid; - public @property (copy, readonly) NSArray* moduleClasses; public @property (copy, readonly) NSDictionary* launchOptions; public @property (strong) Class executorClass; public @property (strong, readonly) NSURL* bundleURL; public @property (strong, readonly) RCTPerformanceLogger* performanceLogger; - public @property (weak, readonly) id delegate; - public virtual BOOL isBatchActive(); - public virtual BOOL moduleIsInitialized:(Class moduleClass); - public virtual NSArray* modulesConformingToProtocol:(Protocol* protocol); public virtual RCTBridgeModuleDecorator* bridgeModuleDecorator(); public virtual id moduleForClass:(Class moduleClass); public virtual id moduleForName:(NSString* moduleName); public virtual id moduleForName:lazilyLoadIfNecessary:(NSString* moduleName, BOOL lazilyLoad); public virtual instancetype initWithBundleURL:moduleProvider:launchOptions:(NSURL* bundleURL, RCTBridgeModuleListProvider block, NSDictionary* launchOptions); public virtual instancetype initWithDelegate:launchOptions:(id delegate, NSDictionary* launchOptions); - public virtual void enqueueJSCall:args:(NSString* moduleDotMethod, NSArray* args); - public virtual void enqueueJSCall:method:args:completion:(NSString* module, NSString* method, NSArray* args, dispatch_block_t completion); public virtual void onFastRefresh(); public virtual void registerSegmentWithId:path:(NSUInteger segmentId, NSString* path); - public virtual void reload(); - public virtual void reloadWithReason:(NSString* reason); - public virtual void requestReload(); public virtual void setRCTTurboModuleRegistry:(id turboModuleRegistry); } @@ -1654,7 +1624,9 @@ interface RCTRootViewFactoryConfiguration : public NSObject { public @property (assign) RCTLoadSourceForBridgeWithProgressBlock loadSourceForBridgeWithProgress; public @property (assign) RCTSourceURLForBridgeBlock sourceURLForBridge; public @property (weak) id jsRuntimeConfiguratorDelegate; + public virtual instancetype initWithBundleURL:(NSURL* bundleURL); public virtual instancetype initWithBundleURL:newArchEnabled:(NSURL* bundleURL, BOOL newArchEnabled); + public virtual instancetype initWithBundleURLBlock:(RCTBundleURLBlock bundleURLBlock); public virtual instancetype initWithBundleURLBlock:newArchEnabled:(RCTBundleURLBlock bundleURLBlock, BOOL newArchEnabled); } @@ -2583,7 +2555,6 @@ protocol RCTBackedTextInputViewProtocol : public UITextInput { } protocol RCTBridgeDelegate : public NSObject { - public virtual NSURL* _Nullable sourceURLForBridge:(RCTBridge* bridge); } protocol RCTBridgeMethod : public NSObject { @@ -2604,7 +2575,6 @@ protocol RCTBridgeModule : public NSObject { public virtual _Nullable NSArray>* methodsToExport(); public virtual static BOOL requiresMainQueueSetup(); public virtual static NSString* moduleName(); - public virtual void batchDidComplete(); } protocol RCTCallInvokerModule : public NSObject { @@ -2659,10 +2629,6 @@ protocol RCTCustomRefreshControlProtocol { public @property (weak) UIScrollView* scrollView; } -protocol RCTCxxBridgeDelegate : public RCTBridgeDelegate { - public virtual std::unique_ptr jsExecutorFactoryForBridge:(RCTBridge* bridge); -} - protocol RCTDebuggingOverlayViewProtocol : public NSObject { public virtual void clearElementsHighlights(); public virtual void highlightElements:(const NSArray* elements); diff --git a/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api index df4b2417b5af..f15992f3c172 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api @@ -10,18 +10,10 @@ category RCTBridge(Inspector) { public @property (assign, readonly) facebook::react::jsinspector_modern::HostTarget* inspectorTarget; } -category RCTBridge(RCTAccessibilityManager) { - public @property (assign, readonly) RCTAccessibilityManager* accessibilityManager; -} - category RCTBridge(RCTDevMenu) { public @property (assign, readonly) RCTDevMenu* devMenu; } -category RCTBridge(RCTDevSettings) { - public @property (assign, readonly) RCTDevSettings* devSettings; -} - category RCTBridge(RCTEventDispatcher) { public virtual id eventDispatcher(); } @@ -30,14 +22,6 @@ category RCTBridge(RCTImageLoader) { public @property (assign, readonly) RCTImageLoader* imageLoader; } -category RCTBridge(RCTImageStoreManager) { - public @property (assign, readonly) RCTImageStoreManager* imageStoreManager; -} - -category RCTBridge(RCTNetworking) { - public @property (assign, readonly) RCTNetworking* networking; -} - category RCTBridge(RCTSurfacePresenterStub) { public virtual id surfacePresenter(); public virtual void setSurfacePresenter:(id presenter); @@ -47,10 +31,6 @@ category RCTBridge(RCTUIManager) { public @property (assign, readonly) RCTUIManager* uiManager; } -category RCTBridge(RCTWebSocketModule) { - public virtual RCTWebSocketModule* webSocketModule(); -} - category RCTBridgeProxy(Cxx) { public @property (assign) std::shared_ptr jsCallInvoker; } @@ -672,28 +652,18 @@ interface RCTBlobManager : public NSObject { public @property (assign, readonly) BOOL loading; public @property (assign, readonly) BOOL valid; - public @property (copy, readonly) NSArray* moduleClasses; public @property (copy, readonly) NSDictionary* launchOptions; public @property (strong) Class executorClass; public @property (strong, readonly) NSURL* bundleURL; public @property (strong, readonly) RCTPerformanceLogger* performanceLogger; - public @property (weak, readonly) id delegate; - public virtual BOOL isBatchActive(); - public virtual BOOL moduleIsInitialized:(Class moduleClass); - public virtual NSArray* modulesConformingToProtocol:(Protocol* protocol); public virtual RCTBridgeModuleDecorator* bridgeModuleDecorator(); public virtual id moduleForClass:(Class moduleClass); public virtual id moduleForName:(NSString* moduleName); public virtual id moduleForName:lazilyLoadIfNecessary:(NSString* moduleName, BOOL lazilyLoad); public virtual instancetype initWithBundleURL:moduleProvider:launchOptions:(NSURL* bundleURL, RCTBridgeModuleListProvider block, NSDictionary* launchOptions); public virtual instancetype initWithDelegate:launchOptions:(id delegate, NSDictionary* launchOptions); - public virtual void enqueueJSCall:args:(NSString* moduleDotMethod, NSArray* args); - public virtual void enqueueJSCall:method:args:completion:(NSString* module, NSString* method, NSArray* args, dispatch_block_t completion); public virtual void onFastRefresh(); public virtual void registerSegmentWithId:path:(NSUInteger segmentId, NSString* path); - public virtual void reload(); - public virtual void reloadWithReason:(NSString* reason); - public virtual void requestReload(); public virtual void setRCTTurboModuleRegistry:(id turboModuleRegistry); } @@ -1610,7 +1580,9 @@ interface RCTRootViewFactoryConfiguration : public NSObject { public @property (assign) RCTLoadSourceForBridgeWithProgressBlock loadSourceForBridgeWithProgress; public @property (assign) RCTSourceURLForBridgeBlock sourceURLForBridge; public @property (weak) id jsRuntimeConfiguratorDelegate; + public virtual instancetype initWithBundleURL:(NSURL* bundleURL); public virtual instancetype initWithBundleURL:newArchEnabled:(NSURL* bundleURL, BOOL newArchEnabled); + public virtual instancetype initWithBundleURLBlock:(RCTBundleURLBlock bundleURLBlock); public virtual instancetype initWithBundleURLBlock:newArchEnabled:(RCTBundleURLBlock bundleURLBlock, BOOL newArchEnabled); } @@ -2538,7 +2510,6 @@ protocol RCTBridgeModule : public NSObject { public virtual _Nullable NSArray>* methodsToExport(); public virtual static BOOL requiresMainQueueSetup(); public virtual static NSString* moduleName(); - public virtual void batchDidComplete(); } protocol RCTCallInvokerModule : public NSObject { @@ -2589,10 +2560,6 @@ protocol RCTCustomRefreshControlProtocol { public @property (weak) UIScrollView* scrollView; } -protocol RCTCxxBridgeDelegate : public RCTBridgeDelegate { - public virtual std::unique_ptr jsExecutorFactoryForBridge:(RCTBridge* bridge); -} - protocol RCTDebuggingOverlayViewProtocol : public NSObject { public virtual void clearElementsHighlights(); public virtual void highlightElements:(const NSArray* elements); diff --git a/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api index 1c4998b3d189..c9e8606d3b12 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api @@ -10,18 +10,10 @@ category RCTBridge(Inspector) { public @property (assign, readonly) facebook::react::jsinspector_modern::HostTarget* inspectorTarget; } -category RCTBridge(RCTAccessibilityManager) { - public @property (assign, readonly) RCTAccessibilityManager* accessibilityManager; -} - category RCTBridge(RCTDevMenu) { public @property (assign, readonly) RCTDevMenu* devMenu; } -category RCTBridge(RCTDevSettings) { - public @property (assign, readonly) RCTDevSettings* devSettings; -} - category RCTBridge(RCTEventDispatcher) { public virtual id eventDispatcher(); } @@ -30,14 +22,6 @@ category RCTBridge(RCTImageLoader) { public @property (assign, readonly) RCTImageLoader* imageLoader; } -category RCTBridge(RCTImageStoreManager) { - public @property (assign, readonly) RCTImageStoreManager* imageStoreManager; -} - -category RCTBridge(RCTNetworking) { - public @property (assign, readonly) RCTNetworking* networking; -} - category RCTBridge(RCTSurfacePresenterStub) { public virtual id surfacePresenter(); public virtual void setSurfacePresenter:(id presenter); @@ -47,10 +31,6 @@ category RCTBridge(RCTUIManager) { public @property (assign, readonly) RCTUIManager* uiManager; } -category RCTBridge(RCTWebSocketModule) { - public virtual RCTWebSocketModule* webSocketModule(); -} - category RCTBridgeProxy(Cxx) { public @property (assign) std::shared_ptr jsCallInvoker; } @@ -672,28 +652,18 @@ interface RCTBlobManager : public NSObject { public @property (assign, readonly) BOOL loading; public @property (assign, readonly) BOOL valid; - public @property (copy, readonly) NSArray* moduleClasses; public @property (copy, readonly) NSDictionary* launchOptions; public @property (strong) Class executorClass; public @property (strong, readonly) NSURL* bundleURL; public @property (strong, readonly) RCTPerformanceLogger* performanceLogger; - public @property (weak, readonly) id delegate; - public virtual BOOL isBatchActive(); - public virtual BOOL moduleIsInitialized:(Class moduleClass); - public virtual NSArray* modulesConformingToProtocol:(Protocol* protocol); public virtual RCTBridgeModuleDecorator* bridgeModuleDecorator(); public virtual id moduleForClass:(Class moduleClass); public virtual id moduleForName:(NSString* moduleName); public virtual id moduleForName:lazilyLoadIfNecessary:(NSString* moduleName, BOOL lazilyLoad); public virtual instancetype initWithBundleURL:moduleProvider:launchOptions:(NSURL* bundleURL, RCTBridgeModuleListProvider block, NSDictionary* launchOptions); public virtual instancetype initWithDelegate:launchOptions:(id delegate, NSDictionary* launchOptions); - public virtual void enqueueJSCall:args:(NSString* moduleDotMethod, NSArray* args); - public virtual void enqueueJSCall:method:args:completion:(NSString* module, NSString* method, NSArray* args, dispatch_block_t completion); public virtual void onFastRefresh(); public virtual void registerSegmentWithId:path:(NSUInteger segmentId, NSString* path); - public virtual void reload(); - public virtual void reloadWithReason:(NSString* reason); - public virtual void requestReload(); public virtual void setRCTTurboModuleRegistry:(id turboModuleRegistry); } @@ -1611,7 +1581,9 @@ interface RCTRootViewFactoryConfiguration : public NSObject { public @property (assign) RCTLoadSourceForBridgeWithProgressBlock loadSourceForBridgeWithProgress; public @property (assign) RCTSourceURLForBridgeBlock sourceURLForBridge; public @property (weak) id jsRuntimeConfiguratorDelegate; + public virtual instancetype initWithBundleURL:(NSURL* bundleURL); public virtual instancetype initWithBundleURL:newArchEnabled:(NSURL* bundleURL, BOOL newArchEnabled); + public virtual instancetype initWithBundleURLBlock:(RCTBundleURLBlock bundleURLBlock); public virtual instancetype initWithBundleURLBlock:newArchEnabled:(RCTBundleURLBlock bundleURLBlock, BOOL newArchEnabled); } @@ -2525,7 +2497,6 @@ protocol RCTBackedTextInputViewProtocol : public UITextInput { } protocol RCTBridgeDelegate : public NSObject { - public virtual NSURL* _Nullable sourceURLForBridge:(RCTBridge* bridge); } protocol RCTBridgeMethod : public NSObject { @@ -2546,7 +2517,6 @@ protocol RCTBridgeModule : public NSObject { public virtual _Nullable NSArray>* methodsToExport(); public virtual static BOOL requiresMainQueueSetup(); public virtual static NSString* moduleName(); - public virtual void batchDidComplete(); } protocol RCTCallInvokerModule : public NSObject { @@ -2597,10 +2567,6 @@ protocol RCTCustomRefreshControlProtocol { public @property (weak) UIScrollView* scrollView; } -protocol RCTCxxBridgeDelegate : public RCTBridgeDelegate { - public virtual std::unique_ptr jsExecutorFactoryForBridge:(RCTBridge* bridge); -} - protocol RCTDebuggingOverlayViewProtocol : public NSObject { public virtual void clearElementsHighlights(); public virtual void highlightElements:(const NSArray* elements);