Skip to content
Closed
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
5 changes: 0 additions & 5 deletions packages/react-native/Libraries/AppDelegate/RCTAppDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#import "RCTReactNativeFactory.h"
#import "RCTRootViewFactory.h"

@class RCTBridge;
@protocol RCTBridgeDelegate;
@protocol RCTComponentViewProtocol;
@class RCTRootView;
Expand Down Expand Up @@ -41,10 +40,6 @@ NS_ASSUME_NONNULL_BEGIN
*
* Overridable methods
* Shared:
* - (RCTBridge *)createBridgeWithDelegate:(id<RCTBridgeDelegate>)delegate launchOptions:(NSDictionary
*)launchOptions;
* - (UIView *)createRootViewWithBridge:(RCTBridge *)bridge moduleName:(NSString*)moduleName initProps:(NSDictionary
*)initProps;
* - (UIViewController *)createRootViewController;
* - (void)setRootView:(UIView *)rootView toRootViewController:(UIViewController *)rootViewController;
* New Architecture:
Expand Down
11 changes: 0 additions & 11 deletions packages/react-native/Libraries/AppDelegate/RCTAppSetupUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,3 @@ std::unique_ptr<facebook::react::JSExecutorFactory> RCTAppSetupJsExecutorFactory
;

#endif // __cplusplus

RCT_EXTERN_C_BEGIN

void RCTAppSetupPrepareApp(UIApplication *application, BOOL turboModuleEnabled) __attribute__((deprecated(
"RCTAppSetupPrepareApp(UIApplication, BOOL) is deprecated and it's signature will change when we remove the legacy arch")));
UIView *
RCTAppSetupDefaultRootView(RCTBridge *bridge, NSString *moduleName, NSDictionary *initialProperties, BOOL fabricEnabled)
__attribute__((deprecated(
"RCTAppSetupDefaultRootView(RCTBridge *, NSString *, NSDictionary *, BOOL) is deprecated and it's signature will change when we remove the legacy arch")));

RCT_EXTERN_C_END
22 changes: 0 additions & 22 deletions packages/react-native/Libraries/AppDelegate/RCTAppSetupUtils.mm
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,6 @@

#import "RCTDependencyProvider.h"

void RCTAppSetupPrepareApp(UIApplication *application, BOOL turboModuleEnabled)
{
RCTEnableTurboModule(YES);

#if DEBUG
// Disable idle timer in dev builds to avoid putting application in background and complicating
// Metro reconnection logic. Users only need this when running the application using our CLI tooling.
application.idleTimerDisabled = YES;
#endif
}

UIView *
RCTAppSetupDefaultRootView(RCTBridge *bridge, NSString *moduleName, NSDictionary *initialProperties, BOOL fabricEnabled)
{
id<RCTSurfaceProtocol> surface = [[RCTFabricSurface alloc] initWithBridge:bridge
moduleName:moduleName
initialProperties:initialProperties];
UIView *rootView = [[RCTSurfaceHostingProxyRootView alloc] initWithSurface:surface];
[surface start];
return rootView;
}

NSArray<NSString *> *RCTAppSetupUnstableModulesRequiringMainQueueSetup(id<RCTDependencyProvider> dependencyProvider)
{
// For oss, insert core main queue setup modules here
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ - (UIViewController *)createRootViewController
return [UIViewController new];
}

- (RCTBridge *)createBridgeWithDelegate:(id<RCTBridgeDelegate>)delegate launchOptions:(NSDictionary *)launchOptions
{
return [[RCTBridge alloc] initWithDelegate:delegate launchOptions:launchOptions];
}

- (void)setRootView:(UIView *)rootView toRootViewController:(UIViewController *)rootViewController
{
rootViewController.view = rootView;
Expand All @@ -57,21 +52,6 @@ - (void)customizeRootView:(RCTRootView *)rootView
// Override point for customization after application launch.
}

- (UIView *)createRootViewWithBridge:(RCTBridge *)bridge
moduleName:(NSString *)moduleName
initProps:(NSDictionary *)initProps
{
UIView *rootView = RCTAppSetupDefaultRootView(bridge, moduleName, initProps, YES);

#if TARGET_OS_TV
rootView.backgroundColor = [UIColor clearColor];
#else
rootView.backgroundColor = [UIColor systemBackgroundColor];
#endif

return rootView;
}

- (RCTColorSpace)defaultColorSpace
{
return RCTColorSpaceSRGB;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,39 +46,6 @@ typedef NS_ENUM(NSInteger, RCTReleaseLevel) { Canary, Experimental, Stable };
@property (nonatomic, strong) id<RCTDependencyProvider> dependencyProvider;

@optional
/**
* It creates a `RCTBridge` using a delegate and some launch options.
* By default, it is invoked passing `self` as a delegate.
* You can override this function to customize the logic that creates the RCTBridge
*
* @parameter: delegate - an object that implements the `RCTBridgeDelegate` protocol.
* @parameter: launchOptions - a dictionary with a set of options.
*
* @returns: a newly created instance of RCTBridge.
*/
- (RCTBridge *)createBridgeWithDelegate:(id<RCTBridgeDelegate>)delegate
launchOptions:(NSDictionary *)launchOptions
__attribute__((deprecated(
"createBridgeWithDelegate:launchOptions: is deprecated and will be removed when removing the legacy architecture.")));

/**
* It creates a `UIView` starting from a bridge, a module name and a set of initial properties.
* By default, it is invoked using the bridge created by `createBridgeWithDelegate:launchOptions` and
* the name in the `self.moduleName` variable.
* You can override this function to customize the logic that creates the Root View.
*
* @parameter: bridge - an instance of the `RCTBridge` object.
* @parameter: moduleName - the name of the app, used by Metro to resolve the module.
* @parameter: initProps - a set of initial properties.
*
* @returns: a UIView properly configured with a bridge for React Native.
*/
- (UIView *)createRootViewWithBridge:(RCTBridge *)bridge
moduleName:(NSString *)moduleName
initProps:(NSDictionary *)initProps
__attribute__((deprecated(
"createRootViewWithBridge:moduleName:initProps is deprecated and will be removed when removing the legacy architecture.")));

/// This method returns a map of Component Descriptors and Components classes that needs to be registered in the
/// new renderer. The Component Descriptor is a string which represent the name used in JS to refer to the native
/// component. The default implementation returns an empty dictionary. Subclasses can override this method to register
Expand Down Expand Up @@ -107,8 +74,6 @@ typedef NS_ENUM(NSInteger, RCTReleaseLevel) { Canary, Experimental, Stable };
launchOptions:(NSDictionary *_Nullable)launchOptions;

#if !defined(RCT_REMOVE_LEGACY_ARCH)
@property (nonatomic, nullable) RCTBridge *bridge
__attribute__((deprecated("The bridge is deprecated and will be removed when removing the legacy architecture.")));
@property (nonatomic, nullable) RCTSurfacePresenterBridgeAdapter *bridgeAdapter __attribute__((
deprecated("The bridgeAdapter is deprecated and will be removed when removing the legacy architecture.")));
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,14 +238,6 @@ - (RCTRootViewFactory *)createRCTRootViewFactory
turboModuleEnabled:YES
bridgelessEnabled:YES];

configuration.createRootViewWithBridge = ^UIView *(RCTBridge *bridge, NSString *moduleName, NSDictionary *initProps) {
return [weakSelf.delegate createRootViewWithBridge:bridge moduleName:moduleName initProps:initProps];
};

configuration.createBridgeWithDelegate = ^RCTBridge *(id<RCTBridgeDelegate> delegate, NSDictionary *launchOptions) {
return [weakSelf.delegate createBridgeWithDelegate:delegate launchOptions:launchOptions];
};

configuration.customizeRootView = ^(UIView *_Nonnull rootView) {
[weakSelf.delegate customizeRootView:(RCTRootView *)rootView];
};
Expand Down
1 change: 0 additions & 1 deletion packages/react-native/React/Base/RCTRootView.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#import "RCTLog.h"
#import "RCTPerformanceLogger.h"
#import "RCTProfile.h"
#import "RCTRootShadowView.h"
#import "RCTTouchHandler.h"
#import "RCTUIManager.h"
#import "RCTUIManagerUtils.h"
Expand Down
3 changes: 0 additions & 3 deletions packages/react-native/React/Base/RCTUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ NS_ASSUME_NONNULL_BEGIN

// Whether the New Architecture is enabled or not
RCT_EXTERN BOOL RCTIsNewArchEnabled(void);
RCT_EXTERN void RCTSetNewArchEnabled(BOOL enabled) __attribute__((deprecated(
"This function is now no-op. You need to modify the Info.plist adding a RCTNewArchEnabled bool property to control whether the New Arch is enabled or not")));
;

// Whether React native should output logs for modules and components used
// through the interop layers
Expand Down
6 changes: 0 additions & 6 deletions packages/react-native/React/Base/RCTUtils.mm
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ BOOL RCTIsNewArchEnabled(void)
{
return YES;
}
void RCTSetNewArchEnabled(BOOL enabled)
{
// This function is now deprecated and will be removed in the future.
// This function is now no-op. You need to modify the Info.plist adding a `RCTNewArchEnabled` bool property to control
// whether the New Arch is enabled or not.
}

BOOL RCTAreLegacyLogsEnabled(void)
{
Expand Down
2 changes: 0 additions & 2 deletions packages/react-native/React/Modules/RCTUIManager.mm
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@
#import "RCTModuleData.h"
#import "RCTModuleMethod.h"
#import "RCTProfile.h"
#import "RCTRootShadowView.h"
#import "RCTScrollableProtocol.h"
#import "RCTShadowView+Internal.h"
#import "RCTShadowView.h"
#import "RCTSurfaceRootShadowView.h"
#import "RCTSurfaceRootView.h"
Expand Down
35 changes: 0 additions & 35 deletions packages/react-native/React/Views/RCTRootShadowView.h

This file was deleted.

14 changes: 0 additions & 14 deletions packages/react-native/React/Views/RCTRootShadowView.m

This file was deleted.

18 changes: 0 additions & 18 deletions packages/react-native/React/Views/RCTShadowView+Internal.h

This file was deleted.

23 changes: 0 additions & 23 deletions packages/react-native/React/Views/RCTShadowView+Internal.m

This file was deleted.

2 changes: 0 additions & 2 deletions packages/react-native/React/Views/RCTShadowView.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#import <React/RCTRootView.h>
#import <yoga/Yoga.h>

@class RCTRootShadowView;
@class RCTSparseArray;

typedef void (^RCTApplierBlock)(NSDictionary<NSNumber *, UIView *> *viewRegistry);
Expand Down Expand Up @@ -46,7 +45,6 @@ typedef void (^RCTApplierBlock)(NSDictionary<NSNumber *, UIView *> *viewRegistry
- (void)insertReactSubview:(RCTShadowView *)subview atIndex:(NSInteger)atIndex NS_REQUIRES_SUPER;
- (void)removeReactSubview:(RCTShadowView *)subview NS_REQUIRES_SUPER;

@property (nonatomic, weak, readonly) RCTRootShadowView *rootView;
@property (nonatomic, weak, readonly) RCTShadowView *superview;
@property (nonatomic, assign, readonly) YGNodeRef yogaNode;
@property (nonatomic, copy) NSString *viewName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,3 @@
@property (nonatomic, weak) UIScrollView *scrollView;

@end

__attribute__((deprecated("Use RCTCustomRefreshControlProtocol instead")))
@protocol RCTCustomRefreshContolProtocol<RCTCustomRefreshControlProtocol>
@end
Original file line number Diff line number Diff line change
Expand Up @@ -351,9 +351,6 @@ - (instancetype)initWithBridgeProxy:(RCTBridgeProxy *)bridgeProxy

if ([module respondsToSelector:@selector(installJSIBindingsWithRuntime:callInvoker:)]) {
[(id<RCTTurboModuleWithJSIBindings>)module installJSIBindingsWithRuntime:*runtime callInvoker:_jsInvoker];
} else if ([module respondsToSelector:@selector(installJSIBindingsWithRuntime:)]) {
// Old API without CallInvoker (deprecated)
[(id<RCTTurboModuleWithJSIBindings>)module installJSIBindingsWithRuntime:*runtime];
}
return turboModule;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
- (void)installJSIBindingsWithRuntime:(facebook::jsi::Runtime &)runtime
callInvoker:(const std::shared_ptr<facebook::react::CallInvoker> &)callinvoker;

- (void)installJSIBindingsWithRuntime:(facebook::jsi::Runtime &)runtime
__attribute__((deprecated("Use 'installJSIBindingsWithRuntime:callInvoker:' instead")));

#endif

@end
Original file line number Diff line number Diff line change
Expand Up @@ -184,15 +184,13 @@
#import <React/RCTRefreshableProtocol.h>
#import <React/RCTReloadCommand.h>
#import <React/RCTResizeMode.h>
#import <React/RCTRootShadowView.h>
#import <React/RCTRootView.h>
#import <React/RCTRootViewDelegate.h>
#import <React/RCTScrollEvent.h>
#import <React/RCTScrollView.h>
#import <React/RCTScrollableProtocol.h>
#import <React/RCTSettingsManager.h>
#import <React/RCTSettingsPlugins.h>
#import <React/RCTShadowView+Internal.h>
#import <React/RCTShadowView+Layout.h>
#import <React/RCTShadowView.h>
#import <React/RCTSourceCode.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#import <XCTest/XCTest.h>

#import <RCTTest/RCTTestRunner.h>
#import <React/RCTRootShadowView.h>
#import <React/RCTShadowView.h>
#import <React/RCTUIManager.h>
#import <React/RCTView.h>
Expand Down Expand Up @@ -90,7 +89,7 @@ - (void)setUp
RCTUIManager *uiManager = _bridge.uiManager;

dispatch_async(uiManager.methodQueue, ^{
RCTRootShadowView *rootShadowView = [RCTRootShadowView new];
RCTShadowView *rootShadowView = [RCTShadowView new];
rootShadowView.reactTag = self->_rootViewReactTag;
uiManager.shadowViewRegistry[rootShadowView.reactTag] = rootShadowView;
});
Expand Down
Loading
Loading