Skip to content

Commit 234743b

Browse files
committed
chore: sync with upstream
1 parent 4b3df6a commit 234743b

File tree

15 files changed

+262
-619
lines changed

15 files changed

+262
-619
lines changed

packages/out-of-tree-platforms/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@callstack/out-of-tree-platforms",
3-
"version": "0.76.0-main",
3+
"version": "0.77.0-main",
44
"description": "Utils for React Native out of tree platforms.",
55
"keywords": ["out-of-tree", "react-native"],
66
"homepage": "https://github.com/callstack/react-native-visionos/tree/HEAD/packages/out-of-tree-platforms#readme",
@@ -19,7 +19,7 @@
1919
"dist"
2020
],
2121
"devDependencies": {
22-
"metro-resolver": "^0.80.0"
22+
"metro-resolver": "^0.81.0-alpha.0"
2323
},
2424
"engines": {
2525
"node": ">=18"

packages/react-native-test-library/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
],
2727
"devDependencies": {
2828
"@babel/core": "^7.25.2",
29-
"@react-native/babel-preset": "0.76.0-main",
29+
"@react-native/babel-preset": "0.77.0-main",
3030
"@callstack/react-native-visionos": "0.77.0-main"
3131
},
3232
"peerDependencies": {

packages/react-native/React/Base/RCTConvert.mm

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -546,22 +546,6 @@ + (UIKeyboardType)UIKeyboardType:(id)json RCT_DYNAMIC
546546
UIViewContentModeScaleAspectFill,
547547
integerValue)
548548

549-
RCT_ENUM_CONVERTER(
550-
UIBarStyle,
551-
(@{
552-
@"default" : @(UIBarStyleDefault),
553-
@"black" : @(UIBarStyleBlack),
554-
#if TARGET_OS_VISION
555-
@"blackOpaque" : @(UIBarStyleBlack),
556-
@"blackTranslucent" : @(UIBarStyleBlack),
557-
#else
558-
@"blackOpaque" : @(UIBarStyleBlackOpaque),
559-
@"blackTranslucent" : @(UIBarStyleBlackTranslucent),
560-
#endif
561-
}),
562-
UIBarStyleDefault,
563-
integerValue)
564-
565549
RCT_ENUM_CONVERTER(
566550
RCTCursor,
567551
(@{

packages/react-native/React/Base/RCTKeyCommands.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,12 @@ - (void)handleKeyUIEventSwizzle:(UIEvent *)event
127127
if ([event respondsToSelector:@selector(_isKeyDown)]) {
128128
isKeyDown = [event _isKeyDown];
129129
}
130-
130+
#if !TARGET_OS_VISION
131+
BOOL interactionEnabled = !RCTSharedApplication().isIgnoringInteractionEvents;
132+
#else
133+
BOOL interactionEnabled = true;
134+
#endif
135+
BOOL hasFirstResponder = NO;
131136
if (isKeyDown && modifiedInput.length > 0) {
132137
UIResponder *firstResponder = nil;
133138
for (UIWindow *window in [self allWindows]) {

packages/react-native/React/CoreModules/RCTStatusBarManager.mm

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ + (BOOL)requiresMainQueueSetup
7979

8080
- (void)startObserving
8181
{
82-
#if !TARGET_OS_VISION
8382
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
8483
[nc addObserver:self
8584
selector:@selector(applicationDidChangeStatusBarFrame:)
@@ -89,19 +88,15 @@ - (void)startObserving
8988
selector:@selector(applicationWillChangeStatusBarFrame:)
9089
name:UIApplicationWillChangeStatusBarFrameNotification
9190
object:nil];
92-
#endif
9391
}
9492

9593
- (void)stopObserving
9694
{
97-
#if !TARGET_OS_VISION
9895
[[NSNotificationCenter defaultCenter] removeObserver:self];
99-
#endif
10096
}
10197

10298
- (void)emitEvent:(NSString *)eventName forNotification:(NSNotification *)notification
10399
{
104-
#if !TARGET_OS_VISION
105100
CGRect frame = [notification.userInfo[UIApplicationStatusBarFrameUserInfoKey] CGRectValue];
106101
NSDictionary *event = @{
107102
@"frame" : @{
@@ -112,7 +107,6 @@ - (void)emitEvent:(NSString *)eventName forNotification:(NSNotification *)notifi
112107
},
113108
};
114109
[self sendEventWithName:eventName body:event];
115-
#endif
116110
}
117111

118112
- (void)applicationDidChangeStatusBarFrame:(NSNotification *)notification
@@ -134,7 +128,6 @@ - (void)applicationWillChangeStatusBarFrame:(NSNotification *)notification
134128

135129
RCT_EXPORT_METHOD(setStyle : (NSString *)style animated : (BOOL)animated)
136130
{
137-
#if !TARGET_OS_VISION
138131
dispatch_async(dispatch_get_main_queue(), ^{
139132
UIStatusBarStyle statusBarStyle = [RCTConvert UIStatusBarStyle:style];
140133
if (RCTViewControllerBasedStatusBarAppearance()) {
@@ -143,16 +136,14 @@ - (void)applicationWillChangeStatusBarFrame:(NSNotification *)notification
143136
} else {
144137
#pragma clang diagnostic push
145138
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
146-
[RCTSharedApplication() setStatusBarStyle:statusBarStyle animated:animated];
147-
}
139+
[RCTSharedApplication() setStatusBarStyle:statusBarStyle animated:animated];
140+
}
148141
#pragma clang diagnostic pop
149142
});
150-
#endif
151143
}
152144

153145
RCT_EXPORT_METHOD(setHidden : (BOOL)hidden withAnimation : (NSString *)withAnimation)
154146
{
155-
#if !TARGET_OS_VISION
156147
dispatch_async(dispatch_get_main_queue(), ^{
157148
UIStatusBarAnimation animation = [RCTConvert UIStatusBarAnimation:withAnimation];
158149
if (RCTViewControllerBasedStatusBarAppearance()) {
@@ -161,24 +152,21 @@ - (void)applicationWillChangeStatusBarFrame:(NSNotification *)notification
161152
} else {
162153
#pragma clang diagnostic push
163154
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
164-
[RCTSharedApplication() setStatusBarHidden:hidden withAnimation:animation];
155+
[RCTSharedApplication() setStatusBarHidden:hidden withAnimation:animation];
165156
#pragma clang diagnostic pop
166157
}
167158
});
168-
#endif
169159
}
170160

171161
RCT_EXPORT_METHOD(setNetworkActivityIndicatorVisible : (BOOL)visible)
172162
{
173-
#if !TARGET_OS_VISION
174163
dispatch_async(dispatch_get_main_queue(), ^{
175164
#pragma clang diagnostic push
176165
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
177166
// This is no longer supported in iOS 13 and later. We will remove this method in a future release.
178167
RCTSharedApplication().networkActivityIndicatorVisible = visible;
179168
#pragma clang diagnostic pop
180169
});
181-
#endif
182170
}
183171

184172
- (facebook::react::ModuleConstants<JS::NativeStatusBarManagerIOS::Constants>)getConstants

packages/react-native/React/Fabric/Mounting/ComponentViews/Modal/RCTFabricModalHostViewController.mm

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ - (BOOL)prefersStatusBarHidden
6161
#if RCT_DEV && TARGET_OS_IOS
6262
- (UIInterfaceOrientationMask)supportedInterfaceOrientations
6363
{
64-
#if !TARGET_OS_VISION
6564
UIInterfaceOrientationMask appSupportedOrientationsMask =
6665
[RCTSharedApplication() supportedInterfaceOrientationsForWindow:RCTKeyWindow()];
6766
if (!(_supportedInterfaceOrientations & appSupportedOrientationsMask)) {
@@ -75,9 +74,6 @@ - (UIInterfaceOrientationMask)supportedInterfaceOrientations
7574
}
7675

7776
return _supportedInterfaceOrientations;
78-
#else
79-
return UIInterfaceOrientationUnknown;
80-
#endif
8177
}
8278
#endif // RCT_DEV
8379

packages/react-native/React/Views/RCTModalHostViewController.m

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ - (BOOL)prefersStatusBarHidden
5454
#if RCT_DEV && TARGET_OS_IOS
5555
- (UIInterfaceOrientationMask)supportedInterfaceOrientations
5656
{
57-
#if !TARGET_OS_VISION
5857
UIInterfaceOrientationMask appSupportedOrientationsMask =
5958
[RCTSharedApplication() supportedInterfaceOrientationsForWindow:RCTKeyWindow()];
6059
if (!(_supportedInterfaceOrientations & appSupportedOrientationsMask)) {
@@ -68,9 +67,6 @@ - (UIInterfaceOrientationMask)supportedInterfaceOrientations
6867
}
6968

7069
return _supportedInterfaceOrientations;
71-
#else
72-
return UIInterfaceOrientationUnknown;
73-
#endif
7470
}
7571
#endif // RCT_DEV
7672

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,47 @@
1-
const {
2-
createBuild,
3-
createLog,
4-
createRun,
5-
getRunOptions,
6-
getLogOptions,
7-
getBuildOptions,
8-
} = require('@react-native-community/cli-platform-apple');
1+
let apple;
2+
try {
3+
apple = require('@react-native-community/cli-platform-apple');
4+
} catch {
5+
if (verbose) {
6+
console.warn(
7+
'@react-native-community/cli-platform-apple not found, the react-native.config.js may be unusable.',
8+
);
9+
}
10+
}
911

1012
const platformName = 'visionos';
1113

1214
const run = {
1315
name: 'run-visionos',
1416
description: 'builds your app and starts it on visionOS simulator',
15-
func: createRun({platformName}),
17+
func: apple.createRun({platformName}),
1618
examples: [
1719
{
1820
desc: 'Run on a specific simulator',
1921
cmd: 'npx @callstack/react-native-visionos run-visionos --simulator "Apple Vision Pro"',
2022
},
2123
],
22-
options: getRunOptions({platformName}),
24+
options: apple.getRunOptions({platformName}),
2325
};
2426

2527
const log = {
2628
name: 'log-visionos',
2729
description: 'starts visionOS device syslog tail',
28-
func: createLog({platformName: 'visionos'}),
29-
options: getLogOptions({platformName}),
30+
func: apple.createLog({platformName: 'visionos'}),
31+
options: apple.getLogOptions({platformName}),
3032
};
3133

3234
const build = {
3335
name: 'build-visionos',
3436
description: 'builds your app for visionOS platform',
35-
func: createBuild({platformName}),
37+
func: apple.createBuild({platformName}),
3638
examples: [
3739
{
3840
desc: 'Build the app for all visionOS devices in Release mode',
3941
cmd: 'npx @callstack/react-native-visionos build-visionos --mode "Release"',
4042
},
4143
],
42-
options: getBuildOptions({platformName}),
44+
options: apple.getBuildOptions({platformName}),
4345
};
4446

4547
module.exports = [run, log, build];

packages/react-native/package.json

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@callstack/react-native-visionos",
3-
"version": "1000.0.0",
3+
"version": "0.77.0-main",
44
"description": "React Native for visionOS",
55
"license": "MIT",
66
"repository": {
@@ -110,17 +110,13 @@
110110
},
111111
"dependencies": {
112112
"@jest/create-cache-key-function": "^29.6.3",
113-
"@react-native-community/cli": "14.0.0",
114-
"@react-native-community/cli-platform-android": "14.0.0",
115-
"@react-native-community/cli-platform-ios": "14.0.0",
116-
"@react-native-community/cli-platform-apple": "14.0.0",
117-
"@react-native/assets-registry": "0.76.0-main",
118-
"@react-native/codegen": "0.76.0-main",
119-
"@react-native/community-cli-plugin": "0.76.0-main",
120-
"@react-native/gradle-plugin": "0.76.0-main",
121-
"@react-native/js-polyfills": "0.76.0-main",
122-
"@react-native/normalize-colors": "0.76.0-main",
123-
"@react-native/virtualized-lists": "0.76.0-main",
113+
"@react-native/assets-registry": "0.77.0-main",
114+
"@react-native/codegen": "0.77.0-main",
115+
"@react-native/community-cli-plugin": "0.77.0-main",
116+
"@react-native/gradle-plugin": "0.77.0-main",
117+
"@react-native/js-polyfills": "0.77.0-main",
118+
"@react-native/normalize-colors": "0.77.0-main",
119+
"@react-native/virtualized-lists": "0.77.0-main",
124120
"abort-controller": "^3.0.0",
125121
"anser": "^1.4.9",
126122
"ansi-regex": "^5.0.0",

packages/react-native/scripts/react_native_pods.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,8 @@ def use_react_native! (
165165
pod 'glog', :podspec => "#{prefix}/third-party-podspecs/glog.podspec"
166166
pod 'boost', :podspec => "#{prefix}/third-party-podspecs/boost.podspec"
167167
pod 'fast_float', :podspec => "#{prefix}/third-party-podspecs/fast_float.podspec"
168-
pod 'fmt', :podspec => "#{prefix}/third-party-podspecs/fmt.podspec"
169-
pod 'RCT-Folly', :podspec => "#{prefix}/third-party-podspecs/RCT-Folly.podspec", :modular_headers => true
170168
pod 'fmt', :podspec => "#{prefix}/third-party-podspecs/fmt.podspec", :modular_headers => true
169+
pod 'RCT-Folly', :podspec => "#{prefix}/third-party-podspecs/RCT-Folly.podspec", :modular_headers => true
171170

172171
folly_config = get_folly_config()
173172
run_codegen!(

0 commit comments

Comments
 (0)