Skip to content

Commit da45fb9

Browse files
committed
chore: sync with upstream
1 parent 0dd5261 commit da45fb9

File tree

14 files changed

+228
-581
lines changed

14 files changed

+228
-581
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/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
#pragma clang diagnostic push
8584
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
@@ -91,19 +90,15 @@ - (void)startObserving
9190
selector:@selector(applicationWillChangeStatusBarFrame:)
9291
name:UIApplicationWillChangeStatusBarFrameNotification
9392
object:nil];
94-
#endif
9593
}
9694

9795
- (void)stopObserving
9896
{
99-
#if !TARGET_OS_VISION
10097
[[NSNotificationCenter defaultCenter] removeObserver:self];
101-
#endif
10298
}
10399

104100
- (void)emitEvent:(NSString *)eventName forNotification:(NSNotification *)notification
105101
{
106-
#if !TARGET_OS_VISION
107102
CGRect frame = [notification.userInfo[UIApplicationStatusBarFrameUserInfoKey] CGRectValue];
108103
#pragma clang diagnostic pop
109104
NSDictionary *event = @{
@@ -115,7 +110,6 @@ - (void)emitEvent:(NSString *)eventName forNotification:(NSNotification *)notifi
115110
},
116111
};
117112
[self sendEventWithName:eventName body:event];
118-
#endif
119113
}
120114

121115
- (void)applicationDidChangeStatusBarFrame:(NSNotification *)notification
@@ -137,7 +131,6 @@ - (void)applicationWillChangeStatusBarFrame:(NSNotification *)notification
137131

138132
RCT_EXPORT_METHOD(setStyle : (NSString *)style animated : (BOOL)animated)
139133
{
140-
#if !TARGET_OS_VISION
141134
dispatch_async(dispatch_get_main_queue(), ^{
142135
UIStatusBarStyle statusBarStyle = [RCTConvert UIStatusBarStyle:style];
143136
if (RCTViewControllerBasedStatusBarAppearance()) {
@@ -146,16 +139,14 @@ - (void)applicationWillChangeStatusBarFrame:(NSNotification *)notification
146139
} else {
147140
#pragma clang diagnostic push
148141
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
149-
[RCTSharedApplication() setStatusBarStyle:statusBarStyle animated:animated];
150-
}
142+
[RCTSharedApplication() setStatusBarStyle:statusBarStyle animated:animated];
143+
}
151144
#pragma clang diagnostic pop
152145
});
153-
#endif
154146
}
155147

156148
RCT_EXPORT_METHOD(setHidden : (BOOL)hidden withAnimation : (NSString *)withAnimation)
157149
{
158-
#if !TARGET_OS_VISION
159150
dispatch_async(dispatch_get_main_queue(), ^{
160151
UIStatusBarAnimation animation = [RCTConvert UIStatusBarAnimation:withAnimation];
161152
if (RCTViewControllerBasedStatusBarAppearance()) {
@@ -164,24 +155,21 @@ - (void)applicationWillChangeStatusBarFrame:(NSNotification *)notification
164155
} else {
165156
#pragma clang diagnostic push
166157
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
167-
[RCTSharedApplication() setStatusBarHidden:hidden withAnimation:animation];
158+
[RCTSharedApplication() setStatusBarHidden:hidden withAnimation:animation];
168159
#pragma clang diagnostic pop
169160
}
170161
});
171-
#endif
172162
}
173163

174164
RCT_EXPORT_METHOD(setNetworkActivityIndicatorVisible : (BOOL)visible)
175165
{
176-
#if !TARGET_OS_VISION
177166
dispatch_async(dispatch_get_main_queue(), ^{
178167
#pragma clang diagnostic push
179168
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
180169
// This is no longer supported in iOS 13 and later. We will remove this method in a future release.
181170
RCTSharedApplication().networkActivityIndicatorVisible = visible;
182171
#pragma clang diagnostic pop
183172
});
184-
#endif
185173
}
186174

187175
- (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: 1 addition & 1 deletion
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": {

packages/react-native/scripts/react_native_pods.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,8 @@ def use_react_native! (
173173
pod 'glog', :podspec => "#{prefix}/third-party-podspecs/glog.podspec"
174174
pod 'boost', :podspec => "#{prefix}/third-party-podspecs/boost.podspec"
175175
pod 'fast_float', :podspec => "#{prefix}/third-party-podspecs/fast_float.podspec"
176-
pod 'fmt', :podspec => "#{prefix}/third-party-podspecs/fmt.podspec"
177-
pod 'RCT-Folly', :podspec => "#{prefix}/third-party-podspecs/RCT-Folly.podspec", :modular_headers => true
178176
pod 'fmt', :podspec => "#{prefix}/third-party-podspecs/fmt.podspec", :modular_headers => true
177+
pod 'RCT-Folly', :podspec => "#{prefix}/third-party-podspecs/RCT-Folly.podspec", :modular_headers => true
179178

180179
folly_config = get_folly_config()
181180
run_codegen!(

packages/react-native/sdks/hermes-engine/hermes-engine.podspec

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ rescue => e
1818
react_native_path = File.join(__dir__, "..", "..")
1919
end
2020

21-
puts "React Native path: #{react_native_path}"
22-
2321
# package.json
2422
package = JSON.parse(File.read(File.join(react_native_path, "package.json")))
2523
version = package['version']

0 commit comments

Comments
 (0)