Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -111,11 +104,6 @@ - (void)hostDidStart:(RCTHost *)host

#pragma mark - RCTArchConfiguratorProtocol

- (BOOL)newArchEnabled
{
return YES;
}

- (Class)getModuleClassFromName:(const char *)name
{
return nullptr;
Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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<id<RCTBridgeModule>> *_Nonnull(RCTBridge *_Nonnull bridge)
{
Expand Down
12 changes: 9 additions & 3 deletions packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
*/

#import <React/RCTBridge.h>
#import <React/RCTJavaScriptLoader.h>
#import <React/RCTRootView.h>
#import <React/RCTUtils.h>
#import "RCTJSRuntimeConfiguratorProtocol.h"

@protocol RCTCxxBridgeDelegate;
@protocol RCTComponentViewFactoryComponentProvider;
@protocol RCTTurboModuleManagerDelegate;
@protocol RCTHostDelegate;
Expand Down Expand Up @@ -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.
Expand Down
6 changes: 0 additions & 6 deletions packages/react-native/Libraries/Image/RCTImageStoreManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@

@end

@interface RCTBridge (RCTImageStoreManager)

@property (nonatomic, readonly) RCTImageStoreManager *imageStoreManager;

@end

@interface RCTBridgeProxy (RCTImageStoreManager)

@property (nonatomic, readonly) RCTImageStoreManager *imageStoreManager;
Expand Down
6 changes: 0 additions & 6 deletions packages/react-native/Libraries/Network/RCTNetworking.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,6 @@

@end

@interface RCTBridge (RCTNetworking)

@property (nonatomic, readonly) RCTNetworking *networking;

@end

@interface RCTBridgeProxy (RCTNetworking)

@property (nonatomic, readonly) RCTNetworking *networking;
Expand Down
12 changes: 0 additions & 12 deletions packages/react-native/React/Base/RCTBridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,6 @@ NSString *RCTBridgeModuleNameForClass(Class bridgeModuleClass);
*/
NSMutableArray<NSString *> *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);
Expand All @@ -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,
Expand Down
21 changes: 0 additions & 21 deletions packages/react-native/React/Base/RCTBridge.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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<RCTBridgeDelegate>)delegate launchOptions:(NSDictionary *)launchOptions
{
Expand Down
11 changes: 0 additions & 11 deletions packages/react-native/React/Base/RCTBridgeDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,6 @@
NS_ASSUME_NONNULL_BEGIN

@protocol RCTBridgeDelegate <NSObject>
#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
5 changes: 0 additions & 5 deletions packages/react-native/React/Base/RCTBridgeModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

/**
Expand Down
2 changes: 0 additions & 2 deletions packages/react-native/React/Base/RCTJavaScriptExecutor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion packages/react-native/React/CoreModules/RCTDevMenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 0 additions & 6 deletions packages/react-native/React/CoreModules/RCTDevSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion packages/react-native/React/CoreModules/RCTPerfMonitor.mm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#import <React/RCTFPSGraph.h>
#import <React/RCTInitializing.h>
#import <React/RCTInvalidating.h>
#import <React/RCTJavaScriptExecutor.h>
#import <React/RCTPerformanceLogger.h>
#import <React/RCTPerformanceLoggerLabels.h>
#import <React/RCTRootView.h>
Expand Down
6 changes: 0 additions & 6 deletions packages/react-native/React/CoreModules/RCTWebSocketModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@ RCT_EXTERN void RCTSetCustomSRWebSocketProvider(SRWebSocketProvider provider);

@end

@interface RCTBridge (RCTWebSocketModule)

- (RCTWebSocketModule *)webSocketModule;

@end

@interface RCTBridgeProxy (RCTWebSocketModule)

- (RCTWebSocketModule *)webSocketModule;
Expand Down
31 changes: 0 additions & 31 deletions packages/react-native/React/CxxBridge/RCTCxxBridgeDelegate.h

This file was deleted.

9 changes: 0 additions & 9 deletions packages/react-native/React/Modules/RCTUIManager.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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)]) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@
#import <unordered_map>
#import <vector>

#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;
Expand Down
5 changes: 0 additions & 5 deletions packages/rn-tester/RNTester/SceneDelegate.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
Loading
Loading