Skip to content

Commit 01cbb58

Browse files
committed
fix: dimensions, use RCTMainWindow()
1 parent 84305a5 commit 01cbb58

File tree

15 files changed

+133
-82
lines changed

15 files changed

+133
-82
lines changed

packages/react-native/Libraries/AppDelegate/RCTAppDelegate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ NS_ASSUME_NONNULL_BEGIN
159159
- (BOOL)bridgelessEnabled;
160160

161161
/// Return the bundle URL for the main bundle.
162-
- (NSURL *)bundleURL;
162+
- (NSURL *__nullable)bundleURL;
163163

164164
/// Don't use this method, it's going to be removed soon.
165165
- (UIView *)viewWithModuleName:(NSString *)moduleName initialProperties:(NSDictionary*)initialProperties launchOptions:(NSDictionary*)launchOptions;

packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,9 @@ - (Class)getModuleClassFromName:(const char *)name
312312

313313
- (void)createReactHost
314314
{
315+
if (_reactHost != nil) {
316+
return;
317+
}
315318
__weak __typeof(self) weakSelf = self;
316319
_reactHost = [[RCTHost alloc] initWithBundleURL:[self bundleURL]
317320
hostDelegate:nil
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import SwiftUI
2+
3+
/**
4+
This SwiftUI struct returns main React Native scene. It should be used only once as it conains setup code.
5+
6+
Example:
7+
```swift
8+
@main
9+
struct YourApp: App {
10+
@UIApplicationDelegateAdaptor var delegate: AppDelegate
11+
12+
var body: some Scene {
13+
RCTMainWindow(moduleName: "YourApp")
14+
}
15+
}
16+
```
17+
18+
Note: If you want to create additional windows in your app, create a new `WindowGroup {}` and pass it a `RCTRootViewRepresentable`.
19+
*/
20+
public struct RCTMainWindow: Scene {
21+
var moduleName: String
22+
var initialProps: RCTRootViewRepresentable.InitialPropsType
23+
24+
public init(moduleName: String, initialProps: RCTRootViewRepresentable.InitialPropsType = nil) {
25+
self.moduleName = moduleName
26+
self.initialProps = initialProps
27+
}
28+
29+
public var body: some Scene {
30+
WindowGroup {
31+
RCTRootViewRepresentable(moduleName: moduleName, initialProps: initialProps)
32+
}
33+
}
34+
}

packages/react-native/Libraries/SwiftExtensions/RCTReactViewController.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
#import <UIKit/UIKit.h>
22

3+
/**
4+
A `UIViewController` responsible for embeding `RCTRootView` inside. Uses Factory pattern to retrive new view instances.
5+
6+
Note: Used to in `RCTRootViewRepresentable` to display React views.
7+
*/
38
@interface RCTReactViewController : UIViewController
49

5-
@property (nonatomic, strong) NSString *_Nonnull moduleName;
6-
@property (nonatomic, strong) NSDictionary *_Nullable initialProps;
10+
@property (nonatomic, strong, nonnull) NSString *moduleName;
11+
@property (nonatomic, strong, nullable) NSDictionary *initialProps;
712

813
- (instancetype _Nonnull)initWithModuleName:(NSString *_Nonnull)moduleName
914
initProps:(NSDictionary *_Nullable)initProps;

packages/react-native/Libraries/SwiftExtensions/RCTReactViewController.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#import "RCTReactViewController.h"
2+
#import <React/RCTConstants.h>
23

34
@protocol RCTRootViewFactoryProtocol <NSObject>
45

@@ -16,6 +17,10 @@ - (instancetype)initWithModuleName:(NSString *)moduleName initProps:(NSDictionar
1617
return self;
1718
}
1819

20+
- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator {
21+
[[NSNotificationCenter defaultCenter] postNotificationName:RCTWindowFrameDidChangeNotification object:self];
22+
}
23+
1924
// TODO: Temporary solution for creating RCTRootView on demand. This should be done through factory pattern, see here: https://github.com/facebook/react-native/pull/42263
2025
- (void)loadView {
2126
id<UIApplicationDelegate> appDelegate = [UIApplication sharedApplication].delegate;

packages/react-native/Libraries/SwiftExtensions/RCTRootViewRepresentable.swift

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
import SwiftUI
22

3-
/*
4-
* Use this struct in SwiftUI context to present React Native rootView.
5-
*
6-
* Example:
7-
* ```
8-
* WindowGroup {
9-
* RCTRootViewRepresentable(moduleName: "RNTesterApp", initialProps: [:])
10-
* }
11-
* ```
12-
*/
3+
/**
4+
SwiftUI view enclosing `RCTReactViewController`. Its main purpose is to display React Native views inside of SwiftUI lifecycle.
5+
6+
Use it create new windows in your app:
7+
Example:
8+
```swift
9+
WindowGroup {
10+
RCTRootViewRepresentable(moduleName: "YourAppName", initialProps: [:])
11+
}
12+
```
13+
*/
1314
public struct RCTRootViewRepresentable: UIViewControllerRepresentable {
15+
public typealias InitialPropsType = [AnyHashable: Any]?
16+
1417
var moduleName: String
15-
var initialProps: [AnyHashable: Any]?
18+
var initialProps: InitialPropsType
1619

17-
public init(moduleName: String, initialProps: [AnyHashable : Any]?) {
20+
public init(moduleName: String, initialProps: InitialPropsType = nil) {
1821
self.moduleName = moduleName
1922
self.initialProps = initialProps
2023
}

packages/react-native/Libraries/SwiftExtensions/React-RCTSwiftExtensions.podspec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,6 @@ Pod::Spec.new do |s|
2222
s.source = source
2323
s.source_files = "*.{swift,h,m}"
2424
s.frameworks = ["UIKit", "SwiftUI"]
25+
26+
s.dependency "React-Core"
2527
end

packages/react-native/React/Base/RCTBridgeDelegate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN
2020
* When running from a locally bundled JS file, this should be a `file://` url
2121
* pointing to a path inside the app resources, e.g. `file://.../main.jsbundle`.
2222
*/
23-
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge;
23+
- (NSURL *__nullable)sourceURLForBridge:(RCTBridge *)bridge;
2424

2525
@optional
2626

packages/react-native/template/_gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,4 @@ yarn-error.log
6565

6666
# testing
6767
/coverage
68+
.yarn

packages/react-native/template/visionos/HelloWorld.xcodeproj/project.pbxproj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
00E356F31AD99517003FC87E /* HelloWorldTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* HelloWorldTests.m */; };
1111
0C80B921A6F3F58F76C31292 /* libPods-HelloWorld.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-HelloWorld.a */; };
1212
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
13-
767CEB962B56C0F3000139AD /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 767CEB952B56C0F3000139AD /* AppDelegate.swift */; };
14-
767CEB982B56C0FA000139AD /* App.swift in Sources */ = {isa = PBXBuildFile; fileRef = 767CEB972B56C0FA000139AD /* App.swift */; };
13+
767CEBBC2B582F6B000139AD /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 767CEBBB2B582F6B000139AD /* AppDelegate.swift */; };
14+
767CEBBE2B582F78000139AD /* App.swift in Sources */ = {isa = PBXBuildFile; fileRef = 767CEBBD2B582F78000139AD /* App.swift */; };
1515
7699B88040F8A987B510C191 /* libPods-HelloWorld-HelloWorldTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 19F6CBCC0A4E27FBF8BF4A61 /* libPods-HelloWorld-HelloWorldTests.a */; };
1616
/* End PBXBuildFile section */
1717

@@ -37,8 +37,8 @@
3737
5709B34CF0A7D63546082F79 /* Pods-HelloWorld.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HelloWorld.release.xcconfig"; path = "Target Support Files/Pods-HelloWorld/Pods-HelloWorld.release.xcconfig"; sourceTree = "<group>"; };
3838
5B7EB9410499542E8C5724F5 /* Pods-HelloWorld-HelloWorldTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HelloWorld-HelloWorldTests.debug.xcconfig"; path = "Target Support Files/Pods-HelloWorld-HelloWorldTests/Pods-HelloWorld-HelloWorldTests.debug.xcconfig"; sourceTree = "<group>"; };
3939
5DCACB8F33CDC322A6C60F78 /* libPods-HelloWorld.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-HelloWorld.a"; sourceTree = BUILT_PRODUCTS_DIR; };
40-
767CEB952B56C0F3000139AD /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = VisionAppTestSUI/AppDelegate.swift; sourceTree = "<group>"; };
41-
767CEB972B56C0FA000139AD /* App.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = App.swift; path = VisionAppTestSUI/App.swift; sourceTree = "<group>"; };
40+
767CEBBB2B582F6B000139AD /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = HelloWorld/AppDelegate.swift; sourceTree = "<group>"; };
41+
767CEBBD2B582F78000139AD /* App.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = App.swift; path = HelloWorld/App.swift; sourceTree = "<group>"; };
4242
89C6BE57DB24E9ADA2F236DE /* Pods-HelloWorld-HelloWorldTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HelloWorld-HelloWorldTests.release.xcconfig"; path = "Target Support Files/Pods-HelloWorld-HelloWorldTests/Pods-HelloWorld-HelloWorldTests.release.xcconfig"; sourceTree = "<group>"; };
4343
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
4444
/* End PBXFileReference section */
@@ -83,8 +83,8 @@
8383
13B07FAE1A68108700A75B9A /* HelloWorld */ = {
8484
isa = PBXGroup;
8585
children = (
86-
767CEB952B56C0F3000139AD /* AppDelegate.swift */,
87-
767CEB972B56C0FA000139AD /* App.swift */,
86+
767CEBBB2B582F6B000139AD /* AppDelegate.swift */,
87+
767CEBBD2B582F78000139AD /* App.swift */,
8888
13B07FB51A68108700A75B9A /* Images.xcassets */,
8989
13B07FB61A68108700A75B9A /* Info.plist */,
9090
);
@@ -386,8 +386,8 @@
386386
isa = PBXSourcesBuildPhase;
387387
buildActionMask = 2147483647;
388388
files = (
389-
767CEB962B56C0F3000139AD /* AppDelegate.swift in Sources */,
390-
767CEB982B56C0FA000139AD /* App.swift in Sources */,
389+
767CEBBC2B582F6B000139AD /* AppDelegate.swift in Sources */,
390+
767CEBBE2B582F78000139AD /* App.swift in Sources */,
391391
);
392392
runOnlyForDeploymentPostprocessing = 0;
393393
};

packages/react-native/template/visionos/HelloWorld/App.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ struct HelloWorldApp: App {
77
@UIApplicationDelegateAdaptor var delegate: AppDelegate
88

99
var body: some Scene {
10-
WindowGroup {
11-
RCTRootViewRepresentable(moduleName: "HelloWorld", initialProps: nil)
12-
}
10+
RCTMainWindow(moduleName: "HelloWorld")
1311
}
1412
}

packages/react-native/template/visionos/HelloWorld/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class AppDelegate: RCTAppDelegate {
99

1010
override func bundleURL() -> URL? {
1111
#if DEBUG
12-
RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index")
12+
RCTBundleURLProvider.sharedSettings()?.jsBundleURL(forBundleRoot: "index")
1313
#else
1414
Bundle.main.url(forResource: "main", withExtension: "jsbundle")
1515
#endif

packages/rn-tester/Podfile.lock

Lines changed: 52 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,7 +1069,8 @@ PODS:
10691069
- React-jsi
10701070
- React-NativeModulesApple
10711071
- ReactCommon
1072-
- React-RCTSwiftExtensions (1000.0.0)
1072+
- React-RCTSwiftExtensions (1000.0.0):
1073+
- React-Core
10731074
- React-RCTTest (1000.0.0):
10741075
- RCT-Folly (= 2024.01.01.00)
10751076
- React-Core (= 1000.0.0)
@@ -1419,65 +1420,66 @@ CHECKOUT OPTIONS:
14191420
SPEC CHECKSUMS:
14201421
boost: 8f1e9b214fa11f71081fc8ecd5fad3daf221cf7f
14211422
DoubleConversion: 71bf0761505a44e4dfddc0aa04afa049fdfb63b5
1422-
FBLazyVector: 5fdead7fff97d43aacf320bcccb748cf8527af07
1423+
FBLazyVector: e34ddc4948ab5a9f857262cf68a46d39d8c61ed1
14231424
fmt: 5d9ffa7ccba126c08b730252123601d514652320
14241425
glog: 4f05d17aa39a829fee878689fc9a41af587fabba
14251426
hermes-engine: 3fed7e58e811ae8f795063cc6450714395c0276d
14261427
MyNativeView: 534e99e9c5dfd0bae242bdb06bb72e11d720c9a2
14271428
NativeCxxModuleExample: 107af3af8f5ce8802037937aabf1872ac891ad43
14281429
OCMock: 267d92c078398b7ce11d99e811e3a402744c06bc
1429-
RCT-Folly: d8c13e288297f63c0db8f083cfedebdd2649a299
1430+
RCT-Folly: 70c792c856324d6a518af75b3a307c14c226343a
14301431
RCTDeprecation: 3808e36294137f9ee5668f4df2e73dc079cd1dcf
1431-
RCTRequired: 6b32de28a5215a5990284d541bbdec8b5e3c78bf
1432-
RCTTypeSafety: 0e2bb3047d531a60b28b1d0d63e0c27a742a3019
1433-
React: a6f80cd5ba07887121f8b480991e17041a838f5c
1434-
React-callinvoker: d558dab7c4d987f1577838a50d59aeb069130d91
1432+
RCTRequired: 60c97b0b0cc33a209d33b3412eb1a218cbc1b82c
1433+
RCTTypeSafety: 2f597b431b910be1e49c6e6f40dd6879f6d1bdfd
1434+
React: dc827cd6966c06176ea9664cb4d74d63d1a4fcca
1435+
React-callinvoker: 3727946c98d5626aef39ac6a45b9d1be5db35527
14351436
React-Codegen: 04a9ac6fd2f392534ed432102c6cbf117dcbf62b
1436-
React-Core: 6403b0d9390e408017e82dc7823e059c53186141
1437-
React-CoreModules: 6406001452f46e9234a2fac3861a60786285acc0
1438-
React-cxxreact: f917d87380150aaaf8053fb4280358aad33c9b71
1439-
React-debug: c12ba28faf2c0aace7cbc81d7ac7661075976460
1440-
React-Fabric: 1d2070e13efd26fa34bb67cf484794265402ac06
1441-
React-FabricImage: 238905c6db0cf533d562b52ae936bfd7ed5f00dc
1442-
React-graphics: c430227a30690a86be35a8fb8c4c36ff312ff4bc
1443-
React-hermes: f6b54c8b4553fc7a8926f3e46459923a834a99d4
1444-
React-ImageManager: 38795ba06968bbcb11343b9e1123557af34c6270
1445-
React-jserrorhandler: fba402f8090b05e29c57c7bb111413e12e89aebe
1446-
React-jsi: d5643763df3910249aac671c9b7d634e6e96af7b
1447-
React-jsiexecutor: 847a90333a8840846652833aa4e291e433277aec
1448-
React-jsinspector: c2abef5095276eeb09c4b871f3024851d2ac3e58
1449-
React-jsitracing: 3f24b1171cc7aa986555a84e1036d3a6ba98bc84
1450-
React-logger: 4b1ded6e5707b276ffd58505987aba8dd1c0c3e4
1451-
React-Mapbuffer: b562329b31a9a5e3f18a8b4632c4fa8945a504e8
1452-
React-nativeconfig: 86b0961752d6a00ccc30418bfb5bfb5ebda84149
1453-
React-NativeModulesApple: eb4d247f32f25df62d1e979721502203db3de17c
1454-
React-perflogger: 31792e118e9c4785739c1823a481d64ba3d512b9
1455-
React-RCTActionSheet: a79621f1907340e31a66a4ad5e89175ef13f4215
1456-
React-RCTAnimation: 1f6948befc38688ecd5e78b7afd7d356aafa79b3
1457-
React-RCTAppDelegate: 9b0ecae938c894f4678a5e4726c03a06e92b0d93
1458-
React-RCTBlob: afaf18b4618c4d71095dfae9fca7c548dbcf0da0
1459-
React-RCTFabric: 0e96635634399a9ccf6c3c7fb18d5bac8e2561d5
1460-
React-RCTImage: 280f6f62a88f13253013ab5709e7bc60259cc081
1461-
React-RCTLinking: 9757d922aaa9aea2baa6e6178a8b1f08c1a85add
1462-
React-RCTNetwork: 92e96ad358d83b5a809e6222987c77106f44691e
1463-
React-RCTPushNotification: 36ec0c6d3ab1195665c49c0cfd689864401cc111
1464-
React-RCTSettings: 758a24aefbee012d903ca4f80532e95edfe2b516
1465-
React-RCTTest: a30b88c8910a259ef769af7654b1812668019b22
1466-
React-RCTText: ff85a26056ca9a34198934774e0f75ac2305c2c0
1467-
React-RCTVibration: 5086b14f98c2255e71cc6a2213b6f67338dcdff4
1468-
React-rendererdebug: 6e0021971efb40a76f807b913fdba6ec3ecabbd0
1469-
React-rncore: 27b4d75d116e9ae44292dc26aecff5bbad9e6996
1470-
React-RuntimeApple: c18cc85bf03a322efd2a76fd48f4c693d6901e67
1471-
React-RuntimeCore: 631803674e2884b5d866aacac96850191a081e1a
1472-
React-runtimeexecutor: a6b1c771b522e49e6906c5354b0e8859a64e7b3e
1473-
React-RuntimeHermes: 1473abdead583d8ab788ebd31de9c8e81e19d0fc
1474-
React-runtimescheduler: 1b905cb65942a3bfdff3f003c9c778b6b46afca6
1475-
React-utils: a5c7207b3bd558fdbfc553ea7a7731fbfc7f3552
1476-
ReactCommon: 2c87b20987de3a37d3993e4c1cab34fb97c28899
1477-
ReactCommon-Samples: e95d8d284b23ed4eda37498eaa460b6468c24699
1437+
React-Core: eb5002d75c263aaa042b97853effd3b6e2f8668c
1438+
React-CoreModules: 1eb22960e980f9e0b80542da464c5935260fd180
1439+
React-cxxreact: eb5eb55bffe0ccff4cbf192a04c978e37f137e8f
1440+
React-debug: 1d5a869d405ca2410bfc95c7fe340220331696ef
1441+
React-Fabric: 555fc115322e9b37b8cc1d4ac0ab8d4a87718077
1442+
React-FabricImage: 657d05951f1a512496713d7c2d534d347915fe3b
1443+
React-graphics: 989577b97b4d5e8f3cd3ff86b275eb7e4c7ff657
1444+
React-hermes: 0003c9f0f623ed87224f4415c567f90f0d15737f
1445+
React-ImageManager: ec80ccfd373893be8c347a23a693438b41a86e2a
1446+
React-jserrorhandler: c4126c1c2fb42540cf64fdc80917214a0c6ca905
1447+
React-jsi: 81558ed18c4e91824280a3298d75d598ef4cf3fa
1448+
React-jsiexecutor: 139ad70390e61c6b00779d82c7d5f490cd3eb632
1449+
React-jsinspector: bd27899ffc61660559bfbc8872e8d8de05b2612d
1450+
React-jsitracing: 9639d0659449fa9a71f31e28d7dde349bcec3394
1451+
React-logger: 142bc8479d40940294428f652fb016b809335121
1452+
React-Mapbuffer: 2762ea21725665466ea54f09848886f5ba7e97f7
1453+
React-nativeconfig: f984aee5151a69d520ea830756b33c62acc5c269
1454+
React-NativeModulesApple: 5fd38cf3bd4aca4adc9522a7a53681001f98f29d
1455+
React-perflogger: b19adeb816c255a04dff9528cf3f6bf209188d17
1456+
React-RCTActionSheet: c07c3924b6a94602f40effc130b776faa8b6bab1
1457+
React-RCTAnimation: 51f5a6be1479336b26d0cb282bd0e8f1feabf593
1458+
React-RCTAppDelegate: 3cac28ed63e10086624a2d965ce2c3359bbe04b0
1459+
React-RCTBlob: 0d6f17d4cacc18b6872b06b232186b176d4a8a18
1460+
React-RCTFabric: 8b955856519621a30a8425ac6c594abb66788839
1461+
React-RCTImage: c69ac72c257475c7860602ac11beaabd7862b99c
1462+
React-RCTLinking: c3f99ac575655569f5bc108ff13b816dcdf1dbfd
1463+
React-RCTNetwork: 39405b5687d5b16fdcc6466713930e71f8389cde
1464+
React-RCTPushNotification: 8b6b936f8e07096db581a446d4f9844ff8b35925
1465+
React-RCTSettings: 96dad99a283d67c573b8ba3709725901e8ac3108
1466+
React-RCTSwiftExtensions: b372ca0daf79796645c691841b470ad5d37bba64
1467+
React-RCTTest: 11be8ba66b91bc914d31f2b7c9abd0c39d47a3d7
1468+
React-RCTText: 8ca2156c782dc33ceb3fa80ce8c20cfcccbcc9d1
1469+
React-RCTVibration: 284a9575d09b5c5517d5d5b8b86d4e2d3c324b5e
1470+
React-rendererdebug: d664023e12af482bb3911ce547c522ddbbf01ac5
1471+
React-rncore: 5917d667ddd77e1938a9d1dabf5c503e427f9ec9
1472+
React-RuntimeApple: 31c6a97b53e53ea3e0d071ca45471b9152d22dc3
1473+
React-RuntimeCore: 25febc097f3f7d4043562fcf5c7bf406758ad1ce
1474+
React-runtimeexecutor: b66459278d0c6564b5d877107e0bb3ac953a8221
1475+
React-RuntimeHermes: 3f46517238fed32a04b36c6bc41a4ac8508baf6e
1476+
React-runtimescheduler: 04123aa94f0fa33398b9e58cd4345cac230eaee7
1477+
React-utils: bdfeb70a54b7b73533de6c8b679143f75c34c86a
1478+
ReactCommon: 8f6a345ebd9558892a83e1be6b83bdad4fd99078
1479+
ReactCommon-Samples: 090dcc2659d35c5577955d89efac618595a72e61
14781480
ScreenshotManager: a5f596498de38f3cf3377df636ca67355503f190
14791481
SocketRocket: 0ba3e799f983d2dfa878777017659ef6c866e5c6
1480-
Yoga: e4691eb7881cae15f847654cf06b0f7962707af0
1482+
Yoga: ac56a983bdf421a579c197143f79aa568f1c74a1
14811483

14821484
PODFILE CHECKSUM: 7e999b8158f1055609ef4491bc35f1ad658fdd6c
14831485

packages/rn-tester/RNTester-visionOS/App.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ struct RNTesterApp: App {
77
@UIApplicationDelegateAdaptor var delegate: AppDelegate
88

99
var body: some Scene {
10-
WindowGroup {
11-
RCTRootViewRepresentable(moduleName: "RNTesterApp", initialProps: nil)
12-
}
10+
RCTMainWindow(moduleName: "RNTesterApp")
1311
}
1412
}

packages/rn-tester/RNTester-visionOS/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ class AppDelegate: RCTAppDelegate {
88
}
99

1010
override func bundleURL() -> URL? {
11-
RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "js/RNTesterApp.ios")
11+
RCTBundleURLProvider.sharedSettings()?.jsBundleURL(forBundleRoot: "js/RNTesterApp.ios")
1212
}
1313
}

0 commit comments

Comments
 (0)