File tree Expand file tree Collapse file tree 7 files changed +65
-5
lines changed
Libraries/NewAppScreen/components
visionos/HelloWorld.xcodeproj Expand file tree Collapse file tree 7 files changed +65
-5
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ const Header = (): Node => {
42
42
] } >
43
43
Welcome to
44
44
{ '\n' }
45
- React Native
45
+ React Native visionOS
46
46
</ Text >
47
47
</ ImageBackground >
48
48
) ;
@@ -65,7 +65,6 @@ const styles = StyleSheet.create({
65
65
* source image's size.
66
66
*/
67
67
marginLeft : - 128 ,
68
- marginBottom : - 192 ,
69
68
} ,
70
69
text : {
71
70
fontSize : 40 ,
Original file line number Diff line number Diff line change
1
+ <h1 align =" center " >
2
+ <a href =" https://reactnative.dev/ " >
3
+ React Native Vision OS
4
+ </a >
5
+ </h1 >
6
+
7
+ <p align =" center " >
8
+ <strong >Learn once, write anywhere:</strong ><br >
9
+ Build spatial apps with React.
10
+ </p >
11
+
12
+ React Native Vision OS allows you to write visionOS with full support for platform SDK. This is a full fork of the main repository with changes needed to support visionOS.
13
+
14
+ This project is still at an early stage of development and is not ready for production use.
15
+
16
+ ## Contributing
17
+
18
+ 1 . Download latest Xcode beta [ here] ( https://developer.apple.com/xcode/ ) .
19
+ 2 . Install visionOS Simulator runtime.
20
+ 3 . (Optional) Using Hermes - Install latest version of CMake (3.28) from ` main ` branch:
21
+ ``` sh
22
+ brew install cmake --HEAD
23
+ ```
24
+ 4 . Follow the same steps as for running iOS defined in [ packages/rn-tester/README.md] ( ./packages/rn-tester/README.md )
Original file line number Diff line number Diff line change @@ -310,6 +310,7 @@ + (NSURL *)jsBundleURLForBundleRoot:(NSString *)bundleRoot
310
310
[[NSURLQueryItem alloc ] initWithName: @" platform" value: RCTPlatformName],
311
311
[[NSURLQueryItem alloc ] initWithName: @" dev" value: enableDev ? @" true" : @" false" ],
312
312
[[NSURLQueryItem alloc ] initWithName: @" lazy" value: lazy ? @" true" : @" false" ],
313
+ [[NSURLQueryItem alloc ] initWithName: @" resolver.variant" value: @" visionos" ],
313
314
[[NSURLQueryItem alloc ] initWithName: @" minify" value: enableMinification ? @" true" : @" false" ],
314
315
[[NSURLQueryItem alloc ] initWithName: @" inlineSourceMap" value: inlineSourceMap ? @" true" : @" false" ],
315
316
[[NSURLQueryItem alloc ] initWithName: @" modulesOnly" value: modulesOnly ? @" true" : @" false" ],
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @callstack/react-native-visionos" ,
3
- "version" : " 1000.0.0 " ,
3
+ "version" : " 0.74.0-nightly-20231127 " ,
4
4
"description" : " React Native for visionOS" ,
5
5
"license" : " MIT" ,
6
6
"repository" : {
Original file line number Diff line number Diff line change 7
7
"ios" : " react-native run-ios" ,
8
8
"lint" : " eslint ." ,
9
9
"start" : " react-native start" ,
10
- "test" : " jest"
10
+ "test" : " jest" ,
11
+ "postinstall" : " patch-package"
11
12
},
12
13
"dependencies" : {
13
14
"react" : " 18.2.0" ,
14
- "@callstack/react-native-visionos" : " 1000.0.0"
15
+ "react-native" : " 0.74.0-nightly-20231123-342041e9e" ,
16
+ "@callstack/react-native-visionos" : " 0.74.0-nightly-20231127"
15
17
},
16
18
"devDependencies" : {
17
19
"@babel/core" : " ^7.20.0" ,
26
28
"babel-jest" : " ^29.6.3" ,
27
29
"eslint" : " ^8.19.0" ,
28
30
"jest" : " ^29.6.3" ,
31
+ "patch-package" : " ^8.0.0" ,
32
+ "postinstall-postinstall" : " ^2.1.0" ,
29
33
"prettier" : " 2.8.8" ,
30
34
"react-test-renderer" : " 18.2.0" ,
31
35
"typescript" : " 5.0.4"
Original file line number Diff line number Diff line change
1
+ diff --git a/node_modules/@react-native/community-cli-plugin/dist/utils/metroPlatformResolver.js b/node_modules/@react-native/community-cli-plugin/dist/utils/metroPlatformResolver.js
2
+ index 5cd205a..fa8a320 100644
3
+ --- a/node_modules/@react-native/community-cli-plugin/dist/utils/metroPlatformResolver.js
4
+ +++ b/node_modules/@react-native/community-cli-plugin/dist/utils/metroPlatformResolver.js
5
+ @@ -31,13 +31,14 @@ exports.reactNativePlatformResolver = reactNativePlatformResolver;
6
+ */
7
+ function reactNativePlatformResolver(platformImplementations) {
8
+ return (context, moduleName, platform) => {
9
+ + let platformOrVariant = context.customResolverOptions.variant || platform;
10
+ let modifiedModuleName = moduleName;
11
+ - if (platform != null && platformImplementations[platform]) {
12
+ + if (platformOrVariant != null && platformImplementations[platformOrVariant]) {
13
+ if (moduleName === "react-native") {
14
+ - modifiedModuleName = platformImplementations[platform];
15
+ + modifiedModuleName = platformImplementations[platformOrVariant];
16
+ } else if (moduleName.startsWith("react-native/")) {
17
+ modifiedModuleName = `${
18
+ - platformImplementations[platform]
19
+ + platformImplementations[platformOrVariant]
20
+ }/${modifiedModuleName.slice("react-native/".length)}`;
21
+ }
22
+ }
Original file line number Diff line number Diff line change 480
480
);
481
481
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
482
482
PRODUCT_NAME = HelloWorld;
483
+ SUPPORTED_PLATFORMS = "iphoneos iphonesimulator xros xrsimulator";
484
+ SUPPORTS_MACCATALYST = NO;
485
+ SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
486
+ SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
483
487
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
484
488
SWIFT_VERSION = 5.0;
489
+ TARGETED_DEVICE_FAMILY = "1,7";
485
490
VERSIONING_SYSTEM = "apple-generic";
486
491
};
487
492
name = Debug;
506
511
);
507
512
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
508
513
PRODUCT_NAME = HelloWorld;
514
+ SUPPORTED_PLATFORMS = "iphoneos iphonesimulator xros xrsimulator";
515
+ SUPPORTS_MACCATALYST = NO;
516
+ SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
517
+ SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
509
518
SWIFT_VERSION = 5.0;
519
+ TARGETED_DEVICE_FAMILY = "1,7";
510
520
VERSIONING_SYSTEM = "apple-generic";
511
521
};
512
522
name = Release;
You can’t perform that action at this time.
0 commit comments