File tree Expand file tree Collapse file tree 11 files changed +189
-242
lines changed Expand file tree Collapse file tree 11 files changed +189
-242
lines changed Original file line number Diff line number Diff line change 12
12
"test" : " jest"
13
13
},
14
14
"dependencies" : {
15
- "react" : " 18.3.1 " ,
16
- "@callstack/react-native-visionos" : " 1000.0.0 "
15
+ "react" : " 19.0.0 " ,
16
+ "@callstack/react-native-visionos" : " 0.77.0-main "
17
17
},
18
18
"devDependencies" : {
19
19
"@babel/core" : " ^7.25.2" ,
Original file line number Diff line number Diff line change 19
19
" dist"
20
20
],
21
21
"devDependencies" : {
22
- "metro-resolver" : " ^0.81.0-alpha.0 "
22
+ "metro-resolver" : " ^0.81.0"
23
23
},
24
24
"engines" : {
25
25
"node" : " >=18"
Original file line number Diff line number Diff line change @@ -49,6 +49,8 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
49
49
return YES ;
50
50
}
51
51
52
+
53
+ #if !TARGET_OS_VISION
52
54
- (void )loadReactNativeWindow : (NSDictionary *)launchOptions
53
55
{
54
56
UIView *rootView = [self .rootViewFactory viewWithModuleName: self .moduleName
@@ -62,6 +64,7 @@ - (void)loadReactNativeWindow:(NSDictionary *)launchOptions
62
64
_window.rootViewController = rootViewController;
63
65
[_window makeKeyAndVisible ];
64
66
}
67
+ #endif
65
68
66
69
#pragma mark - UISceneDelegate
67
70
Original file line number Diff line number Diff line change @@ -157,6 +157,7 @@ - (UIView *)viewWithModuleName:(NSString *)moduleName
157
157
surfaceHostingProxyRootView.backgroundColor = [UIColor clearColor ];
158
158
#else
159
159
surfaceHostingProxyRootView.backgroundColor = [UIColor systemBackgroundColor ];
160
+ #endif
160
161
if (_configuration.customizeRootView != nil ) {
161
162
_configuration.customizeRootView (surfaceHostingProxyRootView);
162
163
}
Original file line number Diff line number Diff line change @@ -138,6 +138,7 @@ - (void)textDidChange
138
138
139
139
- (void )setDisableKeyboardShortcuts : (BOOL )disableKeyboardShortcuts
140
140
{
141
+ #if TARGET_OS_IOS
141
142
// Initialize the initial values only once
142
143
if (_initialValueLeadingBarButtonGroups == nil ) {
143
144
// Capture initial values of leading and trailing button groups
@@ -153,6 +154,7 @@ - (void)setDisableKeyboardShortcuts:(BOOL)disableKeyboardShortcuts
153
154
self.inputAssistantItem .leadingBarButtonGroups = _initialValueLeadingBarButtonGroups;
154
155
self.inputAssistantItem .trailingBarButtonGroups = _initialValueTrailingBarButtonGroups;
155
156
}
157
+ #endif
156
158
_disableKeyboardShortcuts = disableKeyboardShortcuts;
157
159
}
158
160
Original file line number Diff line number Diff line change @@ -400,6 +400,7 @@ - (void)setInputAccessoryViewButtonLabel:(NSString *)inputAccessoryViewButtonLab
400
400
401
401
- (void )setDisableKeyboardShortcuts : (BOOL )disableKeyboardShortcuts
402
402
{
403
+ #if TARGET_OS_IOS
403
404
// Initialize the initial values only once
404
405
if (_initialValueLeadingBarButtonGroups == nil ) {
405
406
// Capture initial values of leading and trailing button groups
@@ -415,6 +416,7 @@ - (void)setDisableKeyboardShortcuts:(BOOL)disableKeyboardShortcuts
415
416
self.backedTextInputView .inputAssistantItem .leadingBarButtonGroups = _initialValueLeadingBarButtonGroups;
416
417
self.backedTextInputView .inputAssistantItem .trailingBarButtonGroups = _initialValueTrailingBarButtonGroups;
417
418
}
419
+ #endif
418
420
}
419
421
420
422
#pragma mark - RCTBackedTextInputDelegate
Original file line number Diff line number Diff line change @@ -121,6 +121,7 @@ - (void)setSecureTextEntry:(BOOL)secureTextEntry
121
121
122
122
- (void )setDisableKeyboardShortcuts : (BOOL )disableKeyboardShortcuts
123
123
{
124
+ #if TARGET_OS_IOS
124
125
// Initialize the initial values only once
125
126
if (_initialValueLeadingBarButtonGroups == nil ) {
126
127
// Capture initial values of leading and trailing button groups
@@ -136,6 +137,7 @@ - (void)setDisableKeyboardShortcuts:(BOOL)disableKeyboardShortcuts
136
137
self.inputAssistantItem .leadingBarButtonGroups = _initialValueLeadingBarButtonGroups;
137
138
self.inputAssistantItem .trailingBarButtonGroups = _initialValueTrailingBarButtonGroups;
138
139
}
140
+ #endif
139
141
_disableKeyboardShortcuts = disableKeyboardShortcuts;
140
142
}
141
143
Original file line number Diff line number Diff line change @@ -610,6 +610,7 @@ BOOL RCTRunningInAppExtension(void)
610
610
}
611
611
612
612
UIScene *sceneToUse = foregroundActiveScene ? foregroundActiveScene : foregroundInactiveScene;
613
+ UIWindowScene *windowScene = (UIWindowScene *)sceneToUse;
613
614
614
615
#if TARGET_OS_VISION
615
616
// Ornaments are supported only on visionOS.
Original file line number Diff line number Diff line change @@ -321,11 +321,13 @@ - (void)_keyboardWillChangeFrame:(NSNotification *)notification
321
321
// Text field active region is below visible area with keyboard - update diff to bring into view
322
322
contentDiff = endFrame.origin .y - focusEnd;
323
323
} else {
324
+ #if !TARGET_OS_VISION
324
325
UIView *inputAccessoryView = _firstResponderViewOutsideScrollView.inputAccessoryView ;
325
326
if (inputAccessoryView) {
326
327
// Text input view is within the inputAccessoryView.
327
328
contentDiff = endFrame.origin .y - beginFrame.origin .y ;
328
329
}
330
+ #endif
329
331
}
330
332
} else if (endFrame.origin .y <= beginFrame.origin .y ) {
331
333
// Keyboard opened for other reason
You can’t perform that action at this time.
0 commit comments