Skip to content

Commit ef00b94

Browse files
yedidyakclaude
andcommitted
Bump deps for RN 0.84 and guard remaining legacy iOS imports
- Bump reanimated 4.2.0→4.2.2, worklets 0.7.1→0.7.4 for RN 0.84 compat - Bump gesture-handler to ^2.30.0 - Replace abandoned react-native-fast-image with @d11/react-native-fast-image (Fabric/new arch support) - Guard remaining legacy-only headers (RCTModalHostView, RCTScrollView, RCTRootView, RCTRootContentView) behind #ifndef RCT_NEW_ARCH_ENABLED - Wrap bridge-only files (RNNBridgeManager, bridge APIs in ReactNativeNavigation) in #ifndef RCT_NEW_ARCH_ENABLED - Remove dead bridge fallback in RNNCommandsHandler new-arch path - Clean stale hardcoded OTHER_CFLAGS from playground xcodeproj Co-Authored-By: Claude Opus 4.6 <[email protected]>
1 parent d2ece36 commit ef00b94

22 files changed

+1920
-1952
lines changed

ios/RCTHelpers.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#import <Foundation/Foundation.h>
2+
#ifndef RCT_NEW_ARCH_ENABLED
23
#import <React/RCTRootView.h>
4+
#endif
35

46
@interface RCTHelpers : NSObject
57
+ (NSMutableDictionary *)textAttributesFromDictionary:(NSDictionary *)dictionary
@@ -8,5 +10,7 @@
810
withPrefix:(NSString *)prefix
911
baseFont:(UIFont *)font;
1012
+ (NSString *)getTimestampString;
13+
#ifndef RCT_NEW_ARCH_ENABLED
1114
+ (BOOL)removeYellowBox:(RCTRootView *)reactRootView;
15+
#endif
1216
@end

ios/RCTHelpers.mm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#import "RCTHelpers.h"
22
#import <React/RCTFont.h>
3+
#ifndef RCT_NEW_ARCH_ENABLED
34
#import <React/RCTScrollView.h>
5+
#endif
46
#import <React/RCTView.h>
57

68
@implementation RCTHelpers
@@ -182,6 +184,7 @@ noticeable in RCCLightBox and RCCNotification where button (for example) are
182184
not clickable if placed at the bottom part of the view
183185
*/
184186

187+
#ifndef RCT_NEW_ARCH_ENABLED
185188
+ (BOOL)removeYellowBox:(RCTRootView *)reactRootView {
186189
#ifndef DEBUG
187190
return YES;
@@ -220,5 +223,6 @@ + (BOOL)removeYellowBox:(RCTRootView *)reactRootView {
220223

221224
return removed;
222225
}
226+
#endif
223227

224228
@end

ios/RNNBridgeManager.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#ifndef RCT_NEW_ARCH_ENABLED
12
#import <Foundation/Foundation.h>
23
#import <React/RCTBridge.h>
34

@@ -16,3 +17,4 @@ typedef UIViewController * (^RNNExternalViewCreator)(NSDictionary *props, RCTBri
1617
- (UIViewController *)findComponentForId:(NSString *)componentId;
1718

1819
@end
20+
#endif

ios/RNNBridgeManager.mm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#ifndef RCT_NEW_ARCH_ENABLED
12
#import "RNNBridgeManager.h"
23

34
#import "RNNBridgeModule.h"
@@ -121,3 +122,4 @@ - (void)onBridgeWillReload {
121122
}
122123

123124
@end
125+
#endif

ios/RNNCommandsHandler.mm

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -200,20 +200,20 @@ - (void)push:(NSString *)componentId
200200
RCTExecuteOnMainQueue(^{
201201
UIView *view = nil;
202202
#ifdef RCT_NEW_ARCH_ENABLED
203-
RCTHost *host = [ReactNativeNavigation getHost];
204-
205-
if (host != nil) {
206-
view = [host.surfacePresenter.mountingManager.componentViewRegistry
207-
findComponentViewWithTag: [optionsWithDefault.preview.reactTag.get integerValue]];
208-
} else {
209-
view = [[ReactNativeNavigation getBridge].uiManager
210-
viewForReactTag:optionsWithDefault.preview.reactTag.get];
211-
}
203+
RCTHost *host = [ReactNativeNavigation getHost];
204+
if (host != nil) {
205+
view =
206+
[host.surfacePresenter.mountingManager.componentViewRegistry
207+
findComponentViewWithTag:[optionsWithDefault.preview
208+
.reactTag
209+
.get integerValue]];
210+
}
212211
#else
213212
view = [[ReactNativeNavigation getBridge].uiManager
214213
viewForReactTag:optionsWithDefault.preview.reactTag.get];
215214
#endif
216-
[rootVc registerForPreviewingWithDelegate:(id)rootVc sourceView:view];
215+
[rootVc registerForPreviewingWithDelegate:(id)rootVc
216+
sourceView:view];
217217
});
218218
}
219219
} else {

ios/RNNElementFinder.mm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
#import "RNNReactView.h"
33
#import <React/RCTSurfaceView.h>
44
#import <React/RCTUIManager.h>
5+
#ifndef RCT_NEW_ARCH_ENABLED
56
#import <React/RCTRootView.h>
6-
#import <React/RCTUIManager.h>
7+
#endif
78

89
#ifdef RCT_NEW_ARCH_ENABLED
910
#import <React/RCTViewComponentView.h>

ios/RNNExternalComponentStore.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66

77
@interface RNNExternalComponentStore : NSObject
88

9-
- (void)registerExternalComponent:(NSString *)name callback:(RNNExternalViewCreator)callback;
10-
- (UIViewController *)getExternalComponent:(RNNLayoutInfo *)layoutInfo bridge:(RCTBridge *)bridge;
11-
129
#ifdef RCT_NEW_ARCH_ENABLED
1310
- (void)registerExternalHostComponent:(NSString *)name callback:(RNNExternalHostViewCreator)callback;
1411
- (UIViewController *)getExternalHostComponent:(RNNLayoutInfo *)layoutInfo host:(RCTHost *)host;
12+
#else
13+
- (void)registerExternalComponent:(NSString *)name callback:(RNNExternalViewCreator)callback;
14+
- (UIViewController *)getExternalComponent:(RNNLayoutInfo *)layoutInfo bridge:(RCTBridge *)bridge;
1515
#endif
1616

1717
@end

ios/RNNExternalComponentStore.mm

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,6 @@ - (instancetype)init {
1414
return self;
1515
}
1616

17-
- (void)registerExternalComponent:(NSString *)name callback:(RNNExternalViewCreator)callback {
18-
[_externalComponentCreators setObject:[callback copy] forKey:name];
19-
}
20-
21-
- (UIViewController *)getExternalComponent:(RNNLayoutInfo *)layoutInfo bridge:(RCTBridge *)bridge {
22-
RNNExternalViewCreator creator = [_externalComponentCreators objectForKey:layoutInfo.name];
23-
return creator(layoutInfo.props, bridge);
24-
}
25-
26-
2717
#ifdef RCT_NEW_ARCH_ENABLED
2818
- (void)registerExternalHostComponent:(NSString *)name callback:(RNNExternalHostViewCreator)callback {
2919
[_externalComponentCreators setObject:[callback copy] forKey:name];
@@ -33,6 +23,15 @@ - (UIViewController *)getExternalHostComponent:(RNNLayoutInfo *)layoutInfo host:
3323
RNNExternalHostViewCreator creator = [_externalComponentCreators objectForKey:layoutInfo.name];
3424
return creator(layoutInfo.props, host);
3525
}
26+
#else
27+
- (void)registerExternalComponent:(NSString *)name callback:(RNNExternalViewCreator)callback {
28+
[_externalComponentCreators setObject:[callback copy] forKey:name];
29+
}
30+
31+
- (UIViewController *)getExternalComponent:(RNNLayoutInfo *)layoutInfo bridge:(RCTBridge *)bridge {
32+
RNNExternalViewCreator creator = [_externalComponentCreators objectForKey:layoutInfo.name];
33+
return creator(layoutInfo.props, bridge);
34+
}
3635
#endif
3736

3837
@end
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
#import "RNNModalManager.h"
22
#import <Foundation/Foundation.h>
3+
#ifndef RCT_NEW_ARCH_ENABLED
34
#import <React/RCTModalHostViewManager.h>
5+
#endif
46

57
@interface RNNModalHostViewManagerHandler : NSObject
68

79
- (instancetype)initWithModalManager:(RNNModalManager *)modalManager;
810

11+
#ifndef RCT_NEW_ARCH_ENABLED
912
- (void)connectModalHostViewManager:(RCTModalHostViewManager *)modalHostViewManager;
13+
#endif
1014

1115
@end

ios/RNNModalHostViewManagerHandler.mm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ - (instancetype)initWithModalManager:(RNNModalManager *)modalManager {
1010
return self;
1111
}
1212

13+
#ifndef RCT_NEW_ARCH_ENABLED
1314
- (void)connectModalHostViewManager:(RCTModalHostViewManager *)modalHostViewManager {
1415
modalHostViewManager.presentationBlock =
1516
^(UIViewController *reactViewController, UIViewController *viewController, BOOL animated,
@@ -36,5 +37,6 @@ - (void)connectModalHostViewManager:(RCTModalHostViewManager *)modalHostViewMana
3637
}];
3738
};
3839
}
40+
#endif
3941

4042
@end

0 commit comments

Comments
 (0)