Skip to content

Commit 2133cbb

Browse files
committed
chore: sync with upstream
1 parent a916898 commit 2133cbb

File tree

17 files changed

+345
-720
lines changed

17 files changed

+345
-720
lines changed

packages/helloworld/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
},
1414
"dependencies": {
1515
"react": "19.0.0-rc-fb9a90fa48-20240614",
16-
"@callstack/react-native-visionos": "1000.0.0"
16+
"@callstack/react-native-visionos": "0.77.0-main"
1717
},
1818
"devDependencies": {
1919
"@babel/core": "^7.25.2",

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

+2-2
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

+1-1
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/Libraries/AppDelegate/RCTAppDelegate.mm

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#import <react/renderer/graphics/ColorComponents.h>
1919
#import "RCTAppDelegate+Protected.h"
2020
#import "RCTAppSetupUtils.h"
21-
#import <objc/runtime.h>
2221

2322
#if RN_DISABLE_OSS_PLUGIN_HEADER
2423
#import <RCTTurboModulePlugin/RCTTurboModulePlugin.h>

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

-16
Original file line numberDiff line numberDiff line change
@@ -545,22 +545,6 @@ + (UIKeyboardType)UIKeyboardType:(id)json RCT_DYNAMIC
545545
UIViewContentModeScaleAspectFill,
546546
integerValue)
547547

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

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

+1-5
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,7 @@ - (void)handleKeyUIEventSwizzle:(UIEvent *)event
127127
if ([event respondsToSelector:@selector(_isKeyDown)]) {
128128
isKeyDown = [event _isKeyDown];
129129
}
130-
#if !TARGET_OS_VISION
131-
BOOL interactionEnabled = !RCTSharedApplication().isIgnoringInteractionEvents;
132-
#else
133-
BOOL interactionEnabled = true;
134-
#endif
130+
135131
BOOL hasFirstResponder = NO;
136132
if (isKeyDown && modifiedInput.length > 0) {
137133
UIResponder *firstResponder = nil;

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

+3-15
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

-4
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

-4
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

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

+8-12
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": {
@@ -111,17 +111,13 @@
111111
},
112112
"dependencies": {
113113
"@jest/create-cache-key-function": "^29.6.3",
114-
"@react-native-community/cli": "14.0.0",
115-
"@react-native-community/cli-platform-android": "14.0.0",
116-
"@react-native-community/cli-platform-ios": "14.0.0",
117-
"@react-native-community/cli-platform-apple": "14.0.0",
118-
"@react-native/assets-registry": "0.76.0-main",
119-
"@react-native/codegen": "0.76.0-main",
120-
"@react-native/community-cli-plugin": "0.76.0-main",
121-
"@react-native/gradle-plugin": "0.76.0-main",
122-
"@react-native/js-polyfills": "0.76.0-main",
123-
"@react-native/normalize-colors": "0.76.0-main",
124-
"@react-native/virtualized-lists": "0.76.0-main",
114+
"@react-native/assets-registry": "0.77.0-main",
115+
"@react-native/codegen": "0.77.0-main",
116+
"@react-native/community-cli-plugin": "0.77.0-main",
117+
"@react-native/gradle-plugin": "0.77.0-main",
118+
"@react-native/js-polyfills": "0.77.0-main",
119+
"@react-native/normalize-colors": "0.77.0-main",
120+
"@react-native/virtualized-lists": "0.77.0-main",
125121
"abort-controller": "^3.0.0",
126122
"anser": "^1.4.9",
127123
"ansi-regex": "^5.0.0",

packages/react-native/scripts/react_native_pods.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,8 @@ def use_react_native! (
163163
pod 'DoubleConversion', :podspec => "#{prefix}/third-party-podspecs/DoubleConversion.podspec"
164164
pod 'glog', :podspec => "#{prefix}/third-party-podspecs/glog.podspec"
165165
pod 'boost', :podspec => "#{prefix}/third-party-podspecs/boost.podspec"
166-
pod 'fmt', :podspec => "#{prefix}/third-party-podspecs/fmt.podspec"
167-
pod 'RCT-Folly', :podspec => "#{prefix}/third-party-podspecs/RCT-Folly.podspec", :modular_headers => true
168166
pod 'fmt', :podspec => "#{prefix}/third-party-podspecs/fmt.podspec", :modular_headers => true
167+
pod 'RCT-Folly', :podspec => "#{prefix}/third-party-podspecs/RCT-Folly.podspec", :modular_headers => true
169168

170169
folly_config = get_folly_config()
171170
run_codegen!(

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

-3
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']
@@ -48,7 +46,6 @@ Pod::Spec.new do |spec|
4846
}
4947

5048
spec.ios.vendored_frameworks = "destroot/Library/Frameworks/ios/hermes.framework"
51-
spec.visionos.vendored_frameworks = "destroot/Library/Frameworks/xros/hermes.framework"
5249
spec.osx.vendored_frameworks = "destroot/Library/Frameworks/macosx/hermes.framework"
5350
spec.visionos.vendored_frameworks = "destroot/Library/Frameworks/xros/hermes.framework"
5451

packages/react-native/types/tsconfig.json

+1-4
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
"jsx": "react",
1111
"noEmit": true,
1212
"forceConsistentCasingInFileNames": true,
13-
"paths": {
14-
"react-native": ["."],
15-
"react-native/*": ["../*"]
16-
}
13+
"paths": {"react-native": ["."]}
1714
}
1815
}

0 commit comments

Comments
 (0)