From 58a1515d5359f17af794614c91ee2369c2f37236 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Oskar=20Kwas=CC=81niewski?=
Date: Tue, 12 Sep 2023 15:27:43 +0200
Subject: [PATCH 01/15] feat: add visionos support
---
.../Libraries/AppDelegate/RCTAppDelegate.mm | 26 +
.../NativeAnimation/RCTAnimationUtils.h | 1 +
.../RCTPushNotificationManager.h | 2 +
.../RCTPushNotificationManager.mm | 20 +-
.../Libraries/Text/Text/RCTTextView.mm | 2 +-
.../Text/TextInput/RCTBaseTextInputView.mm | 4 +
packages/react-native/React-Core.podspec | 2 +-
packages/react-native/React/Base/RCTConvert.m | 5 +
.../react-native/React/Base/RCTKeyCommands.m | 5 +-
packages/react-native/React/Base/RCTUtils.h | 8 +
packages/react-native/React/Base/RCTUtils.m | 29 +-
.../React/CoreModules/RCTAlertController.mm | 4 +-
.../React/CoreModules/RCTDevLoadingView.mm | 20 +-
.../React/CoreModules/RCTDeviceInfo.mm | 20 +-
.../React/CoreModules/RCTPerfMonitor.mm | 7 +-
.../React/CoreModules/RCTRedBox.mm | 7 +-
.../React/CoreModules/RCTStatusBarManager.mm | 28 +-
.../CoreModules/React-CoreModules.podspec | 2 +-
.../RCTInputAccessoryComponentView.mm | 4 +
.../Modal/RCTFabricModalHostViewController.mm | 13 +
.../ScrollView/RCTScrollViewComponentView.mm | 4 +
.../Text/RCTParagraphComponentView.mm | 2 +-
.../TextInput/RCTTextInputComponentView.mm | 2 +
.../TextInput/RCTTextInputUtils.mm | 2 +
.../View/RCTViewComponentView.mm | 4 +
.../React/Fabric/RCTSurfacePointerHandler.mm | 7 +-
.../React/Fabric/RCTSurfaceTouchHandler.mm | 2 +
.../react-native/React/Modules/RCTUIManager.m | 7 +-
.../react-native/React/UIUtils/RCTUIUtils.m | 15 +-
.../React/Views/RCTModalHostView.m | 5 +-
.../React/Views/RCTModalHostViewController.m | 9 +-
.../react-native/React/Views/RCTViewManager.h | 19 +
.../react-native/React/Views/RCTViewManager.m | 10 +-
.../React/Views/RCTWrapperViewController.m | 3 +
.../React/Views/ScrollView/RCTScrollView.m | 4 +
.../Views/ScrollView/RCTScrollViewManager.h | 6 +
.../Views/ScrollView/RCTScrollViewManager.m | 6 +-
.../ios/ReactCommon/RCTSampleTurboModule.mm | 11 +-
.../scripts/cocoapods/jsengine.rb | 2 +-
.../react-native/scripts/react_native_pods.rb | 10 +-
.../sdks/hermes-engine/hermes-engine.podspec | 4 +-
.../third-party-podspecs/SocketRocket.podspec | 24 +
.../third-party-podspecs/YogaKit.podspec | 39 ++
.../third-party-podspecs/libevent.podspec | 560 ++++++++++++++++++
packages/rn-tester/Gemfile | 3 +-
packages/rn-tester/Podfile | 8 +-
packages/rn-tester/Podfile.lock | 336 ++++-------
packages/rn-tester/RNTester/AppDelegate.mm | 4 +-
.../RNTesterPods.xcodeproj/project.pbxproj | 72 +--
49 files changed, 1069 insertions(+), 320 deletions(-)
create mode 100644 packages/react-native/third-party-podspecs/SocketRocket.podspec
create mode 100644 packages/react-native/third-party-podspecs/YogaKit.podspec
create mode 100644 packages/react-native/third-party-podspecs/libevent.podspec
diff --git a/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm b/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm
index 82e1911fe12246..73da7c83346cdb 100644
--- a/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm
+++ b/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm
@@ -12,6 +12,7 @@
#import
#import "RCTAppSetupUtils.h"
#import "RCTLegacyInteropComponents.h"
+#import
#if RCT_NEW_ARCH_ENABLED
#if RN_DISABLE_OSS_PLUGIN_HEADER
@@ -53,6 +54,21 @@ @interface RCTAppDelegate () <
#endif
+#if TARGET_OS_VISION
+@interface GlassViewController : UIViewController
+
+@end
+
+@implementation GlassViewController
+
+- (UIContainerBackgroundStyle)preferredContainerBackgroundStyle {
+ return UIContainerBackgroundStyleGlass;
+}
+
+@end
+#endif
+
+
static NSDictionary *updateInitialProps(NSDictionary *initialProps, BOOL isFabricEnabled)
{
#ifdef RCT_NEW_ARCH_ENABLED
@@ -139,7 +155,13 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
rootView = [self createRootViewWithBridge:self.bridge moduleName:self.moduleName initProps:initProps];
}
+
+#if TARGET_OS_VISION
+ self.window = [[UIWindow alloc] initWithFrame:RCTForegroundWindow().bounds];
+#else
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
+#endif
+
UIViewController *rootViewController = [self createRootViewController];
[self setRootView:rootView toRootViewController:rootViewController];
self.window.rootViewController = rootViewController;
@@ -183,7 +205,11 @@ - (UIView *)createRootViewWithBridge:(RCTBridge *)bridge
- (UIViewController *)createRootViewController
{
+#if TARGET_OS_VISION
+ return [GlassViewController new];
+#else
return [UIViewController new];
+#endif
}
- (void)setRootView:(UIView *)rootView toRootViewController:(UIViewController *)rootViewController
diff --git a/packages/react-native/Libraries/NativeAnimation/RCTAnimationUtils.h b/packages/react-native/Libraries/NativeAnimation/RCTAnimationUtils.h
index 77152f4a5773de..562913126e9442 100644
--- a/packages/react-native/Libraries/NativeAnimation/RCTAnimationUtils.h
+++ b/packages/react-native/Libraries/NativeAnimation/RCTAnimationUtils.h
@@ -7,6 +7,7 @@
#import
#import
+#import
#import
diff --git a/packages/react-native/Libraries/PushNotificationIOS/RCTPushNotificationManager.h b/packages/react-native/Libraries/PushNotificationIOS/RCTPushNotificationManager.h
index e49f6ed9d54257..835a3e469bf078 100644
--- a/packages/react-native/Libraries/PushNotificationIOS/RCTPushNotificationManager.h
+++ b/packages/react-native/Libraries/PushNotificationIOS/RCTPushNotificationManager.h
@@ -18,7 +18,9 @@ typedef void (^RCTRemoteNotificationCallback)(UIBackgroundFetchResult result);
+ (void)didReceiveRemoteNotification:(NSDictionary *)notification;
+ (void)didReceiveRemoteNotification:(NSDictionary *)notification
fetchCompletionHandler:(RCTRemoteNotificationCallback)completionHandler;
+#if !TARGET_OS_VISION
+ (void)didReceiveLocalNotification:(UILocalNotification *)notification;
+#endif
+ (void)didFailToRegisterForRemoteNotificationsWithError:(NSError *)error;
#endif
diff --git a/packages/react-native/Libraries/PushNotificationIOS/RCTPushNotificationManager.mm b/packages/react-native/Libraries/PushNotificationIOS/RCTPushNotificationManager.mm
index d0c38c91e5ac5c..ebb9558b06b186 100644
--- a/packages/react-native/Libraries/PushNotificationIOS/RCTPushNotificationManager.mm
+++ b/packages/react-native/Libraries/PushNotificationIOS/RCTPushNotificationManager.mm
@@ -96,7 +96,7 @@ @implementation RCTConvert (UIBackgroundFetchResult)
@end
#else
-@interface RCTPushNotificationManager ()
+@interface RCTPushNotificationManager ()
@end
#endif // TARGET_OS_UIKITFORMAC
@@ -104,6 +104,7 @@ @implementation RCTPushNotificationManager
#if !TARGET_OS_UIKITFORMAC
+#if !TARGET_OS_VISION
/** DEPRECATED. UILocalNotification was deprecated in iOS 10. Please don't add new callsites. */
static NSDictionary *RCTFormatLocalNotification(UILocalNotification *notification)
{
@@ -123,6 +124,7 @@ @implementation RCTPushNotificationManager
formattedLocalNotification[@"remote"] = @NO;
return formattedLocalNotification;
}
+#endif
/** For delivered notifications */
static NSDictionary *RCTFormatUNNotification(UNNotification *notification)
@@ -258,12 +260,14 @@ + (void)didReceiveRemoteNotification:(NSDictionary *)notification
userInfo:userInfo];
}
+#if !TARGET_OS_VISION
+ (void)didReceiveLocalNotification:(UILocalNotification *)notification
{
[[NSNotificationCenter defaultCenter] postNotificationName:kLocalNotificationReceived
object:self
userInfo:RCTFormatLocalNotification(notification)];
}
+#endif
- (void)handleLocalNotificationReceived:(NSNotification *)notification
{
@@ -519,15 +523,21 @@ - (void)handleRemoteNotificationRegistrationError:(NSNotification *)notification
NSMutableDictionary *initialNotification =
[self.bridge.launchOptions[UIApplicationLaunchOptionsRemoteNotificationKey] mutableCopy];
- UILocalNotification *initialLocalNotification =
+#if !TARGET_OS_VISION
+ UILocalNotification *initialLocalNotification =
self.bridge.launchOptions[UIApplicationLaunchOptionsLocalNotificationKey];
-
+#endif
+
if (initialNotification) {
initialNotification[@"remote"] = @YES;
resolve(initialNotification);
- } else if (initialLocalNotification) {
+ }
+#if !TARGET_OS_VISION
+ else if (initialLocalNotification) {
resolve(RCTFormatLocalNotification(initialLocalNotification));
- } else {
+ }
+#endif
+ else {
resolve((id)kCFNull);
}
}
diff --git a/packages/react-native/Libraries/Text/Text/RCTTextView.mm b/packages/react-native/Libraries/Text/Text/RCTTextView.mm
index 3f64e313ab58f1..5e5362bc6e76d9 100644
--- a/packages/react-native/Libraries/Text/Text/RCTTextView.mm
+++ b/packages/react-native/Libraries/Text/Text/RCTTextView.mm
@@ -225,7 +225,7 @@ - (void)disableContextMenu
- (void)handleLongPress:(UILongPressGestureRecognizer *)gesture
{
// TODO: Adopt showMenuFromRect (necessary for UIKitForMac)
-#if !TARGET_OS_UIKITFORMAC
+#if !TARGET_OS_UIKITFORMAC && !TARGET_OS_VISION
UIMenuController *menuController = [UIMenuController sharedMenuController];
if (menuController.isMenuVisible) {
diff --git a/packages/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.mm b/packages/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.mm
index b0d71dcd3508bb..c6f15d8679bfc2 100644
--- a/packages/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.mm
+++ b/packages/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.mm
@@ -642,6 +642,7 @@ - (void)didSetProps:(NSArray *)changedProps
- (void)setCustomInputAccessoryViewWithNativeID:(NSString *)nativeID
{
+#if !TARGET_OS_VISION
__weak RCTBaseTextInputView *weakSelf = self;
[_bridge.uiManager rootViewForReactTag:self.reactTag
withCompletion:^(UIView *rootView) {
@@ -656,10 +657,12 @@ - (void)setCustomInputAccessoryViewWithNativeID:(NSString *)nativeID
}
}
}];
+#endif
}
- (void)setDefaultInputAccessoryView
{
+#if !TARGET_OS_VISION
UIView *textInputView = self.backedTextInputView;
UIKeyboardType keyboardType = textInputView.keyboardType;
@@ -691,6 +694,7 @@ - (void)setDefaultInputAccessoryView
textInputView.inputAccessoryView = nil;
}
[self reloadInputViewsIfNecessary];
+#endif
}
- (void)reloadInputViewsIfNecessary
diff --git a/packages/react-native/React-Core.podspec b/packages/react-native/React-Core.podspec
index 87bb8fa15a2c07..ec058c5c069aa2 100644
--- a/packages/react-native/React-Core.podspec
+++ b/packages/react-native/React-Core.podspec
@@ -18,7 +18,7 @@ end
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
folly_version = '2023.08.07.00'
-socket_rocket_version = '0.7.0'
+socket_rocket_version = '0.7.0.1'
boost_compiler_flags = '-Wno-documentation'
use_hermes = ENV['USE_HERMES'] == nil || ENV['USE_HERMES'] == '1'
diff --git a/packages/react-native/React/Base/RCTConvert.m b/packages/react-native/React/Base/RCTConvert.m
index 55f42ebf49e9e3..3706be4b89e323 100644
--- a/packages/react-native/React/Base/RCTConvert.m
+++ b/packages/react-native/React/Base/RCTConvert.m
@@ -538,8 +538,13 @@ + (UIKeyboardType)UIKeyboardType:(id)json RCT_DYNAMIC
(@{
@"default" : @(UIBarStyleDefault),
@"black" : @(UIBarStyleBlack),
+#if TARGET_OS_VISION
+ @"blackOpaque" : @(UIBarStyleBlack),
+ @"blackTranslucent" : @(UIBarStyleBlack),
+#else
@"blackOpaque" : @(UIBarStyleBlackOpaque),
@"blackTranslucent" : @(UIBarStyleBlackTranslucent),
+#endif
}),
UIBarStyleDefault,
integerValue)
diff --git a/packages/react-native/React/Base/RCTKeyCommands.m b/packages/react-native/React/Base/RCTKeyCommands.m
index 1ceaf6ec0dceb1..2643e368afc819 100644
--- a/packages/react-native/React/Base/RCTKeyCommands.m
+++ b/packages/react-native/React/Base/RCTKeyCommands.m
@@ -127,8 +127,11 @@ - (void)handleKeyUIEventSwizzle:(UIEvent *)event
if ([event respondsToSelector:@selector(_isKeyDown)]) {
isKeyDown = [event _isKeyDown];
}
-
+#if !TARGET_OS_VISION
BOOL interactionEnabled = !RCTSharedApplication().isIgnoringInteractionEvents;
+#else
+ BOOL interactionEnabled = true;
+#endif
BOOL hasFirstResponder = NO;
if (isKeyDown && modifiedInput.length > 0 && interactionEnabled) {
UIResponder *firstResponder = nil;
diff --git a/packages/react-native/React/Base/RCTUtils.h b/packages/react-native/React/Base/RCTUtils.h
index dc218c47f199fc..2260a8ea4f8808 100644
--- a/packages/react-native/React/Base/RCTUtils.h
+++ b/packages/react-native/React/Base/RCTUtils.h
@@ -91,6 +91,14 @@ RCT_EXTERN UIApplication *__nullable RCTSharedApplication(void);
// or view controller
RCT_EXTERN UIWindow *__nullable RCTKeyWindow(void);
+#if TARGET_OS_VISION
+// Returns the current active UIWindow based on UIWindowScene
+RCT_EXTERN UIWindow *__nullable RCTForegroundWindow(void);
+
+// Returns UIStatusBarManager to get it's configuration info.
+RCT_EXTERN UIStatusBarManager *__nullable RCTUIStatusBarManager(void);
+#endif
+
// Returns the presented view controller, useful if you need
// e.g. to present a modal view controller or alert over it
RCT_EXTERN UIViewController *__nullable RCTPresentedViewController(void);
diff --git a/packages/react-native/React/Base/RCTUtils.m b/packages/react-native/React/Base/RCTUtils.m
index 01bd5cde9fc3df..49fe1d9985a0f8 100644
--- a/packages/react-native/React/Base/RCTUtils.m
+++ b/packages/react-native/React/Base/RCTUtils.m
@@ -301,18 +301,23 @@ static void RCTUnsafeExecuteOnMainQueueOnceSync(dispatch_once_t *onceToken, disp
void RCTComputeScreenScale(void)
{
+#if !TARGET_OS_VISION
dispatch_once(&onceTokenScreenScale, ^{
screenScale = [UIScreen mainScreen].scale;
});
+#endif
}
CGFloat RCTScreenScale(void)
{
+#if !TARGET_OS_VISION
RCTUnsafeExecuteOnMainQueueOnceSync(&onceTokenScreenScale, ^{
screenScale = [UIScreen mainScreen].scale;
});
-
return screenScale;
+#endif
+
+ return 1;
}
CGFloat RCTFontSizeMultiplier(void)
@@ -347,9 +352,14 @@ CGSize RCTScreenSize(void)
static CGSize size;
static dispatch_once_t onceToken;
+
dispatch_once(&onceToken, ^{
RCTUnsafeExecuteOnMainQueueSync(^{
+#if TARGET_OS_VISION
+ size = RCTKeyWindow().bounds.size;
+#else
size = [UIScreen mainScreen].bounds.size;
+#endif
});
});
@@ -557,6 +567,23 @@ BOOL RCTRunningInAppExtension(void)
return nil;
}
+#if TARGET_OS_VISION
+UIWindow *__nullable RCTForegroundWindow(void)
+{
+ // React native only supports single scene apps.
+ NSSet *scenes = RCTSharedApplication().connectedScenes;
+ UIWindowScene *firstScene = [scenes anyObject];
+ return [[UIWindow alloc] initWithWindowScene:firstScene];
+}
+
+UIStatusBarManager *__nullable RCTUIStatusBarManager(void) {
+ NSSet *connectedScenes = RCTSharedApplication().connectedScenes;
+ UIWindowScene *windowScene = [connectedScenes anyObject];
+ return windowScene.statusBarManager;
+}
+
+#endif
+
UIViewController *__nullable RCTPresentedViewController(void)
{
if ([RCTUtilsUIOverride hasPresentedViewController]) {
diff --git a/packages/react-native/React/CoreModules/RCTAlertController.mm b/packages/react-native/React/CoreModules/RCTAlertController.mm
index cd01ef56d72684..2d9d3dcef83a34 100644
--- a/packages/react-native/React/CoreModules/RCTAlertController.mm
+++ b/packages/react-native/React/CoreModules/RCTAlertController.mm
@@ -21,7 +21,8 @@ - (UIWindow *)alertWindow
{
if (_alertWindow == nil) {
_alertWindow = [self getUIWindowFromScene];
-
+
+#if !TARGET_OS_VISION
if (_alertWindow == nil) {
UIWindow *keyWindow = RCTSharedApplication().keyWindow;
if (keyWindow) {
@@ -31,6 +32,7 @@ - (UIWindow *)alertWindow
NSLog(@"Unable to create alert window: keyWindow is nil");
}
}
+#endif
if (_alertWindow) {
_alertWindow.rootViewController = [UIViewController new];
diff --git a/packages/react-native/React/CoreModules/RCTDevLoadingView.mm b/packages/react-native/React/CoreModules/RCTDevLoadingView.mm
index ab9c945790e358..92edb7ed0d5ce9 100644
--- a/packages/react-native/React/CoreModules/RCTDevLoadingView.mm
+++ b/packages/react-native/React/CoreModules/RCTDevLoadingView.mm
@@ -114,13 +114,30 @@ - (void)showMessage:(NSString *)message color:(UIColor *)color backgroundColor:(
dispatch_async(dispatch_get_main_queue(), ^{
self->_showDate = [NSDate date];
if (!self->_window && !RCTRunningInTestEnvironment()) {
+
+#if TARGET_OS_VISION
+ UIWindow *window = RCTKeyWindow();
+ CGSize screenSize = window.bounds.size;
+
+ self->_window =
+ [[UIWindow alloc] initWithFrame:CGRectMake(0, 0, screenSize.width, window.safeAreaInsets.top + 30)];
+ self->_label =
+ [[UILabel alloc] initWithFrame:CGRectMake(0, window.safeAreaInsets.top + 5, screenSize.width, 20)];
+#else
CGSize screenSize = [UIScreen mainScreen].bounds.size;
-
UIWindow *window = RCTSharedApplication().keyWindow;
+
self->_window =
[[UIWindow alloc] initWithFrame:CGRectMake(0, 0, screenSize.width, window.safeAreaInsets.top + 10)];
self->_label =
[[UILabel alloc] initWithFrame:CGRectMake(0, window.safeAreaInsets.top - 10, screenSize.width, 20)];
+#endif
+
+
+ self->_window =
+ [[UIWindow alloc] initWithFrame:CGRectMake(0, 0, screenSize.width, window.safeAreaInsets.top + 30)];
+ self->_label =
+ [[UILabel alloc] initWithFrame:CGRectMake(0, window.safeAreaInsets.top + 5, screenSize.width, 20)];
[self->_window addSubview:self->_label];
self->_window.windowLevel = UIWindowLevelStatusBar + 1;
@@ -142,6 +159,7 @@ - (void)showMessage:(NSString *)message color:(UIColor *)color backgroundColor:(
});
[self hideBannerAfter:15.0];
+
}
RCT_EXPORT_METHOD(showMessage
diff --git a/packages/react-native/React/CoreModules/RCTDeviceInfo.mm b/packages/react-native/React/CoreModules/RCTDeviceInfo.mm
index 38f8118c733791..4bfaa4aae05c9c 100644
--- a/packages/react-native/React/CoreModules/RCTDeviceInfo.mm
+++ b/packages/react-native/React/CoreModules/RCTDeviceInfo.mm
@@ -51,6 +51,8 @@ - (void)initialize
selector:@selector(didReceiveNewContentSizeMultiplier)
name:RCTAccessibilityManagerDidUpdateMultiplierNotification
object:[_moduleRegistry moduleForName:"AccessibilityManager"]];
+
+#if !TARGET_OS_VISION
_currentInterfaceOrientation = [RCTSharedApplication() statusBarOrientation];
@@ -58,6 +60,7 @@ - (void)initialize
selector:@selector(interfaceOrientationDidChange)
name:UIApplicationDidChangeStatusBarOrientationNotification
object:nil];
+#endif
_currentInterfaceDimensions = [self _exportedDimensions];
@@ -85,15 +88,16 @@ - (void)invalidate
static BOOL RCTIsIPhoneNotched()
{
static BOOL isIPhoneNotched = NO;
- static dispatch_once_t onceToken;
+#if !TARGET_OS_VISION
+ static dispatch_once_t onceToken;
- dispatch_once(&onceToken, ^{
- RCTAssertMainQueue();
-
- // 20pt is the top safeArea value in non-notched devices
- isIPhoneNotched = RCTSharedApplication().keyWindow.safeAreaInsets.top > 20;
- });
+ dispatch_once(&onceToken, ^{
+ RCTAssertMainQueue();
+ // 20pt is the top safeArea value in non-notched devices
+ isIPhoneNotched = RCTSharedApplication().keyWindow.safeAreaInsets.top > 20;
+ });
+#endif
return isIPhoneNotched;
}
@@ -176,6 +180,7 @@ - (void)interfaceOrientationDidChange
- (void)_interfaceOrientationDidChange
{
+#if !TARGET_OS_VISION
UIApplication *application = RCTSharedApplication();
UIInterfaceOrientation nextOrientation = [application statusBarOrientation];
@@ -205,6 +210,7 @@ - (void)_interfaceOrientationDidChange
_isFullscreen = isRunningInFullScreen;
#pragma clang diagnostic pop
}
+#endif
}
- (void)interfaceFrameDidChange
diff --git a/packages/react-native/React/CoreModules/RCTPerfMonitor.mm b/packages/react-native/React/CoreModules/RCTPerfMonitor.mm
index a089054feb6fb0..d588c594bea0cb 100644
--- a/packages/react-native/React/CoreModules/RCTPerfMonitor.mm
+++ b/packages/react-native/React/CoreModules/RCTPerfMonitor.mm
@@ -183,7 +183,12 @@ - (UIPanGestureRecognizer *)gestureRecognizer
- (UIView *)container
{
if (!_container) {
- CGSize statusBarSize = RCTSharedApplication().statusBarFrame.size;
+#if TARGET_OS_VISION
+ CGSize statusBarSize = RCTUIStatusBarManager().statusBarFrame.size;
+#else
+ CGSize statusBarSize = RCTSharedApplication().statusBarFrame.size;
+#endif
+
CGFloat statusBarHeight = statusBarSize.height;
_container = [[UIView alloc] initWithFrame:CGRectMake(10, statusBarHeight, 180, RCTPerfMonitorBarHeight)];
_container.layer.borderWidth = 2;
diff --git a/packages/react-native/React/CoreModules/RCTRedBox.mm b/packages/react-native/React/CoreModules/RCTRedBox.mm
index dc58594a80702c..8bd77dfbbacd0a 100644
--- a/packages/react-native/React/CoreModules/RCTRedBox.mm
+++ b/packages/react-native/React/CoreModules/RCTRedBox.mm
@@ -594,7 +594,12 @@ - (void)showErrorMessage:(NSString *)message
#pragma clang diagnostic pop
if (!self->_window) {
- self->_window = [[RCTRedBoxWindow alloc] initWithFrame:[UIScreen mainScreen].bounds
+#if TARGET_OS_VISION
+ CGRect frame = RCTForegroundWindow().bounds;
+#else
+ CGRect frame = [UIScreen mainScreen].bounds;
+#endif
+ self->_window = [[RCTRedBoxWindow alloc] initWithFrame:frame
customButtonTitles:self->_customButtonTitles
customButtonHandlers:self->_customButtonHandlers];
self->_window.actionDelegate = self;
diff --git a/packages/react-native/React/CoreModules/RCTStatusBarManager.mm b/packages/react-native/React/CoreModules/RCTStatusBarManager.mm
index 29309135309eac..af2154d0dea098 100644
--- a/packages/react-native/React/CoreModules/RCTStatusBarManager.mm
+++ b/packages/react-native/React/CoreModules/RCTStatusBarManager.mm
@@ -76,6 +76,7 @@ + (BOOL)requiresMainQueueSetup
- (void)startObserving
{
+#if !TARGET_OS_VISION
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
[nc addObserver:self
selector:@selector(applicationDidChangeStatusBarFrame:)
@@ -85,6 +86,7 @@ - (void)startObserving
selector:@selector(applicationWillChangeStatusBarFrame:)
name:UIApplicationWillChangeStatusBarFrameNotification
object:nil];
+#endif
}
- (void)stopObserving
@@ -94,6 +96,7 @@ - (void)stopObserving
- (void)emitEvent:(NSString *)eventName forNotification:(NSNotification *)notification
{
+#if !TARGET_OS_VISION
CGRect frame = [notification.userInfo[UIApplicationStatusBarFrameUserInfoKey] CGRectValue];
NSDictionary *event = @{
@"frame" : @{
@@ -104,6 +107,7 @@ - (void)emitEvent:(NSString *)eventName forNotification:(NSNotification *)notifi
},
};
[self sendEventWithName:eventName body:event];
+#endif
}
- (void)applicationDidChangeStatusBarFrame:(NSNotification *)notification
@@ -118,13 +122,20 @@ - (void)applicationWillChangeStatusBarFrame:(NSNotification *)notification
RCT_EXPORT_METHOD(getHeight : (RCTResponseSenderBlock)callback)
{
+#if !TARGET_OS_VISION
callback(@[ @{
@"height" : @(RCTSharedApplication().statusBarFrame.size.height),
} ]);
+#else
+ callback(@[ @{
+ @"height" : @(RCTUIStatusBarManager().statusBarFrame.size),
+ } ]);
+#endif
}
RCT_EXPORT_METHOD(setStyle : (NSString *)style animated : (BOOL)animated)
{
+#if !TARGET_OS_VISION
dispatch_async(dispatch_get_main_queue(), ^{
UIStatusBarStyle statusBarStyle = [RCTConvert UIStatusBarStyle:style];
if (RCTViewControllerBasedStatusBarAppearance()) {
@@ -133,14 +144,16 @@ - (void)applicationWillChangeStatusBarFrame:(NSNotification *)notification
} else {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- [RCTSharedApplication() setStatusBarStyle:statusBarStyle animated:animated];
- }
+ [RCTSharedApplication() setStatusBarStyle:statusBarStyle animated:animated];
+ }
#pragma clang diagnostic pop
});
+#endif
}
RCT_EXPORT_METHOD(setHidden : (BOOL)hidden withAnimation : (NSString *)withAnimation)
{
+#if !TARGET_OS_VISION
dispatch_async(dispatch_get_main_queue(), ^{
UIStatusBarAnimation animation = [RCTConvert UIStatusBarAnimation:withAnimation];
if (RCTViewControllerBasedStatusBarAppearance()) {
@@ -149,17 +162,18 @@ - (void)applicationWillChangeStatusBarFrame:(NSNotification *)notification
} else {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- [RCTSharedApplication() setStatusBarHidden:hidden withAnimation:animation];
+ [RCTSharedApplication() setStatusBarHidden:hidden withAnimation:animation];
#pragma clang diagnostic pop
}
});
+#endif
}
RCT_EXPORT_METHOD(setNetworkActivityIndicatorVisible : (BOOL)visible)
{
- dispatch_async(dispatch_get_main_queue(), ^{
+#if !TARGET_OS_VISION
RCTSharedApplication().networkActivityIndicatorVisible = visible;
- });
+#endif
}
- (facebook::react::ModuleConstants)getConstants
@@ -167,7 +181,11 @@ - (void)applicationWillChangeStatusBarFrame:(NSNotification *)notification
__block facebook::react::ModuleConstants constants;
RCTUnsafeExecuteOnMainQueueSync(^{
constants = facebook::react::typedConstants({
+#if TARGET_OS_VISION
+ .HEIGHT = RCTUIStatusBarManager().statusBarFrame.size.height,
+#else
.HEIGHT = RCTSharedApplication().statusBarFrame.size.height,
+#endif
.DEFAULT_BACKGROUND_COLOR = std::nullopt,
});
});
diff --git a/packages/react-native/React/CoreModules/React-CoreModules.podspec b/packages/react-native/React/CoreModules/React-CoreModules.podspec
index 69ef5dac1a959f..19a7c1c871b7e2 100644
--- a/packages/react-native/React/CoreModules/React-CoreModules.podspec
+++ b/packages/react-native/React/CoreModules/React-CoreModules.podspec
@@ -18,7 +18,7 @@ end
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
folly_version = '2023.08.07.00'
-socket_rocket_version = '0.7.0'
+socket_rocket_version = '0.7.0.1'
header_search_paths = [
"\"$(PODS_TARGET_SRCROOT)/React/CoreModules\"",
diff --git a/packages/react-native/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryComponentView.mm b/packages/react-native/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryComponentView.mm
index 454c3ff1ac279d..957c610b89bbfd 100644
--- a/packages/react-native/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryComponentView.mm
+++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryComponentView.mm
@@ -67,7 +67,9 @@ - (void)didMoveToWindow
if (self.window && !_textInput) {
if (self.nativeId) {
_textInput = RCTFindTextInputWithNativeId(self.window, self.nativeId);
+#if !TARGET_OS_VISION
_textInput.inputAccessoryView = _contentView;
+#endif
} else {
_textInput = RCTFindTextInputWithNativeId(_contentView, nil);
}
@@ -83,10 +85,12 @@ - (BOOL)canBecomeFirstResponder
return true;
}
+#if !TARGET_OS_VISION
- (UIView *)inputAccessoryView
{
return _contentView;
}
+#endif
#pragma mark - RCTComponentViewProtocol
diff --git a/packages/react-native/React/Fabric/Mounting/ComponentViews/Modal/RCTFabricModalHostViewController.mm b/packages/react-native/React/Fabric/Mounting/ComponentViews/Modal/RCTFabricModalHostViewController.mm
index db5b92fb8f48e4..f0881fd9541628 100644
--- a/packages/react-native/React/Fabric/Mounting/ComponentViews/Modal/RCTFabricModalHostViewController.mm
+++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/Modal/RCTFabricModalHostViewController.mm
@@ -44,7 +44,11 @@ - (void)loadView
- (UIStatusBarStyle)preferredStatusBarStyle
{
+#if !TARGET_OS_VISION
return [RCTSharedApplication() statusBarStyle];
+#else
+ return UIStatusBarStyleDefault;
+#endif
}
- (void)viewDidDisappear:(BOOL)animated
@@ -55,14 +59,23 @@ - (void)viewDidDisappear:(BOOL)animated
- (BOOL)prefersStatusBarHidden
{
+#if !TARGET_OS_VISION
return [RCTSharedApplication() isStatusBarHidden];
+#else
+ return false;
+#endif
}
#if RCT_DEV
- (UIInterfaceOrientationMask)supportedInterfaceOrientations
{
+#if !TARGET_OS_VISION
UIInterfaceOrientationMask appSupportedOrientationsMask =
[RCTSharedApplication() supportedInterfaceOrientationsForWindow:[RCTSharedApplication() keyWindow]];
+#else
+ UIInterfaceOrientationMask appSupportedOrientationsMask = UIInterfaceOrientationMaskPortrait;
+#endif
+
if (!(_supportedInterfaceOrientations & appSupportedOrientationsMask)) {
RCTLogError(
@"Modal was presented with 0x%x orientations mask but the application only supports 0x%x."
diff --git a/packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm b/packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm
index 504b0ef147ae0b..3a765dd7c7d02c 100644
--- a/packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm
+++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm
@@ -28,6 +28,7 @@
static const CGFloat kClippingLeeway = 44.0;
+#if !TARGET_OS_VISION
static UIScrollViewKeyboardDismissMode RCTUIKeyboardDismissModeFromProps(const ScrollViewProps &props)
{
switch (props.keyboardDismissMode) {
@@ -39,6 +40,7 @@ static UIScrollViewKeyboardDismissMode RCTUIKeyboardDismissModeFromProps(const S
return UIScrollViewKeyboardDismissModeInteractive;
}
}
+#endif
static UIScrollViewIndicatorStyle RCTUIScrollViewIndicatorStyleFromProps(const ScrollViewProps &props)
{
@@ -299,9 +301,11 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared &
MAP_SCROLL_VIEW_PROP(disableIntervalMomentum);
MAP_SCROLL_VIEW_PROP(snapToInterval);
+#if !TARGET_OS_VISION
if (oldScrollViewProps.keyboardDismissMode != newScrollViewProps.keyboardDismissMode) {
scrollView.keyboardDismissMode = RCTUIKeyboardDismissModeFromProps(newScrollViewProps);
}
+#endif
[super updateProps:props oldProps:oldProps];
}
diff --git a/packages/react-native/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm b/packages/react-native/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm
index 27f52dd15150dc..b2ae6df61a13d6 100644
--- a/packages/react-native/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm
+++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm
@@ -223,7 +223,7 @@ - (void)disableContextMenu
- (void)handleLongPress:(UILongPressGestureRecognizer *)gesture
{
// TODO: Adopt showMenuFromRect (necessary for UIKitForMac)
-#if !TARGET_OS_UIKITFORMAC
+#if !TARGET_OS_UIKITFORMAC && !TARGET_OS_VISION
UIMenuController *menuController = [UIMenuController sharedMenuController];
if (menuController.isMenuVisible) {
diff --git a/packages/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm b/packages/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm
index e7b69bff2f9e68..a1ec3dce785e0d 100644
--- a/packages/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm
+++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm
@@ -475,6 +475,7 @@ - (void)setTextAndSelection:(NSInteger)eventCount
- (void)setDefaultInputAccessoryView
{
+#if !TARGET_OS_VISION
// InputAccessoryView component sets the inputAccessoryView when inputAccessoryViewID exists
if (_backedTextInputView.inputAccessoryViewID) {
if (_backedTextInputView.isFirstResponder) {
@@ -514,6 +515,7 @@ - (void)setDefaultInputAccessoryView
if (_backedTextInputView.isFirstResponder) {
[_backedTextInputView reloadInputViews];
}
+#endif
}
- (void)handleInputAccessoryDoneButton
diff --git a/packages/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.mm b/packages/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.mm
index d4b91c921b1114..3bc3f3a298e47f 100644
--- a/packages/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.mm
+++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.mm
@@ -26,7 +26,9 @@ void RCTCopyBackedTextInput(
toTextInput.placeholder = fromTextInput.placeholder;
toTextInput.placeholderColor = fromTextInput.placeholderColor;
toTextInput.textContainerInset = fromTextInput.textContainerInset;
+#if !TARGET_OS_VISION
toTextInput.inputAccessoryView = fromTextInput.inputAccessoryView;
+#endif
toTextInput.textInputDelegate = fromTextInput.textInputDelegate;
toTextInput.placeholderColor = fromTextInput.placeholderColor;
toTextInput.defaultTextAttributes = fromTextInput.defaultTextAttributes;
diff --git a/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm b/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm
index bab5f1ee526ec3..e86e7dcafc09e0 100644
--- a/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm
+++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm
@@ -252,7 +252,11 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared &
// `shouldRasterize`
if (oldViewProps.shouldRasterize != newViewProps.shouldRasterize) {
self.layer.shouldRasterize = newViewProps.shouldRasterize;
+#if !TARGET_OS_VISION
self.layer.rasterizationScale = newViewProps.shouldRasterize ? [UIScreen mainScreen].scale : 1.0;
+#else
+ self.layer.rasterizationScale = 1.0;
+#endif
}
// `pointerEvents`
diff --git a/packages/react-native/React/Fabric/RCTSurfacePointerHandler.mm b/packages/react-native/React/Fabric/RCTSurfacePointerHandler.mm
index 67a89beac124b2..b70c5f59563cea 100644
--- a/packages/react-native/React/Fabric/RCTSurfacePointerHandler.mm
+++ b/packages/react-native/React/Fabric/RCTSurfacePointerHandler.mm
@@ -281,6 +281,7 @@ static PointerEvent CreatePointerEventFromActivePointer(
UIView *rootComponentView)
{
PointerEvent event = {};
+#if !TARGET_OS_VISION
event.pointerId = activePointer.identifier;
event.pointerType = PointerTypeCStringFromUITouchType(activePointer.touchType);
@@ -329,7 +330,7 @@ static PointerEvent CreatePointerEventFromActivePointer(
event.tangentialPressure = 0.0;
event.twist = 0;
event.isPrimary = activePointer.isPrimary;
-
+#endif
return event;
}
@@ -369,6 +370,7 @@ static void UpdateActivePointerWithUITouch(
UIEvent *uiEvent,
UIView *rootComponentView)
{
+#if !TARGET_OS_VISION
CGPoint location = [uiTouch locationInView:rootComponentView];
UIView *hitTestedView = [rootComponentView hitTest:location withEvent:nil];
activePointer.componentView = FindClosestFabricManagedTouchableView(hitTestedView);
@@ -394,6 +396,7 @@ static void UpdateActivePointerWithUITouch(
activePointer.button = ButtonMaskDiffToButton(activePointer.buttonMask, nextButtonMask);
activePointer.buttonMask = nextButtonMask;
activePointer.modifierFlags = uiEvent.modifierFlags;
+#endif
}
/**
@@ -747,6 +750,7 @@ - (void)hovering:(UIHoverGestureRecognizer *)recognizer
pointerId:(int)pointerId
pointerType:(std::string)pointerType API_AVAILABLE(ios(13.0))
{
+#if !TARGET_OS_VISION
UIView *listenerView = recognizer.view;
CGPoint clientLocation = [recognizer locationInView:listenerView];
CGPoint screenLocation = [listenerView convertPoint:clientLocation
@@ -769,6 +773,7 @@ - (void)hovering:(UIHoverGestureRecognizer *)recognizer
if (eventEmitter != nil) {
eventEmitter->onPointerMove(event);
}
+#endif
}
#pragma mark - Shared pointer handlers
diff --git a/packages/react-native/React/Fabric/RCTSurfaceTouchHandler.mm b/packages/react-native/React/Fabric/RCTSurfaceTouchHandler.mm
index a793251fc622c3..51e4a14e026f59 100644
--- a/packages/react-native/React/Fabric/RCTSurfaceTouchHandler.mm
+++ b/packages/react-native/React/Fabric/RCTSurfaceTouchHandler.mm
@@ -54,6 +54,7 @@ static void UpdateActiveTouchWithUITouch(
UIView *rootComponentView,
CGPoint rootViewOriginOffset)
{
+#if !TARGET_OS_VISION
CGPoint offsetPoint = [uiTouch locationInView:activeTouch.componentView];
CGPoint pagePoint = [uiTouch locationInView:rootComponentView];
CGPoint screenPoint = [rootComponentView convertPoint:pagePoint
@@ -69,6 +70,7 @@ static void UpdateActiveTouchWithUITouch(
if (RCTForceTouchAvailable()) {
activeTouch.touch.force = RCTZeroIfNaN(uiTouch.force / uiTouch.maximumPossibleForce);
}
+#endif
}
static ActiveTouch CreateTouchWithUITouch(UITouch *uiTouch, UIView *rootComponentView, CGPoint rootViewOriginOffset)
diff --git a/packages/react-native/React/Modules/RCTUIManager.m b/packages/react-native/React/Modules/RCTUIManager.m
index c6b73cc5bbbdf0..b8de9bcfca4fc0 100644
--- a/packages/react-native/React/Modules/RCTUIManager.m
+++ b/packages/react-native/React/Modules/RCTUIManager.m
@@ -188,10 +188,12 @@ - (void)setBridge:(RCTBridge *)bridge
object:[self->_bridge moduleForName:@"AccessibilityManager"
lazilyLoadIfNecessary:YES]];
});
+#if !TARGET_OS_VISION
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(namedOrientationDidChange)
name:UIDeviceOrientationDidChangeNotification
object:nil];
+#endif
[RCTLayoutAnimation initializeStatics];
}
@@ -259,16 +261,19 @@ - (void)didReceiveNewContentSizeMultiplier
- (void)namedOrientationDidChange
{
+#if !TARGET_OS_VISION
NSDictionary *orientationEvent = deviceOrientationEventBody([UIDevice currentDevice].orientation);
if (!orientationEvent) {
return;
}
-
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[[_moduleRegistry moduleForName:"EventDispatcher"] sendDeviceEventWithName:@"namedOrientationDidChange"
body:orientationEvent];
#pragma clang diagnostic pop
+#endif
+ return;
+
}
- (dispatch_queue_t)methodQueue
diff --git a/packages/react-native/React/UIUtils/RCTUIUtils.m b/packages/react-native/React/UIUtils/RCTUIUtils.m
index ed2aa676e27a9d..82411abebf7f2d 100644
--- a/packages/react-native/React/UIUtils/RCTUIUtils.m
+++ b/packages/react-native/React/UIUtils/RCTUIUtils.m
@@ -11,19 +11,28 @@
RCTDimensions RCTGetDimensions(CGFloat fontScale)
{
+#if TARGET_OS_VISION
+ CGSize screenSize = RCTForegroundWindow().bounds.size;
+#else
UIScreen *mainScreen = UIScreen.mainScreen;
CGSize screenSize = mainScreen.bounds.size;
-
+#endif
UIView *mainWindow;
mainWindow = RCTKeyWindow();
// We fallback to screen size if a key window is not found.
CGSize windowSize = mainWindow ? mainWindow.bounds.size : screenSize;
+ CGFloat scale;
+#if TARGET_OS_VISION
+ scale = 1;
+#else
+ scale = mainScreen.scale;
+#endif
RCTDimensions result;
typeof(result.screen) dimsScreen = {
- .width = screenSize.width, .height = screenSize.height, .scale = mainScreen.scale, .fontScale = fontScale};
+ .width = screenSize.width, .height = screenSize.height, .scale = scale, .fontScale = fontScale};
typeof(result.window) dimsWindow = {
- .width = windowSize.width, .height = windowSize.height, .scale = mainScreen.scale, .fontScale = fontScale};
+ .width = windowSize.width, .height = windowSize.height, .scale = scale, .fontScale = fontScale};
result.screen = dimsScreen;
result.window = dimsWindow;
diff --git a/packages/react-native/React/Views/RCTModalHostView.m b/packages/react-native/React/Views/RCTModalHostView.m
index dfde4ae47ab137..9694d67e8e1d0b 100644
--- a/packages/react-native/React/Views/RCTModalHostView.m
+++ b/packages/react-native/React/Views/RCTModalHostView.m
@@ -75,8 +75,11 @@ - (void)notifyForOrientationChange
if (!_onOrientationChange) {
return;
}
-
+#if !TARGET_OS_VISION
UIInterfaceOrientation currentOrientation = [RCTSharedApplication() statusBarOrientation];
+#else
+ UIInterfaceOrientation currentOrientation = UIDeviceOrientationUnknown;
+#endif
if (currentOrientation == _lastKnownOrientation) {
return;
}
diff --git a/packages/react-native/React/Views/RCTModalHostViewController.m b/packages/react-native/React/Views/RCTModalHostViewController.m
index 059b64157f9836..973367c567ed0d 100644
--- a/packages/react-native/React/Views/RCTModalHostViewController.m
+++ b/packages/react-native/React/Views/RCTModalHostViewController.m
@@ -23,10 +23,11 @@ - (instancetype)init
}
self.modalInPresentation = YES;
-
+#if !TARGET_OS_VISION
_preferredStatusBarStyle = [RCTSharedApplication() statusBarStyle];
_preferredStatusBarHidden = [RCTSharedApplication() isStatusBarHidden];
-
+#endif
+
return self;
}
@@ -53,8 +54,12 @@ - (BOOL)prefersStatusBarHidden
#if RCT_DEV
- (UIInterfaceOrientationMask)supportedInterfaceOrientations
{
+#if !TARGET_OS_VISION
UIInterfaceOrientationMask appSupportedOrientationsMask =
[RCTSharedApplication() supportedInterfaceOrientationsForWindow:[RCTSharedApplication() keyWindow]];
+#else
+ UIInterfaceOrientationMask appSupportedOrientationsMask = UIInterfaceOrientationMaskPortrait;
+#endif
if (!(_supportedInterfaceOrientations & appSupportedOrientationsMask)) {
RCTLogError(
@"Modal was presented with 0x%x orientations mask but the application only supports 0x%x."
diff --git a/packages/react-native/React/Views/RCTViewManager.h b/packages/react-native/React/Views/RCTViewManager.h
index 1676e69f2aca86..ca76e780b720c5 100644
--- a/packages/react-native/React/Views/RCTViewManager.h
+++ b/packages/react-native/React/Views/RCTViewManager.h
@@ -79,6 +79,25 @@ typedef void (^RCTViewManagerUIBlock)(RCTUIManager *uiManager, NSDictionary
#import
+#if !TARGET_OS_VISION
+
@interface RCTConvert (UIScrollView)
+ (UIScrollViewKeyboardDismissMode)UIScrollViewKeyboardDismissMode:(id)json;
@end
+#endif
+
@interface RCTScrollViewManager : RCTViewManager
@end
+
+
diff --git a/packages/react-native/React/Views/ScrollView/RCTScrollViewManager.m b/packages/react-native/React/Views/ScrollView/RCTScrollViewManager.m
index 03355504e0a1dc..8805a8a8cb9001 100644
--- a/packages/react-native/React/Views/ScrollView/RCTScrollViewManager.m
+++ b/packages/react-native/React/Views/ScrollView/RCTScrollViewManager.m
@@ -12,6 +12,8 @@
#import "RCTShadowView.h"
#import "RCTUIManager.h"
+#if !TARGET_OS_VISION
+
@implementation RCTConvert (UIScrollView)
RCT_ENUM_CONVERTER(
@@ -49,6 +51,8 @@ @implementation RCTConvert (UIScrollView)
@end
+#endif
+
@implementation RCTScrollViewManager
RCT_EXPORT_MODULE()
@@ -70,7 +74,7 @@ - (UIView *)view
RCT_EXPORT_VIEW_PROPERTY(decelerationRate, CGFloat)
RCT_EXPORT_VIEW_PROPERTY(directionalLockEnabled, BOOL)
RCT_EXPORT_VIEW_PROPERTY(indicatorStyle, UIScrollViewIndicatorStyle)
-RCT_EXPORT_VIEW_PROPERTY(keyboardDismissMode, UIScrollViewKeyboardDismissMode)
+RCT_EXPORT_NOT_VISIONOS_VIEW_PROPERTY(keyboardDismissMode, UIScrollViewKeyboardDismissMode)
RCT_EXPORT_VIEW_PROPERTY(maximumZoomScale, CGFloat)
RCT_EXPORT_VIEW_PROPERTY(minimumZoomScale, CGFloat)
RCT_EXPORT_VIEW_PROPERTY(scrollEnabled, BOOL)
diff --git a/packages/react-native/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTSampleTurboModule.mm b/packages/react-native/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTSampleTurboModule.mm
index 8a286dcfd33665..593f677ec2f3f1 100644
--- a/packages/react-native/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTSampleTurboModule.mm
+++ b/packages/react-native/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTSampleTurboModule.mm
@@ -46,12 +46,15 @@ - (NSDictionary *)getConstants
{
__block NSDictionary *constants;
RCTUnsafeExecuteOnMainQueueSync(^{
- UIScreen *mainScreen = UIScreen.mainScreen;
- CGSize screenSize = mainScreen.bounds.size;
-
+#if TARGET_OS_VISION
+ CGSize screenSize = CGSizeMake(100, 100);
+#else
+ UIScreen *mainScreen = UIScreen.mainScreen;
+ CGSize screenSize = mainScreen.bounds.size;
+#endif
constants = @{
@"const1" : @YES,
- @"const2" : @(screenSize.width),
+ @"const2" : @(screenSize),
@"const3" : @"something",
};
});
diff --git a/packages/react-native/scripts/cocoapods/jsengine.rb b/packages/react-native/scripts/cocoapods/jsengine.rb
index 12f8cd65674943..14c1ae8806e48a 100644
--- a/packages/react-native/scripts/cocoapods/jsengine.rb
+++ b/packages/react-native/scripts/cocoapods/jsengine.rb
@@ -30,5 +30,5 @@ def setup_hermes!(react_native_path: "../node_modules/react-native")
hermestag = File.exist?(hermestag_file) ? File.read(hermestag_file).strip : ''
pod 'hermes-engine', :podspec => "#{react_native_path}/sdks/hermes-engine/hermes-engine.podspec", :tag => hermestag
pod 'React-hermes', :path => "#{react_native_path}/ReactCommon/hermes"
- pod 'libevent', '~> 2.1.12'
+ pod 'libevent', :podspec => "#{react_native_path}/third-party-podspecs/libevent.podspec", :modular_headers => true
end
diff --git a/packages/react-native/scripts/react_native_pods.rb b/packages/react-native/scripts/react_native_pods.rb
index 4a37aefad7d67b..409c9bd9fc6f9f 100644
--- a/packages/react-native/scripts/react_native_pods.rb
+++ b/packages/react-native/scripts/react_native_pods.rb
@@ -40,11 +40,15 @@ def min_ios_version_supported
return Helpers::Constants.min_ios_version_supported
end
+def min_visionos_version_supported
+ return '1.0'
+end
+
# This function returns the min supported OS versions supported by React Native
# By using this function, you won't have to manually change your Podfile
# when we change the minimum version supported by the framework.
def min_supported_versions
- return { :ios => min_ios_version_supported }
+ return { :ios => min_ios_version_supported, :visionos => min_visionos_version_supported }
end
# This function prepares the project for React Native, before processing
@@ -154,6 +158,10 @@ def use_react_native! (
pod 'boost', :podspec => "#{prefix}/third-party-podspecs/boost.podspec"
pod 'fmt', :podspec => "#{prefix}/third-party-podspecs/fmt.podspec"
pod 'RCT-Folly', :podspec => "#{prefix}/third-party-podspecs/RCT-Folly.podspec", :modular_headers => true
+ pod 'fmt', :podspec => "#{prefix}/third-party-podspecs/fmt.podspec", :modular_headers => true
+ pod 'SocketRocket', :podspec => "#{prefix}/third-party-podspecs/SocketRocket.podspec", :modular_headers => true
+ # pod 'YogaKit', :podspec => "#{prefix}/third-party-podspecs/YogaKit.podspec", :modular_headers => true
+
run_codegen!(
app_path,
diff --git a/packages/react-native/sdks/hermes-engine/hermes-engine.podspec b/packages/react-native/sdks/hermes-engine/hermes-engine.podspec
index c7e22ddf572225..bf57138877a973 100644
--- a/packages/react-native/sdks/hermes-engine/hermes-engine.podspec
+++ b/packages/react-native/sdks/hermes-engine/hermes-engine.podspec
@@ -24,7 +24,7 @@ Pod::Spec.new do |spec|
spec.license = package['license']
spec.author = "Facebook"
spec.source = source
- spec.platforms = { :osx => "10.13", :ios => "13.4" }
+ spec.platforms = { :osx => "10.13", :ios => "13.4", :visionos => "1.0" }
spec.preserve_paths = '**/*.*'
spec.source_files = ''
@@ -35,6 +35,7 @@ Pod::Spec.new do |spec|
}
spec.ios.vendored_frameworks = "destroot/Library/Frameworks/ios/hermes.framework"
+ spec.visionos.vendored_frameworks = "destroot/Library/Frameworks/visionos/hermes.framework"
spec.osx.vendored_frameworks = "destroot/Library/Frameworks/macosx/hermes.framework"
if HermesEngineSourceType::isPrebuilt(source_type) then
@@ -44,6 +45,7 @@ Pod::Spec.new do |spec|
ss.source_files = "destroot/include/**/*.h"
ss.header_mappings_dir = "destroot/include"
ss.ios.vendored_frameworks = "destroot/Library/Frameworks/universal/hermes.xcframework"
+ ss.visionos.vendored_frameworks = "destroot/Library/Frameworks/universal/hermes.xcframework"
ss.osx.vendored_frameworks = "destroot/Library/Frameworks/macosx/hermes.framework"
end
diff --git a/packages/react-native/third-party-podspecs/SocketRocket.podspec b/packages/react-native/third-party-podspecs/SocketRocket.podspec
new file mode 100644
index 00000000000000..46d4b8b2b7b8fe
--- /dev/null
+++ b/packages/react-native/third-party-podspecs/SocketRocket.podspec
@@ -0,0 +1,24 @@
+Pod::Spec.new do |s|
+ s.name = 'SocketRocket'
+ s.version = '0.7.0.1'
+ s.summary = 'A conforming WebSocket (RFC 6455) client library for iOS, macOS and tvOS.'
+ s.homepage = 'https://github.com/facebook/SocketRocket'
+ s.authors = { 'Nikita Lutsenko' => 'nlutsenko@me.com', 'Dan Federman' => 'federman@squareup.com', 'Mike Lewis' => 'mikelikespie@gmail.com' }
+ s.license = 'BSD'
+ s.source = { :git => 'https://github.com/facebook/SocketRocket.git', :tag => '0.7.0' }
+ s.requires_arc = true
+
+ s.source_files = 'SocketRocket/**/*.{h,m}'
+ s.public_header_files = 'SocketRocket/*.h'
+
+ s.ios.deployment_target = '9.0'
+ s.osx.deployment_target = '10.9'
+ s.tvos.deployment_target = '9.0'
+ s.visionos.deployment_target = '1.0'
+
+ s.ios.frameworks = 'CFNetwork', 'Security'
+ s.osx.frameworks = 'CoreServices', 'Security'
+ s.tvos.frameworks = 'CFNetwork', 'Security'
+ s.visionos.frameworks = 'CFNetwork', 'Security'
+ s.libraries = 'icucore'
+ end
\ No newline at end of file
diff --git a/packages/react-native/third-party-podspecs/YogaKit.podspec b/packages/react-native/third-party-podspecs/YogaKit.podspec
new file mode 100644
index 00000000000000..ec2c5654a351b4
--- /dev/null
+++ b/packages/react-native/third-party-podspecs/YogaKit.podspec
@@ -0,0 +1,39 @@
+# Copyright (c) Facebook, Inc. and its affiliates.
+#
+# This source code is licensed under the MIT license found in the
+# LICENSE file in the root directory of this source tree.
+
+podspec = Pod::Spec.new do |spec|
+ spec.name = 'YogaKit'
+ spec.version = '1.18.1'
+ spec.license = { :type => 'MIT', :file => "LICENSE" }
+ spec.homepage = 'https://facebook.github.io/yoga/'
+ spec.documentation_url = 'https://facebook.github.io/yoga/docs/'
+
+ spec.summary = 'Yoga is a cross-platform layout engine which implements Flexbox.'
+ spec.description = 'Yoga is a cross-platform layout engine enabling maximum collaboration within your team by implementing an API many designers are familiar with, and opening it up to developers across different platforms.'
+
+ spec.authors = 'Facebook'
+ spec.source = {
+ :git => 'https://github.com/facebook/yoga.git',
+ :tag => "1.18.0",
+ }
+
+ spec.platforms = { :ios => "9.0", :visionos => "1.0" }
+ spec.ios.deployment_target = '8.0'
+ spec.ios.frameworks = 'UIKit'
+ spec.module_name = 'YogaKit'
+ spec.dependency 'Yoga'
+ # Fixes the bug related the xcode 11 not able to find swift related frameworks.
+ # https://github.com/Carthage/Carthage/issues/2825
+ # https://twitter.com/krzyzanowskim/status/1151549874653081601?s=21
+ spec.pod_target_xcconfig = {"LD_VERIFY_BITCODE": "NO"}
+ spec.source_files = 'YogaKit/Source/*.{h,m,swift}'
+ spec.public_header_files = 'YogaKit/Source/{YGLayout,UIView+Yoga}.h'
+ spec.private_header_files = 'YogaKit/Source/YGLayout+Private.h'
+ spec.swift_version = '5.1'
+ end
+
+ # See https://github.com/facebook/yoga/pull/366
+ podspec.attributes_hash["readme"] = "YogaKit/README.md"
+ podspec
\ No newline at end of file
diff --git a/packages/react-native/third-party-podspecs/libevent.podspec b/packages/react-native/third-party-podspecs/libevent.podspec
new file mode 100644
index 00000000000000..7051785f86552a
--- /dev/null
+++ b/packages/react-native/third-party-podspecs/libevent.podspec
@@ -0,0 +1,560 @@
+# Copyright (c) Meta Platforms, Inc. and affiliates.
+#
+# This source code is licensed under the MIT license found in the
+# LICENSE file in the root directory of this source tree.
+
+# Generated with:
+#
+# $ mkdir build && cd build
+# $ cmake -G Ninja .. \
+# -DEVENT__DISABLE_OPENSSL:BOOL=ON \
+# -DEVENT__DISABLE_BENCHMARK:BOOL=ON \
+# -DEVENT__DISABLE_TESTS:BOOL=ON \
+# -DEVENT__DISABLE_REGRESS:BOOL=ON \
+# -DEVENT__DISABLE_SAMPLES:BOOL=ON
+# $ cat include/event2/event-config.h
+#
+CONFIG_WITHOUT_OPENSSL = <<-END_OF_CONFIG
+/* event-config.h
+ *
+ * This file was generated by cmake when the makefiles were generated.
+ *
+ * DO NOT EDIT THIS FILE.
+ *
+ * Do not rely on macros in this file existing in later versions.
+ */
+#ifndef EVENT2_EVENT_CONFIG_H_INCLUDED_
+#define EVENT2_EVENT_CONFIG_H_INCLUDED_
+
+/* Numeric representation of the version */
+#define EVENT__NUMERIC_VERSION 0x02020001
+#define EVENT__PACKAGE_VERSION "2.2.0"
+
+#define EVENT__VERSION_MAJOR 2
+#define EVENT__VERSION_MINOR 2
+#define EVENT__VERSION_PATCH 0
+
+/* Version number of package */
+#define EVENT__VERSION "2.2.0-alpha-dev"
+
+/* Name of package */
+#define EVENT__PACKAGE "libevent"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define EVENT__PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define EVENT__PACKAGE_NAME ""
+
+/* Define to the full name and version of this package. */
+#define EVENT__PACKAGE_STRING ""
+
+/* Define to the one symbol short name of this package. */
+#define EVENT__PACKAGE_TARNAME ""
+
+/* Define if libevent should build without support for a debug mode */
+/* #undef EVENT__DISABLE_DEBUG_MODE */
+
+/* Define if libevent should not allow replacing the mm functions */
+/* #undef EVENT__DISABLE_MM_REPLACEMENT */
+
+/* Define if libevent should not be compiled with thread support */
+/* #undef EVENT__DISABLE_THREAD_SUPPORT */
+
+/* Define to 1 if you have the `accept4' function. */
+/* #undef EVENT__HAVE_ACCEPT4 */
+
+/* Define to 1 if you have the `arc4random' function. */
+#define EVENT__HAVE_ARC4RANDOM 1
+
+/* Define to 1 if you have the `arc4random_buf' function. */
+#define EVENT__HAVE_ARC4RANDOM_BUF 1
+
+/* Define to 1 if you have the `arc4random_addrandom' function. */
+#define EVENT__HAVE_ARC4RANDOM_ADDRANDOM 1
+
+/* Define if clock_gettime is available in libc */
+#define EVENT__DNS_USE_CPU_CLOCK_FOR_ID 1
+
+/* Define is no secure id variant is available */
+/* #undef EVENT__DNS_USE_GETTIMEOFDAY_FOR_ID */
+/* #undef EVENT__DNS_USE_FTIME_FOR_ID */
+
+/* Define to 1 if you have the header file. */
+#define EVENT__HAVE_ARPA_INET_H 1
+
+/* Define to 1 if you have the `clock_gettime' function. */
+#define EVENT__HAVE_CLOCK_GETTIME 1
+
+/* Define to 1 if you have the declaration of `CTL_KERN'. */
+#define EVENT__HAVE_DECL_CTL_KERN 1
+
+/* Define to 1 if you have the declaration of `KERN_ARND'. */
+#define EVENT__HAVE_DECL_KERN_ARND 0
+
+/* Define to 1 if you have `getrandom' function. */
+/* #undef EVENT__HAVE_GETRANDOM */
+
+/* Define if /dev/poll is available */
+/* #undef EVENT__HAVE_DEVPOLL */
+
+/* Define to 1 if you have the header file. */
+#define EVENT__HAVE_NETDB_H 1
+
+/* Define to 1 if fd_mask type is defined */
+#define EVENT__HAVE_FD_MASK 1
+
+/* Define to 1 if the header file defines TAILQ_FOREACH. */
+#define EVENT__HAVE_TAILQFOREACH 1
+
+/* Define to 1 if you have the header file. */
+#define EVENT__HAVE_DLFCN_H 1
+
+/* Define if your system supports the epoll system calls */
+/* #undef EVENT__HAVE_EPOLL */
+
+/* Define to 1 if you have the `epoll_create1' function. */
+/* #undef EVENT__HAVE_EPOLL_CREATE1 */
+
+/* Define to 1 if you have the `epoll_ctl' function. */
+/* #undef EVENT__HAVE_EPOLL_CTL */
+
+/* Define if your system supports the wepoll module */
+/* #undef EVENT__HAVE_WEPOLL */
+
+/* Define to 1 if you have the `eventfd' function. */
+/* #undef EVENT__HAVE_EVENTFD */
+
+/* Define if your system supports event ports */
+/* #undef EVENT__HAVE_EVENT_PORTS */
+
+/* Define to 1 if you have the `fcntl' function. */
+#define EVENT__HAVE_FCNTL 1
+
+/* Define to 1 if you have the header file. */
+#define EVENT__HAVE_FCNTL_H 1
+
+/* Define to 1 if you have the `getaddrinfo' function. */
+#define EVENT__HAVE_GETADDRINFO 1
+
+/* Define to 1 if you have the `getegid' function. */
+#define EVENT__HAVE_GETEGID 1
+
+/* Define to 1 if you have the `geteuid' function. */
+#define EVENT__HAVE_GETEUID 1
+
+/* TODO: Check for different gethostname argument counts. CheckPrototypeDefinition.cmake can be used. */
+/* Define this if you have any gethostbyname_r() */
+/* #undef EVENT__HAVE_GETHOSTBYNAME_R */
+
+/* Define this if gethostbyname_r takes 3 arguments */
+/* #undef EVENT__HAVE_GETHOSTBYNAME_R_3_ARG */
+
+/* Define this if gethostbyname_r takes 5 arguments */
+/* #undef EVENT__HAVE_GETHOSTBYNAME_R_5_ARG */
+
+/* Define this if gethostbyname_r takes 6 arguments */
+/* #undef EVENT__HAVE_GETHOSTBYNAME_R_6_ARG */
+
+/* Define to 1 if you have the `getifaddrs' function. */
+#define EVENT__HAVE_GETIFADDRS 1
+
+/* Define to 1 if you have the `getnameinfo' function. */
+#define EVENT__HAVE_GETNAMEINFO 1
+
+/* Define to 1 if you have the `getprotobynumber' function. */
+#define EVENT__HAVE_GETPROTOBYNUMBER 1
+
+/* Define to 1 if you have the `getservbyname' function. */
+#define EVENT__HAVE_GETSERVBYNAME 1
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#define EVENT__HAVE_GETTIMEOFDAY 1
+
+/* Define to 1 if you have the header file. */
+#define EVENT__HAVE_IFADDRS_H 1
+
+/* Define to 1 if you have the `inet_ntop' function. */
+#define EVENT__HAVE_INET_NTOP 1
+
+/* Define to 1 if you have the `inet_pton' function. */
+#define EVENT__HAVE_INET_PTON 1
+
+/* Define to 1 if you have the header file. */
+#define EVENT__HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the `issetugid' function. */
+#define EVENT__HAVE_ISSETUGID 1
+
+/* Define to 1 if you have the `kqueue' function. */
+#define EVENT__HAVE_KQUEUE 1
+
+/* Define if the system has zlib */
+/* #undef EVENT__HAVE_LIBZ */
+
+/* Define to 1 if you have the `mach_absolute_time' function. */
+#define EVENT__HAVE_MACH_ABSOLUTE_TIME 1
+
+/* Define to 1 if you have the header file. */
+#define EVENT__HAVE_MACH_MACH_TIME_H 1
+
+/* Define to 1 if you have the header file. */
+#define EVENT__HAVE_MACH_MACH_H 1
+
+/* Define to 1 if you have the header file. */
+#define EVENT__HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the `mmap' function. */
+#define EVENT__HAVE_MMAP 1
+
+/* Define to 1 if you have the `nanosleep' function. */
+#define EVENT__HAVE_NANOSLEEP 1
+
+/* Define to 1 if you have the `usleep' function. */
+#define EVENT__HAVE_USLEEP 1
+
+/* Define to 1 if you have the header file. */
+/* #undef EVENT__HAVE_NETINET_IN6_H */
+
+/* Define to 1 if you have the header file. */
+#define EVENT__HAVE_NETINET_IN_H 1
+
+/* Define to 1 if you have the header file. */
+#define EVENT__HAVE_NETINET_TCP_H 1
+
+/* Define to 1 if you have the header file. */
+#define EVENT__HAVE_SYS_UN_H 1
+
+/* Define to 1 if you have the header file. */
+/* #undef EVENT__HAVE_AFUNIX_H */
+
+/* Define if the system has openssl */
+/* #undef EVENT__HAVE_OPENSSL */
+
+/* Define to 1 if you have the `pipe' function. */
+#define EVENT__HAVE_PIPE 1
+
+/* Define to 1 if you have the `pipe2' function. */
+/* #undef EVENT__HAVE_PIPE2 */
+
+/* Define to 1 if you have the `poll' function. */
+#define EVENT__HAVE_POLL 1
+
+/* Define to 1 if you have the header file. */
+#define EVENT__HAVE_POLL_H 1
+
+/* Define to 1 if you have the `port_create' function. */
+/* #undef EVENT__HAVE_PORT_CREATE */
+
+/* Define to 1 if you have the header file. */
+/* #undef EVENT__HAVE_PORT_H */
+
+/* Define if we have pthreads on this system */
+#define EVENT__HAVE_PTHREADS 1
+
+/* Define to 1 if you have the `putenv' function. */
+#define EVENT__HAVE_PUTENV 1
+
+/* Define to 1 if the system has the type `sa_family_t'. */
+#define EVENT__HAVE_SA_FAMILY_T 1
+
+/* Define to 1 if you have the `select' function. */
+#define EVENT__HAVE_SELECT 1
+
+/* Define to 1 if you have the `setenv' function. */
+#define EVENT__HAVE_SETENV 1
+
+/* Define if F_SETFD is defined in */
+#define EVENT__HAVE_SETFD 1
+
+/* Define to 1 if you have the `setrlimit' function. */
+#define EVENT__HAVE_SETRLIMIT 1
+
+/* Define to 1 if you have the `sendfile' function. */
+#define EVENT__HAVE_SENDFILE 1
+
+/* Define to 1 if you have the `sigaction' function. */
+#define EVENT__HAVE_SIGACTION 1
+
+/* Define to 1 if you have the `signal' function. */
+#define EVENT__HAVE_SIGNAL 1
+
+/* Define to 1 if you have the `strsignal' function. */
+#define EVENT__HAVE_STRSIGNAL 1
+
+/* Define to 1 if you have the `splice' function. */
+/* #undef EVENT__HAVE_SPLICE */
+
+/* Define to 1 if you have the header file. */
+#define EVENT__HAVE_STDARG_H 1
+
+/* Define to 1 if you have the header file. */
+#define EVENT__HAVE_STDDEF_H 1
+
+/* Define to 1 if you have the header file. */
+#define EVENT__HAVE_STDINT_H 1
+
+/* Define to 1 if you have the header file. */
+#define EVENT__HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the header file. */
+#define EVENT__HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strlcpy' function. */
+#define EVENT__HAVE_STRLCPY 1
+
+/* Define to 1 if you have the `strsep' function. */
+#define EVENT__HAVE_STRSEP 1
+
+/* Define to 1 if you have the `strtok_r' function. */
+#define EVENT__HAVE_STRTOK_R 1
+
+/* Define to 1 if you have the `strtoll' function. */
+#define EVENT__HAVE_STRTOLL 1
+
+/* Define to 1 if you have the `_gmtime64_s' function. */
+/* #undef EVENT__HAVE__GMTIME64_S */
+
+/* Define to 1 if you have the `_gmtime64' function. */
+/* #undef EVENT__HAVE__GMTIME64 */
+
+/* Define to 1 if the system has the type `struct addrinfo'. */
+#define EVENT__HAVE_STRUCT_ADDRINFO 1
+
+/* Define to 1 if the system has the type `struct in6_addr'. */
+#define EVENT__HAVE_STRUCT_IN6_ADDR 1
+
+/* Define to 1 if `s6_addr16' is member of `struct in6_addr'. */
+/* #undef EVENT__HAVE_STRUCT_IN6_ADDR_S6_ADDR16 */
+
+/* Define to 1 if `s6_addr32' is member of `struct in6_addr'. */
+/* #undef EVENT__HAVE_STRUCT_IN6_ADDR_S6_ADDR32 */
+
+/* Define to 1 if the system has the type `struct sockaddr_in6'. */
+#define EVENT__HAVE_STRUCT_SOCKADDR_IN6 1
+
+/* Define to 1 if `sin6_len' is member of `struct sockaddr_in6'. */
+#define EVENT__HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN 1
+
+/* Define to 1 if `sin_len' is member of `struct sockaddr_in'. */
+/* #undef EVENT__HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */
+
+/* Define to 1 if the system has the type `struct sockaddr_un'. */
+#define EVENT__HAVE_STRUCT_SOCKADDR_UN 1
+
+/* Define to 1 if the system has the type `struct sockaddr_storage'. */
+#define EVENT__HAVE_STRUCT_SOCKADDR_STORAGE 1
+
+/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */
+#define EVENT__HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
+
+/* Define to 1 if `__ss_family' is a member of `struct sockaddr_storage'. */
+/* #undef EVENT__HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY */
+
+/* Define to 1 if the system has the type `struct linger'. */
+#define EVENT__HAVE_STRUCT_LINGER 1
+
+/* Define to 1 if you have the `sysctl' function. */
+#define EVENT__HAVE_SYSCTL 1
+
+/* Define to 1 if you have the header file. */
+/* #undef EVENT__HAVE_SYS_EPOLL_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef EVENT__HAVE_SYS_EVENTFD_H */
+
+/* Define to 1 if you have the header file. */
+#define EVENT__HAVE_SYS_EVENT_H 1
+
+/* Define to 1 if you have the header file. */
+#define EVENT__HAVE_SYS_IOCTL_H 1
+
+/* Define to 1 if you have the header file. */
+#define EVENT__HAVE_SYS_MMAN_H 1
+
+/* Define to 1 if you have the header file. */
+#define EVENT__HAVE_SYS_PARAM_H 1
+
+/* Define to 1 if you have the header file. */
+#define EVENT__HAVE_SYS_QUEUE_H 1
+
+/* Define to 1 if you have the header file. */
+#define EVENT__HAVE_SYS_RESOURCE_H 1
+
+/* Define to 1 if you have the header file. */
+#define EVENT__HAVE_SYS_SELECT_H 1
+
+/* Define to 1 if you have the header file. */
+/* #undef EVENT__HAVE_SYS_SENDFILE_H */
+
+/* Define to 1 if you have the header file. */
+#define EVENT__HAVE_SYS_SOCKET_H 1
+
+/* Define to 1 if you have the header file. */
+#define EVENT__HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the header file. */
+#define EVENT__HAVE_SYS_RANDOM_H 1
+
+/* Define to 1 if you have the header file. */
+#define EVENT__HAVE_SYS_SYSCTL_H 1
+
+/* Define to 1 if you have the header file. */
+/* #undef EVENT__HAVE_SYS_TIMERFD_H */
+
+/* Define to 1 if you have the header file. */
+#define EVENT__HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the header file. */
+#define EVENT__HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the header file. */
+#define EVENT__HAVE_SYS_UIO_H 1
+
+/* Define to 1 if you have the header file. */
+#define EVENT__HAVE_SYS_WAIT_H 1
+
+/* Define to 1 if you have the header file. */
+#define EVENT__HAVE_ERRNO_H 1
+
+/* Define if TAILQ_FOREACH is defined in */
+#define EVENT__HAVE_TAILQFOREACH 1
+
+/* Define if timeradd is defined in */
+#define EVENT__HAVE_TIMERADD 1
+
+/* Define if timerclear is defined in */
+#define EVENT__HAVE_TIMERCLEAR 1
+
+/* Define if timercmp is defined in */
+#define EVENT__HAVE_TIMERCMP 1
+
+
+/* Define to 1 if you have the `timerfd_create' function. */
+/* #undef EVENT__HAVE_TIMERFD_CREATE */
+
+/* Define if timerisset is defined in */
+#define EVENT__HAVE_TIMERISSET 1
+
+/* Define to 1 if the system has the type `uint8_t'. */
+#define EVENT__HAVE_UINT8_T 1
+
+/* Define to 1 if the system has the type `uint16_t'. */
+#define EVENT__HAVE_UINT16_T 1
+
+/* Define to 1 if the system has the type `uint32_t'. */
+#define EVENT__HAVE_UINT32_T 1
+
+/* Define to 1 if the system has the type `uint64_t'. */
+#define EVENT__HAVE_UINT64_T 1
+
+/* Define to 1 if the system has the type `uintptr_t'. */
+#define EVENT__HAVE_UINTPTR_T 1
+
+/* Define to 1 if you have the `umask' function. */
+#define EVENT__HAVE_UMASK 1
+
+/* Define to 1 if you have the header file. */
+#define EVENT__HAVE_UNISTD_H 1
+
+/* Define to 1 if you have the `unsetenv' function. */
+#define EVENT__HAVE_UNSETENV 1
+
+/* Define to 1 if you have the `vasprintf' function. */
+#define EVENT__HAVE_VASPRINTF 1
+
+/* Define if kqueue works correctly with pipes */
+#define EVENT__HAVE_WORKING_KQUEUE 1
+
+#ifdef __USE_UNUSED_DEFINITIONS__
+/* Define to necessary symbol if this constant uses a non-standard name on your system. */
+/* XXX: Hello, this isn't even used, nor is it defined anywhere... - Ellzey */
+#define EVENT__PTHREAD_CREATE_JOINABLE
+#endif
+
+/* The size of `pthread_t', as computed by sizeof. */
+#define EVENT__SIZEOF_PTHREAD_T 8
+
+/* The size of a `int', as computed by sizeof. */
+#define EVENT__SIZEOF_INT 4
+
+/* The size of a `long', as computed by sizeof. */
+#define EVENT__SIZEOF_LONG 8
+
+/* The size of a `long long', as computed by sizeof. */
+#define EVENT__SIZEOF_LONG_LONG 8
+
+/* The size of `off_t', as computed by sizeof. */
+#define EVENT__SIZEOF_OFF_T 8
+
+#define EVENT__SIZEOF_SSIZE_T 8
+
+
+/* The size of a `short', as computed by sizeof. */
+#define EVENT__SIZEOF_SHORT 2
+
+/* The size of `size_t', as computed by sizeof. */
+#define EVENT__SIZEOF_SIZE_T 8
+
+/* Define to 1 if you can safely include both and . */
+/* #undef EVENT__TIME_WITH_SYS_TIME */
+
+/* The size of `socklen_t', as computed by sizeof. */
+#define EVENT__SIZEOF_SOCKLEN_T 4
+
+/* The size of 'void *', as computer by sizeof */
+#define EVENT__SIZEOF_VOID_P 8
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+#ifndef __cplusplus
+/* why not c++?
+ *
+ * and are we really expected to use EVENT__inline everywhere,
+ * shouldn't we just do:
+ * ifdef EVENT__inline
+ * define inline EVENT__inline
+ *
+ * - Ellzey
+ */
+
+#define EVENT__inline inline
+#endif
+
+#define EVENT__HAVE___func__ 1
+#define EVENT__HAVE___FUNCTION__ 1
+
+/* Define to `unsigned' if does not define. */
+#define EVENT__size_t size_t
+
+/* Define to unsigned int if you dont have it */
+#define EVENT__socklen_t socklen_t
+
+/* Define to `int' if does not define. */
+#define EVENT__ssize_t ssize_t
+
+#endif /* \EVENT2_EVENT_CONFIG_H_INCLUDED_ */
+END_OF_CONFIG
+
+Pod::Spec.new do |spec|
+ spec.name = "libevent"
+ spec.version = "2.1.12.1"
+ spec.summary = "Event notification library"
+ spec.description = "The libevent API provides a mechanism to execute a callback function when a specific event occurs on a file descriptor or after a timeout has been reached. Furthermore, libevent also support callbacks due to signals or regular timeouts."
+ spec.homepage = "https://libevent.org"
+ spec.license = { :type => "BSD 3-Clause", :file => "LICENSE" }
+ spec.author = "Niels Provos and Nick Mathewson"
+ spec.platforms = { :osx => "10.13", :ios => "10.0", :tvos => "10.0", :visionos => "1.0" }
+ spec.source = { :git => "https://github.com/libevent/libevent.git", :tag => "release-2.1.12-stable" }
+ spec.prepare_command = "echo 'executing libevent prepare command'; touch evconfig-private.h; echo -e #{Shellwords.escape(CONFIG_WITHOUT_OPENSSL)} > include/event2/event-config.h; ls include/event2/"
+ spec.source_files =
+ "include/*.h", "*-{internal,private}.h",
+ "buffer.c", "bufferevent.c", "bufferevent_filter.c", "bufferevent_pair.c", "bufferevent_ratelim.c", "bufferevent_sock.c",
+ "event.c", "evmap.c", "evthread.c", "evutil.c", "evutil_rand.c", "evutil_time.c",
+ "kqueue.c", "listener.c", "log.c", "poll.c", "select.c", "signal.c", "strlcpy.c", "watch.c",
+ "evdns.c", "event_tagging.c", "evrpc.c", "http.c"
+ spec.private_header_files = "*-{internal,private}.h"
+ spec.public_header_files = "include/*.h"
+ spec.preserve_paths = "include/event2/*.h"
+ spec.xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/include/\"" }
+end
\ No newline at end of file
diff --git a/packages/rn-tester/Gemfile b/packages/rn-tester/Gemfile
index 4de6c10e5d6df3..10100d3d65d4c1 100644
--- a/packages/rn-tester/Gemfile
+++ b/packages/rn-tester/Gemfile
@@ -1,6 +1,7 @@
# Gemfile
source 'https://rubygems.org'
-gem 'cocoapods', '~> 1.12'
+gem 'cocoapods', '~> 1.13'
+
gem 'rexml'
gem 'activesupport', '>= 6.1.7.3', '< 7.1.0'
diff --git a/packages/rn-tester/Podfile b/packages/rn-tester/Podfile
index 8991d28a670e07..6b0cada920c055 100644
--- a/packages/rn-tester/Podfile
+++ b/packages/rn-tester/Podfile
@@ -1,7 +1,7 @@
require_relative '../react-native/scripts/react_native_pods'
source 'https://cdn.cocoapods.org/'
-platform :ios, min_ios_version_supported
+platform :visionos, min_visionos_version_supported
cmake_path = `command -v cmake`
@@ -39,7 +39,8 @@ def pods(target_name, options = {})
# Hermes is now enabled by default.
# The following line will only disable Hermes if the USE_HERMES envvar is SET to a value other than 1 (e.g. USE_HERMES=0).
- hermes_enabled = !ENV.has_key?('USE_HERMES') || ENV['USE_HERMES'] == '1'
+ # TODO: Make hermes work
+ hermes_enabled = false # !ENV.has_key?('USE_HERMES') || ENV['USE_HERMES'] == '1'
puts "Configuring #{target_name} with Fabric #{fabric_enabled ? "enabled" : "disabled"}.#{hermes_enabled ? " Using Hermes engine." : ""}"
use_react_native!(
@@ -74,7 +75,8 @@ end
target 'RNTesterUnitTests' do
pods('RNTesterUnitTests')
pod 'React-RCTTest', :path => "./RCTTest"
- pod 'OCMock', '~> 3.9.1'
+ # TODO: Uncomment this once OCMock is released https://cocoapods.org/pods/OCMock
+ # pod 'OCMock', '~> 3.9.2'
end
target 'RNTesterIntegrationTests' do
diff --git a/packages/rn-tester/Podfile.lock b/packages/rn-tester/Podfile.lock
index 2aa0f332095033..e4c2242b41fba4 100644
--- a/packages/rn-tester/Podfile.lock
+++ b/packages/rn-tester/Podfile.lock
@@ -11,17 +11,6 @@ PODS:
- ReactCommon/turbomodule/core (= 1000.0.0)
- fmt (9.1.0)
- glog (0.3.5)
- - hermes-engine (1000.0.0):
- - hermes-engine/Hermes (= 1000.0.0)
- - hermes-engine/inspector (= 1000.0.0)
- - hermes-engine/inspector_chrome (= 1000.0.0)
- - hermes-engine/Public (= 1000.0.0)
- - hermes-engine/Hermes (1000.0.0)
- - hermes-engine/inspector (1000.0.0)
- - hermes-engine/inspector_chrome (1000.0.0)
- - hermes-engine/Public (1000.0.0)
- - libevent (2.1.12)
- - OCMock (3.9.1)
- RCT-Folly (2023.08.07.00):
- boost
- DoubleConversion
@@ -61,7 +50,6 @@ PODS:
- DoubleConversion
- FBReactNativeSpec
- glog
- - hermes-engine
- RCT-Folly
- RCTRequired
- RCTTypeSafety
@@ -69,6 +57,7 @@ PODS:
- React-debug
- React-Fabric
- React-graphics
+ - React-jsc
- React-jsi
- React-jsiexecutor
- React-NativeModulesApple
@@ -79,214 +68,199 @@ PODS:
- ReactCommon/turbomodule/core
- React-Core (1000.0.0):
- glog
- - hermes-engine
- RCT-Folly (= 2023.08.07.00)
- React-Core/Default (= 1000.0.0)
- React-cxxreact
- - React-hermes
+ - React-jsc
- React-jsi
- React-jsiexecutor
- React-perflogger
- React-runtimescheduler
- React-utils
- - SocketRocket (= 0.7.0)
+ - SocketRocket (= 0.7.0.1)
- Yoga
- React-Core/CoreModulesHeaders (1000.0.0):
- glog
- - hermes-engine
- RCT-Folly (= 2023.08.07.00)
- React-Core/Default
- React-cxxreact
- - React-hermes
+ - React-jsc
- React-jsi
- React-jsiexecutor
- React-perflogger
- React-runtimescheduler
- React-utils
- - SocketRocket (= 0.7.0)
+ - SocketRocket (= 0.7.0.1)
- Yoga
- React-Core/Default (1000.0.0):
- glog
- - hermes-engine
- RCT-Folly (= 2023.08.07.00)
- React-cxxreact
- - React-hermes
+ - React-jsc
- React-jsi
- React-jsiexecutor
- React-perflogger
- React-runtimescheduler
- React-utils
- - SocketRocket (= 0.7.0)
+ - SocketRocket (= 0.7.0.1)
- Yoga
- React-Core/DevSupport (1000.0.0):
- glog
- - hermes-engine
- RCT-Folly (= 2023.08.07.00)
- React-Core/Default (= 1000.0.0)
- React-Core/RCTWebSocket (= 1000.0.0)
- React-cxxreact
- - React-hermes
+ - React-jsc
- React-jsi
- React-jsiexecutor
- React-jsinspector (= 1000.0.0)
- React-perflogger
- React-runtimescheduler
- React-utils
- - SocketRocket (= 0.7.0)
+ - SocketRocket (= 0.7.0.1)
- Yoga
- React-Core/RCTActionSheetHeaders (1000.0.0):
- glog
- - hermes-engine
- RCT-Folly (= 2023.08.07.00)
- React-Core/Default
- React-cxxreact
- - React-hermes
+ - React-jsc
- React-jsi
- React-jsiexecutor
- React-perflogger
- React-runtimescheduler
- React-utils
- - SocketRocket (= 0.7.0)
+ - SocketRocket (= 0.7.0.1)
- Yoga
- React-Core/RCTAnimationHeaders (1000.0.0):
- glog
- - hermes-engine
- RCT-Folly (= 2023.08.07.00)
- React-Core/Default
- React-cxxreact
- - React-hermes
+ - React-jsc
- React-jsi
- React-jsiexecutor
- React-perflogger
- React-runtimescheduler
- React-utils
- - SocketRocket (= 0.7.0)
+ - SocketRocket (= 0.7.0.1)
- Yoga
- React-Core/RCTBlobHeaders (1000.0.0):
- glog
- - hermes-engine
- RCT-Folly (= 2023.08.07.00)
- React-Core/Default
- React-cxxreact
- - React-hermes
+ - React-jsc
- React-jsi
- React-jsiexecutor
- React-perflogger
- React-runtimescheduler
- React-utils
- - SocketRocket (= 0.7.0)
+ - SocketRocket (= 0.7.0.1)
- Yoga
- React-Core/RCTImageHeaders (1000.0.0):
- glog
- - hermes-engine
- RCT-Folly (= 2023.08.07.00)
- React-Core/Default
- React-cxxreact
- - React-hermes
+ - React-jsc
- React-jsi
- React-jsiexecutor
- React-perflogger
- React-runtimescheduler
- React-utils
- - SocketRocket (= 0.7.0)
+ - SocketRocket (= 0.7.0.1)
- Yoga
- React-Core/RCTLinkingHeaders (1000.0.0):
- glog
- - hermes-engine
- RCT-Folly (= 2023.08.07.00)
- React-Core/Default
- React-cxxreact
- - React-hermes
+ - React-jsc
- React-jsi
- React-jsiexecutor
- React-perflogger
- React-runtimescheduler
- React-utils
- - SocketRocket (= 0.7.0)
+ - SocketRocket (= 0.7.0.1)
- Yoga
- React-Core/RCTNetworkHeaders (1000.0.0):
- glog
- - hermes-engine
- RCT-Folly (= 2023.08.07.00)
- React-Core/Default
- React-cxxreact
- - React-hermes
+ - React-jsc
- React-jsi
- React-jsiexecutor
- React-perflogger
- React-runtimescheduler
- React-utils
- - SocketRocket (= 0.7.0)
+ - SocketRocket (= 0.7.0.1)
- Yoga
- React-Core/RCTPushNotificationHeaders (1000.0.0):
- glog
- - hermes-engine
- RCT-Folly (= 2023.08.07.00)
- React-Core/Default
- React-cxxreact
- - React-hermes
+ - React-jsc
- React-jsi
- React-jsiexecutor
- React-perflogger
- React-runtimescheduler
- React-utils
- - SocketRocket (= 0.7.0)
+ - SocketRocket (= 0.7.0.1)
- Yoga
- React-Core/RCTSettingsHeaders (1000.0.0):
- glog
- - hermes-engine
- RCT-Folly (= 2023.08.07.00)
- React-Core/Default
- React-cxxreact
- - React-hermes
+ - React-jsc
- React-jsi
- React-jsiexecutor
- React-perflogger
- React-runtimescheduler
- React-utils
- - SocketRocket (= 0.7.0)
+ - SocketRocket (= 0.7.0.1)
- Yoga
- React-Core/RCTTextHeaders (1000.0.0):
- glog
- - hermes-engine
- RCT-Folly (= 2023.08.07.00)
- React-Core/Default
- React-cxxreact
- - React-hermes
+ - React-jsc
- React-jsi
- React-jsiexecutor
- React-perflogger
- React-runtimescheduler
- React-utils
- - SocketRocket (= 0.7.0)
+ - SocketRocket (= 0.7.0.1)
- Yoga
- React-Core/RCTVibrationHeaders (1000.0.0):
- glog
- - hermes-engine
- RCT-Folly (= 2023.08.07.00)
- React-Core/Default
- React-cxxreact
- - React-hermes
+ - React-jsc
- React-jsi
- React-jsiexecutor
- React-perflogger
- React-runtimescheduler
- React-utils
- - SocketRocket (= 0.7.0)
+ - SocketRocket (= 0.7.0.1)
- Yoga
- React-Core/RCTWebSocket (1000.0.0):
- glog
- - hermes-engine
- RCT-Folly (= 2023.08.07.00)
- React-Core/Default (= 1000.0.0)
- React-cxxreact
- - React-hermes
+ - React-jsc
- React-jsi
- React-jsiexecutor
- React-perflogger
- React-runtimescheduler
- React-utils
- - SocketRocket (= 0.7.0)
+ - SocketRocket (= 0.7.0.1)
- Yoga
- React-CoreModules (1000.0.0):
- RCT-Folly (= 2023.08.07.00)
@@ -297,13 +271,12 @@ PODS:
- React-RCTBlob
- React-RCTImage (= 1000.0.0)
- ReactCommon/turbomodule/core (= 1000.0.0)
- - SocketRocket (= 0.7.0)
+ - SocketRocket (= 0.7.0.1)
- React-cxxreact (1000.0.0):
- boost (= 1.83.0)
- DoubleConversion
- fmt (= 9.1.0)
- glog
- - hermes-engine
- RCT-Folly (= 2023.08.07.00)
- React-callinvoker (= 1000.0.0)
- React-debug (= 1000.0.0)
@@ -317,7 +290,6 @@ PODS:
- DoubleConversion
- fmt (= 9.1.0)
- glog
- - hermes-engine
- RCT-Folly/Fabric (= 2023.08.07.00)
- RCTRequired (= 1000.0.0)
- RCTTypeSafety (= 1000.0.0)
@@ -339,7 +311,7 @@ PODS:
- React-Fabric/textlayoutmanager (= 1000.0.0)
- React-Fabric/uimanager (= 1000.0.0)
- React-graphics (= 1000.0.0)
- - React-jsi (= 1000.0.0)
+ - React-jsi
- React-jsiexecutor (= 1000.0.0)
- React-logger
- React-rendererdebug
@@ -350,7 +322,6 @@ PODS:
- DoubleConversion
- fmt (= 9.1.0)
- glog
- - hermes-engine
- RCT-Folly/Fabric (= 2023.08.07.00)
- RCTRequired (= 1000.0.0)
- RCTTypeSafety (= 1000.0.0)
@@ -358,7 +329,7 @@ PODS:
- React-cxxreact
- React-debug
- React-graphics (= 1000.0.0)
- - React-jsi (= 1000.0.0)
+ - React-jsi
- React-jsiexecutor (= 1000.0.0)
- React-logger
- React-rendererdebug
@@ -369,7 +340,6 @@ PODS:
- DoubleConversion
- fmt (= 9.1.0)
- glog
- - hermes-engine
- RCT-Folly/Fabric (= 2023.08.07.00)
- RCTRequired (= 1000.0.0)
- RCTTypeSafety (= 1000.0.0)
@@ -377,7 +347,7 @@ PODS:
- React-cxxreact
- React-debug
- React-graphics (= 1000.0.0)
- - React-jsi (= 1000.0.0)
+ - React-jsi
- React-jsiexecutor (= 1000.0.0)
- React-logger
- React-rendererdebug
@@ -388,7 +358,6 @@ PODS:
- DoubleConversion
- fmt (= 9.1.0)
- glog
- - hermes-engine
- RCT-Folly/Fabric (= 2023.08.07.00)
- RCTRequired (= 1000.0.0)
- RCTTypeSafety (= 1000.0.0)
@@ -396,7 +365,7 @@ PODS:
- React-cxxreact
- React-debug
- React-graphics (= 1000.0.0)
- - React-jsi (= 1000.0.0)
+ - React-jsi
- React-jsiexecutor (= 1000.0.0)
- React-logger
- React-rendererdebug
@@ -407,7 +376,6 @@ PODS:
- DoubleConversion
- fmt (= 9.1.0)
- glog
- - hermes-engine
- RCT-Folly/Fabric (= 2023.08.07.00)
- RCTRequired (= 1000.0.0)
- RCTTypeSafety (= 1000.0.0)
@@ -415,7 +383,7 @@ PODS:
- React-cxxreact
- React-debug
- React-graphics (= 1000.0.0)
- - React-jsi (= 1000.0.0)
+ - React-jsi
- React-jsiexecutor (= 1000.0.0)
- React-logger
- React-rendererdebug
@@ -426,7 +394,6 @@ PODS:
- DoubleConversion
- fmt (= 9.1.0)
- glog
- - hermes-engine
- RCT-Folly/Fabric (= 2023.08.07.00)
- RCTRequired (= 1000.0.0)
- RCTTypeSafety (= 1000.0.0)
@@ -445,7 +412,7 @@ PODS:
- React-Fabric/components/unimplementedview (= 1000.0.0)
- React-Fabric/components/view (= 1000.0.0)
- React-graphics (= 1000.0.0)
- - React-jsi (= 1000.0.0)
+ - React-jsi
- React-jsiexecutor (= 1000.0.0)
- React-logger
- React-rendererdebug
@@ -456,7 +423,6 @@ PODS:
- DoubleConversion
- fmt (= 9.1.0)
- glog
- - hermes-engine
- RCT-Folly/Fabric (= 2023.08.07.00)
- RCTRequired (= 1000.0.0)
- RCTTypeSafety (= 1000.0.0)
@@ -464,7 +430,7 @@ PODS:
- React-cxxreact
- React-debug
- React-graphics (= 1000.0.0)
- - React-jsi (= 1000.0.0)
+ - React-jsi
- React-jsiexecutor (= 1000.0.0)
- React-logger
- React-rendererdebug
@@ -475,7 +441,6 @@ PODS:
- DoubleConversion
- fmt (= 9.1.0)
- glog
- - hermes-engine
- RCT-Folly/Fabric (= 2023.08.07.00)
- RCTRequired (= 1000.0.0)
- RCTTypeSafety (= 1000.0.0)
@@ -483,7 +448,7 @@ PODS:
- React-cxxreact
- React-debug
- React-graphics (= 1000.0.0)
- - React-jsi (= 1000.0.0)
+ - React-jsi
- React-jsiexecutor (= 1000.0.0)
- React-logger
- React-rendererdebug
@@ -494,7 +459,6 @@ PODS:
- DoubleConversion
- fmt (= 9.1.0)
- glog
- - hermes-engine
- RCT-Folly/Fabric (= 2023.08.07.00)
- RCTRequired (= 1000.0.0)
- RCTTypeSafety (= 1000.0.0)
@@ -502,7 +466,7 @@ PODS:
- React-cxxreact
- React-debug
- React-graphics (= 1000.0.0)
- - React-jsi (= 1000.0.0)
+ - React-jsi
- React-jsiexecutor (= 1000.0.0)
- React-logger
- React-rendererdebug
@@ -513,7 +477,6 @@ PODS:
- DoubleConversion
- fmt (= 9.1.0)
- glog
- - hermes-engine
- RCT-Folly/Fabric (= 2023.08.07.00)
- RCTRequired (= 1000.0.0)
- RCTTypeSafety (= 1000.0.0)
@@ -521,7 +484,7 @@ PODS:
- React-cxxreact
- React-debug
- React-graphics (= 1000.0.0)
- - React-jsi (= 1000.0.0)
+ - React-jsi
- React-jsiexecutor (= 1000.0.0)
- React-logger
- React-rendererdebug
@@ -532,7 +495,6 @@ PODS:
- DoubleConversion
- fmt (= 9.1.0)
- glog
- - hermes-engine
- RCT-Folly/Fabric (= 2023.08.07.00)
- RCTRequired (= 1000.0.0)
- RCTTypeSafety (= 1000.0.0)
@@ -540,7 +502,7 @@ PODS:
- React-cxxreact
- React-debug
- React-graphics (= 1000.0.0)
- - React-jsi (= 1000.0.0)
+ - React-jsi
- React-jsiexecutor (= 1000.0.0)
- React-logger
- React-rendererdebug
@@ -551,7 +513,6 @@ PODS:
- DoubleConversion
- fmt (= 9.1.0)
- glog
- - hermes-engine
- RCT-Folly/Fabric (= 2023.08.07.00)
- RCTRequired (= 1000.0.0)
- RCTTypeSafety (= 1000.0.0)
@@ -559,7 +520,7 @@ PODS:
- React-cxxreact
- React-debug
- React-graphics (= 1000.0.0)
- - React-jsi (= 1000.0.0)
+ - React-jsi
- React-jsiexecutor (= 1000.0.0)
- React-logger
- React-rendererdebug
@@ -570,7 +531,6 @@ PODS:
- DoubleConversion
- fmt (= 9.1.0)
- glog
- - hermes-engine
- RCT-Folly/Fabric (= 2023.08.07.00)
- RCTRequired (= 1000.0.0)
- RCTTypeSafety (= 1000.0.0)
@@ -578,7 +538,7 @@ PODS:
- React-cxxreact
- React-debug
- React-graphics (= 1000.0.0)
- - React-jsi (= 1000.0.0)
+ - React-jsi
- React-jsiexecutor (= 1000.0.0)
- React-logger
- React-rendererdebug
@@ -589,7 +549,6 @@ PODS:
- DoubleConversion
- fmt (= 9.1.0)
- glog
- - hermes-engine
- RCT-Folly/Fabric (= 2023.08.07.00)
- RCTRequired (= 1000.0.0)
- RCTTypeSafety (= 1000.0.0)
@@ -597,7 +556,7 @@ PODS:
- React-cxxreact
- React-debug
- React-graphics (= 1000.0.0)
- - React-jsi (= 1000.0.0)
+ - React-jsi
- React-jsiexecutor (= 1000.0.0)
- React-logger
- React-rendererdebug
@@ -608,7 +567,6 @@ PODS:
- DoubleConversion
- fmt (= 9.1.0)
- glog
- - hermes-engine
- RCT-Folly/Fabric (= 2023.08.07.00)
- RCTRequired (= 1000.0.0)
- RCTTypeSafety (= 1000.0.0)
@@ -616,7 +574,7 @@ PODS:
- React-cxxreact
- React-debug
- React-graphics (= 1000.0.0)
- - React-jsi (= 1000.0.0)
+ - React-jsi
- React-jsiexecutor (= 1000.0.0)
- React-logger
- React-rendererdebug
@@ -627,7 +585,6 @@ PODS:
- DoubleConversion
- fmt (= 9.1.0)
- glog
- - hermes-engine
- RCT-Folly/Fabric (= 2023.08.07.00)
- RCTRequired (= 1000.0.0)
- RCTTypeSafety (= 1000.0.0)
@@ -635,7 +592,7 @@ PODS:
- React-cxxreact
- React-debug
- React-graphics (= 1000.0.0)
- - React-jsi (= 1000.0.0)
+ - React-jsi
- React-jsiexecutor (= 1000.0.0)
- React-logger
- React-rendererdebug
@@ -646,7 +603,6 @@ PODS:
- DoubleConversion
- fmt (= 9.1.0)
- glog
- - hermes-engine
- RCT-Folly/Fabric (= 2023.08.07.00)
- RCTRequired (= 1000.0.0)
- RCTTypeSafety (= 1000.0.0)
@@ -654,7 +610,7 @@ PODS:
- React-cxxreact
- React-debug
- React-graphics (= 1000.0.0)
- - React-jsi (= 1000.0.0)
+ - React-jsi
- React-jsiexecutor (= 1000.0.0)
- React-logger
- React-rendererdebug
@@ -666,7 +622,6 @@ PODS:
- DoubleConversion
- fmt (= 9.1.0)
- glog
- - hermes-engine
- RCT-Folly/Fabric (= 2023.08.07.00)
- RCTRequired (= 1000.0.0)
- RCTTypeSafety (= 1000.0.0)
@@ -674,7 +629,7 @@ PODS:
- React-cxxreact
- React-debug
- React-graphics (= 1000.0.0)
- - React-jsi (= 1000.0.0)
+ - React-jsi
- React-jsiexecutor (= 1000.0.0)
- React-logger
- React-rendererdebug
@@ -685,7 +640,6 @@ PODS:
- DoubleConversion
- fmt (= 9.1.0)
- glog
- - hermes-engine
- RCT-Folly/Fabric (= 2023.08.07.00)
- RCTRequired (= 1000.0.0)
- RCTTypeSafety (= 1000.0.0)
@@ -693,7 +647,7 @@ PODS:
- React-cxxreact
- React-debug
- React-graphics (= 1000.0.0)
- - React-jsi (= 1000.0.0)
+ - React-jsi
- React-jsiexecutor (= 1000.0.0)
- React-logger
- React-rendererdebug
@@ -704,7 +658,6 @@ PODS:
- DoubleConversion
- fmt (= 9.1.0)
- glog
- - hermes-engine
- RCT-Folly/Fabric (= 2023.08.07.00)
- RCTRequired (= 1000.0.0)
- RCTTypeSafety (= 1000.0.0)
@@ -712,7 +665,7 @@ PODS:
- React-cxxreact
- React-debug
- React-graphics (= 1000.0.0)
- - React-jsi (= 1000.0.0)
+ - React-jsi
- React-jsiexecutor (= 1000.0.0)
- React-logger
- React-rendererdebug
@@ -723,7 +676,6 @@ PODS:
- DoubleConversion
- fmt (= 9.1.0)
- glog
- - hermes-engine
- RCT-Folly/Fabric (= 2023.08.07.00)
- RCTRequired (= 1000.0.0)
- RCTTypeSafety (= 1000.0.0)
@@ -731,7 +683,7 @@ PODS:
- React-cxxreact
- React-debug
- React-graphics (= 1000.0.0)
- - React-jsi (= 1000.0.0)
+ - React-jsi
- React-jsiexecutor (= 1000.0.0)
- React-logger
- React-rendererdebug
@@ -742,7 +694,6 @@ PODS:
- DoubleConversion
- fmt (= 9.1.0)
- glog
- - hermes-engine
- RCT-Folly/Fabric (= 2023.08.07.00)
- RCTRequired (= 1000.0.0)
- RCTTypeSafety (= 1000.0.0)
@@ -750,7 +701,7 @@ PODS:
- React-cxxreact
- React-debug
- React-graphics (= 1000.0.0)
- - React-jsi (= 1000.0.0)
+ - React-jsi
- React-jsiexecutor (= 1000.0.0)
- React-logger
- React-rendererdebug
@@ -761,7 +712,6 @@ PODS:
- DoubleConversion
- fmt (= 9.1.0)
- glog
- - hermes-engine
- RCT-Folly/Fabric (= 2023.08.07.00)
- RCTRequired (= 1000.0.0)
- RCTTypeSafety (= 1000.0.0)
@@ -769,7 +719,7 @@ PODS:
- React-cxxreact
- React-debug
- React-graphics (= 1000.0.0)
- - React-jsi (= 1000.0.0)
+ - React-jsi
- React-jsiexecutor (= 1000.0.0)
- React-logger
- React-rendererdebug
@@ -780,7 +730,6 @@ PODS:
- DoubleConversion
- fmt (= 9.1.0)
- glog
- - hermes-engine
- RCT-Folly/Fabric (= 2023.08.07.00)
- RCTRequired (= 1000.0.0)
- RCTTypeSafety (= 1000.0.0)
@@ -788,7 +737,7 @@ PODS:
- React-cxxreact
- React-debug
- React-graphics (= 1000.0.0)
- - React-jsi (= 1000.0.0)
+ - React-jsi
- React-jsiexecutor (= 1000.0.0)
- React-logger
- React-rendererdebug
@@ -799,7 +748,6 @@ PODS:
- DoubleConversion
- fmt (= 9.1.0)
- glog
- - hermes-engine
- RCT-Folly/Fabric (= 2023.08.07.00)
- RCTRequired (= 1000.0.0)
- RCTTypeSafety (= 1000.0.0)
@@ -808,7 +756,7 @@ PODS:
- React-debug
- React-Fabric/uimanager
- React-graphics (= 1000.0.0)
- - React-jsi (= 1000.0.0)
+ - React-jsi
- React-jsiexecutor (= 1000.0.0)
- React-logger
- React-rendererdebug
@@ -819,7 +767,6 @@ PODS:
- DoubleConversion
- fmt (= 9.1.0)
- glog
- - hermes-engine
- RCT-Folly/Fabric (= 2023.08.07.00)
- RCTRequired (= 1000.0.0)
- RCTTypeSafety (= 1000.0.0)
@@ -827,7 +774,7 @@ PODS:
- React-cxxreact
- React-debug
- React-graphics (= 1000.0.0)
- - React-jsi (= 1000.0.0)
+ - React-jsi
- React-jsiexecutor (= 1000.0.0)
- React-logger
- React-rendererdebug
@@ -838,14 +785,13 @@ PODS:
- DoubleConversion
- fmt (= 9.1.0)
- glog
- - hermes-engine
- RCT-Folly/Fabric (= 2023.08.07.00)
- RCTRequired (= 1000.0.0)
- RCTTypeSafety (= 1000.0.0)
- React-Fabric
- React-graphics (= 1000.0.0)
- React-ImageManager
- - React-jsi (= 1000.0.0)
+ - React-jsi
- React-jsiexecutor (= 1000.0.0)
- React-logger
- React-rendererdebug
@@ -857,17 +803,6 @@ PODS:
- RCT-Folly/Fabric (= 2023.08.07.00)
- React-Core/Default (= 1000.0.0)
- React-utils
- - React-hermes (1000.0.0):
- - DoubleConversion
- - fmt (= 9.1.0)
- - glog
- - hermes-engine
- - RCT-Folly (= 2023.08.07.00)
- - React-cxxreact (= 1000.0.0)
- - React-jsi
- - React-jsiexecutor (= 1000.0.0)
- - React-jsinspector (= 1000.0.0)
- - React-perflogger (= 1000.0.0)
- React-ImageManager (1000.0.0):
- glog
- RCT-Folly/Fabric
@@ -877,6 +812,11 @@ PODS:
- React-RCTImage
- React-rendererdebug
- React-utils
+ - React-jsc (1000.0.0):
+ - React-jsc/Fabric (= 1000.0.0)
+ - React-jsi (= 1000.0.0)
+ - React-jsc/Fabric (1000.0.0):
+ - React-jsi (= 1000.0.0)
- React-jserrorhandler (1000.0.0):
- RCT-Folly/Fabric (= 2023.08.07.00)
- React-jsi (= 1000.0.0)
@@ -891,7 +831,6 @@ PODS:
- DoubleConversion
- fmt (= 9.1.0)
- glog
- - hermes-engine
- RCT-Folly (= 2023.08.07.00)
- React-cxxreact (= 1000.0.0)
- React-jsi (= 1000.0.0)
@@ -905,7 +844,6 @@ PODS:
- React-nativeconfig (1000.0.0)
- React-NativeModulesApple (1000.0.0):
- glog
- - hermes-engine
- React-callinvoker
- React-Core
- React-cxxreact
@@ -929,7 +867,7 @@ PODS:
- RCTTypeSafety
- React-Core
- React-CoreModules
- - React-hermes
+ - React-jsc
- React-nativeconfig
- React-NativeModulesApple
- React-RCTFabric
@@ -938,7 +876,6 @@ PODS:
- React-runtimescheduler
- ReactCommon/turbomodule/core
- React-RCTBlob (1000.0.0):
- - hermes-engine
- RCT-Folly (= 2023.08.07.00)
- React-Codegen (= 1000.0.0)
- React-Core/RCTBlobHeaders (= 1000.0.0)
@@ -948,7 +885,6 @@ PODS:
- ReactCommon/turbomodule/core (= 1000.0.0)
- React-RCTFabric (1000.0.0):
- glog
- - hermes-engine
- RCT-Folly/Fabric (= 2023.08.07.00)
- React-Core (= 1000.0.0)
- React-debug
@@ -956,6 +892,7 @@ PODS:
- React-FabricImage
- React-graphics
- React-ImageManager
+ - React-jsi
- React-nativeconfig
- React-RCTImage (= 1000.0.0)
- React-RCTText
@@ -1021,9 +958,9 @@ PODS:
- React-jsi (= 1000.0.0)
- React-runtimescheduler (1000.0.0):
- glog
- - hermes-engine
- RCT-Folly (= 2023.08.07.00)
- React-callinvoker
+ - React-cxxreact
- React-debug
- React-jsi
- React-rendererdebug
@@ -1036,18 +973,17 @@ PODS:
- ReactCommon-Samples (1000.0.0):
- DoubleConversion
- fmt (= 9.1.0)
- - hermes-engine
- RCT-Folly
- React-Codegen
- React-Core
- React-cxxreact
+ - React-jsi
- React-NativeModulesApple
- ReactCommon/turbomodule/core
- ReactCommon/turbomodule/bridging (1000.0.0):
- DoubleConversion
- fmt (= 9.1.0)
- glog
- - hermes-engine
- RCT-Folly (= 2023.08.07.00)
- React-callinvoker (= 1000.0.0)
- React-cxxreact (= 1000.0.0)
@@ -1058,7 +994,6 @@ PODS:
- DoubleConversion
- fmt (= 9.1.0)
- glog
- - hermes-engine
- RCT-Folly (= 2023.08.07.00)
- React-callinvoker (= 1000.0.0)
- React-cxxreact (= 1000.0.0)
@@ -1069,7 +1004,7 @@ PODS:
- glog
- RCT-Folly (= 2023.08.07.00)
- React-Core
- - SocketRocket (0.7.0)
+ - SocketRocket (0.7.0.1)
- Yoga (1.14.0)
DEPENDENCIES:
@@ -1079,9 +1014,6 @@ DEPENDENCIES:
- FBReactNativeSpec (from `../react-native/React/FBReactNativeSpec`)
- fmt (from `../react-native/third-party-podspecs/fmt.podspec`)
- glog (from `../react-native/third-party-podspecs/glog.podspec`)
- - hermes-engine (from `../react-native/sdks/hermes-engine/hermes-engine.podspec`)
- - libevent (~> 2.1.12)
- - OCMock (~> 3.9.1)
- RCT-Folly (from `../react-native/third-party-podspecs/RCT-Folly.podspec`)
- RCT-Folly/Fabric (from `../react-native/third-party-podspecs/RCT-Folly.podspec`)
- RCTRequired (from `../react-native/Libraries/Required`)
@@ -1097,8 +1029,9 @@ DEPENDENCIES:
- React-Fabric (from `../react-native/ReactCommon`)
- React-FabricImage (from `../react-native/ReactCommon`)
- React-graphics (from `../react-native/ReactCommon/react/renderer/graphics`)
- - React-hermes (from `../react-native/ReactCommon/hermes`)
- React-ImageManager (from `../react-native/ReactCommon/react/renderer/imagemanager/platform/ios`)
+ - React-jsc (from `../react-native/ReactCommon/jsc`)
+ - React-jsc/Fabric (from `../react-native/ReactCommon/jsc`)
- React-jserrorhandler (from `../react-native/ReactCommon/jserrorhandler`)
- React-jsi (from `../react-native/ReactCommon/jsi`)
- React-jsiexecutor (from `../react-native/ReactCommon/jsiexecutor`)
@@ -1129,14 +1062,9 @@ DEPENDENCIES:
- ReactCommon-Samples (from `../react-native/ReactCommon/react/nativemodule/samples`)
- ReactCommon/turbomodule/core (from `../react-native/ReactCommon`)
- ScreenshotManager (from `NativeModuleExample`)
+ - SocketRocket (from `../react-native/third-party-podspecs/SocketRocket.podspec`)
- Yoga (from `../react-native/ReactCommon/yoga`)
-SPEC REPOS:
- trunk:
- - libevent
- - OCMock
- - SocketRocket
-
EXTERNAL SOURCES:
boost:
:podspec: "../react-native/third-party-podspecs/boost.podspec"
@@ -1150,9 +1078,6 @@ EXTERNAL SOURCES:
:podspec: "../react-native/third-party-podspecs/fmt.podspec"
glog:
:podspec: "../react-native/third-party-podspecs/glog.podspec"
- hermes-engine:
- :podspec: "../react-native/sdks/hermes-engine/hermes-engine.podspec"
- :tag: ''
RCT-Folly:
:podspec: "../react-native/third-party-podspecs/RCT-Folly.podspec"
RCTRequired:
@@ -1179,10 +1104,10 @@ EXTERNAL SOURCES:
:path: "../react-native/ReactCommon"
React-graphics:
:path: "../react-native/ReactCommon/react/renderer/graphics"
- React-hermes:
- :path: "../react-native/ReactCommon/hermes"
React-ImageManager:
:path: "../react-native/ReactCommon/react/renderer/imagemanager/platform/ios"
+ React-jsc:
+ :path: "../react-native/ReactCommon/jsc"
React-jserrorhandler:
:path: "../react-native/ReactCommon/jserrorhandler"
React-jsi:
@@ -1243,67 +1168,66 @@ EXTERNAL SOURCES:
:path: "../react-native/ReactCommon/react/nativemodule/samples"
ScreenshotManager:
:path: NativeModuleExample
+ SocketRocket:
+ :podspec: "../react-native/third-party-podspecs/SocketRocket.podspec"
Yoga:
:path: "../react-native/ReactCommon/yoga"
SPEC CHECKSUMS:
- boost: 26fad476bfa736552bbfa698a06cc530475c1505
- DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953
- FBLazyVector: 43f93051832e03bd2862aa5705a8d6286d489c7b
- FBReactNativeSpec: 435e3f74da6e06596f2f3eb2ef154c348c1fa4c5
- fmt: 4c2741a687cc09f0634a2e2c72a838b99f1ff120
- glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2
- hermes-engine: 5b957e2b1bc248ee52eaaffbd39056cd49cbedfa
- libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
- OCMock: 9491e4bec59e0b267d52a9184ff5605995e74be8
- RCT-Folly: 3edb9330ce752fe48b85e6c8a65506033f95f4b9
- RCTRequired: 50d04f276bb3293f8db92e39c7d47d5beb0beb0b
- RCTTypeSafety: 0918b2a09cacf134da18081e75025aa450212e30
- React: 82837b785c087ae2627ef81a8b17167fcde35640
- React-callinvoker: 9c27ed29c8d60a13d37878ff7bdc575e973335a1
- React-Codegen: 05b37234a5252f99c890f3e2544b278827b613ca
- React-Core: 016adad37b605893752aa5ad434cc550aeed1b66
- React-CoreModules: a9b7f506cfbed21ca2b1badcb060ad5428a8a67e
- React-cxxreact: 6dc2309e559e2f1a0ad6dd91e8bbd7dc222b4a4c
- React-debug: 52a9b1b03f6ca4b6bee1d983f278d2572e288c23
- React-Fabric: c0d8b9fce1ed4a13eb952f812ec32dbe52b9b50f
- React-FabricImage: 7e3d8b3f312b15d6e03aa02f2b9118ea67b28a92
- React-graphics: 73aa28d1a6a7da9f1d1ebe9767a77eedf9c7ca63
- React-hermes: 8cc7d97d9ab6d757caeefc035e20c70197fd7532
- React-ImageManager: a1eb4d34a21188558f78ae4b8f069c428a32daa3
- React-jserrorhandler: 9474d59b020e709ca2354023b09384ba7f6bbb82
- React-jsi: 71027d70650d2c3611071ad90a4a51072b8e1aee
- React-jsiexecutor: aeeff4184e288dec6cf0f0c7c6e284bef7035937
- React-jsinspector: 307cf99c99fb2412b8462584750e3056203779b5
- React-logger: 2ce299f7ba886013bc7d89e0fadc0fe9e5b44bde
- React-Mapbuffer: 1ee84f85e8c02f2ff29035d6b21385db59d1d531
- React-nativeconfig: 5e6e122ce27878bcf6a35a4370099d07db1e2238
- React-NativeModulesApple: 25945f2f3e4df06bfeb2f7eb207ee3b218aa6932
- React-perflogger: e2df5a18ce247143195df118612140cad5dd76b6
- React-RCTActionSheet: 22226e928d8a400604bac1ad451683acd8a7cf27
- React-RCTAnimation: 161de0ea5b66c215ad7f650d3f7c486c99627e16
- React-RCTAppDelegate: 2f6243fc35be00835ea3a3ec5552ed18a138eb4e
- React-RCTBlob: d3f90507c9cba09c806e4f7b89ee24468c26eaf3
- React-RCTFabric: 71e066fb8e63c1d266bb412cbe6140b715f126e6
- React-RCTImage: 481bfb64008e19d6185349a4f37a835d7ead028c
- React-RCTLinking: 23b103a68352a995dd4d53868448e971f1da3c74
- React-RCTNetwork: 0635c6a6f8802485840907e962979a4d781dd893
- React-RCTPushNotification: 2ade6aaecce3c52d398de3e3bd913a5902c56644
- React-RCTSettings: 5e780bd1ba78aa9e8ff4fd03854291c5278cb7b7
- React-RCTTest: 02963cac7849d568858d1c149096c4865c0f39d6
- React-RCTText: fc1d9e3c8256314e660146f513fca689c8b62f66
- React-RCTVibration: 18fd0f93e1f80a1bf3683143a6d8e60537a57a8f
- React-rendererdebug: 9561f232529d90da4f7fc22fb1527ba74c424625
- React-rncore: 23af9b8bee03cb76801c6a901f93ed15e6a98ae9
- React-runtimeexecutor: 90c1a545cec8636bff59d99ff4f9790c66fb91ca
- React-runtimescheduler: c461f9023469e82a9805d58f5d7529e5b680d863
- React-utils: e12647a82af88461f68c0623908d3ecf92873bb9
- ReactCommon: b5e00c5199a10583ec367b38e964df27f88b1521
- ReactCommon-Samples: 23ae71c0c1c3eaed67da997be3742c6feb7f9b9c
- ScreenshotManager: 2b23b74d25f5e307f7b4d21173a61a3934e69475
- SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
- Yoga: fb79f7ef3685dd4f620174459e29bd575334cde3
+ boost: 3f76a4d6d9d0f232d25b7782f83fcf988f47d517
+ DoubleConversion: 71bf0761505a44e4dfddc0aa04afa049fdfb63b5
+ FBLazyVector: 03d09da8b28e51e6875ca70a13abfbe9fd3bf0a9
+ FBReactNativeSpec: 57aba6ec82355626bdbdc7fd33d304b6e9536184
+ fmt: 5d9ffa7ccba126c08b730252123601d514652320
+ glog: 4f05d17aa39a829fee878689fc9a41af587fabba
+ RCT-Folly: 35de8f372fc3e617131511a6f16028db5c3db620
+ RCTRequired: 32995b086b46936af29f524bcc0cb79652602880
+ RCTTypeSafety: 462e963599ca8f3c3907764e61b16144b485c081
+ React: 595d23b1bcd67c5840231c817dd6f81505b6bb1b
+ React-callinvoker: b5d8e1e5906dd8630610bd7846fc3e66c4f5e11b
+ React-Codegen: cf0df8a0b283dbc95590d1d523511b1278f0aeaf
+ React-Core: 38b2d0ef527b080cf8eab19886800456a4b8e57f
+ React-CoreModules: dd649f75bc4b42caffce04b7461dfdbc1ce7e909
+ React-cxxreact: ed4815bd2bcec801770bc68c317551587a2e4130
+ React-debug: bf17536239f9ec991de4159a02b9b7cda303546f
+ React-Fabric: e6e685c31900dae2c75f1b9b1d569e947a52fe77
+ React-FabricImage: da62493c9b2744ebf380aeb1edb55920a7ac9709
+ React-graphics: 6bc56cffb12ad3db9000316584de28b491360e11
+ React-ImageManager: 1a301b8cdd395b6f873fd9aea9ac192da58ff72e
+ React-jsc: 088ee5083396faa3c2635ae0590aca0f29b88d9a
+ React-jserrorhandler: 665b25751f56e4d53a9f621b50c1b4c1cb377b75
+ React-jsi: 7dad41d310534c1ad8a45e4f5f0578837e5fb434
+ React-jsiexecutor: 5ec3b6e11ee8490a95553aa9102b4926f3fad5e1
+ React-jsinspector: c73a67371e0ed16797115d3eb0b7e31881fa590e
+ React-logger: 1fb5ac1074ed6303a72c5342233391c3901a6983
+ React-Mapbuffer: a4a19b2bb75fc2266edb1ac4e8edf8d0fd0d1215
+ React-nativeconfig: b5fe5cd512c653496d62f596d84cf353478cc448
+ React-NativeModulesApple: 6ec440eb225836c697f301f7627a32a378b5eb88
+ React-perflogger: 6e1e34f7b2483e598ac0982037631d717d1bd396
+ React-RCTActionSheet: 9e8912d390a10a3b1a557941faf7a843922c04dd
+ React-RCTAnimation: 1eb1d4aaaf45ebae7804b4ce4125391d10122c53
+ React-RCTAppDelegate: 418882a75cdd971947616fe4200c4ef85af3fc49
+ React-RCTBlob: 69c76bb89505b34395cae11c79570a8521fec505
+ React-RCTFabric: 1315af871c6f8cd104682d1e71edd3602b962ec0
+ React-RCTImage: 578925206e8dc284dd6fd02cb36cb4cf45a45998
+ React-RCTLinking: 085e37c7a9b931b097975bb98fb78d95761a02b5
+ React-RCTNetwork: cd2974423f7cf55de8c40223bb9319ac747b90ec
+ React-RCTPushNotification: f8d38fb15ee3c00631a7c260cf7ee5d7c4b2afba
+ React-RCTSettings: f0519c784147aec5f5aa452fc83e348735e76803
+ React-RCTTest: e57a2b8e688ed4dc913f0653549d9de931889d8f
+ React-RCTText: b887568977f9aed8c385da6ed1deecc9fc02e4f1
+ React-RCTVibration: 360004f3382d2644b64f8c1f59aa2322e046058b
+ React-rendererdebug: f086f35ac9daf03fbd77472b2e56c8820ae2742d
+ React-rncore: efc20034e55f05d192cf7bbc7e78258122f6c7e4
+ React-runtimeexecutor: e33022df6aff3defd9831172fee0503b57558107
+ React-runtimescheduler: e11aad4333166a323ce3147e81b7bc109849031c
+ React-utils: 6f4dac790091dd2d335fd5c0f2a098a29d9c3b09
+ ReactCommon: cec7d2230ce255cd3a5c2b146c05d782dcc766e6
+ ReactCommon-Samples: 702e409e2117dfe7cce8a48447cff51d1358e635
+ ScreenshotManager: b0e7b89964062d8655305156cd9c7ad0c836099f
+ SocketRocket: ce0a5a2620a4f749f45e494f1efa59d82e8b37f2
+ Yoga: e8fb7473f2d90a5eb29c92cf9175e4118296d087
-PODFILE CHECKSUM: c0120ff99aea9c7141bc22179e0f6be99c81a601
+PODFILE CHECKSUM: 011aeacfa9a55464d54974a9cc640af93fc896ce
COCOAPODS: 1.13.0
diff --git a/packages/rn-tester/RNTester/AppDelegate.mm b/packages/rn-tester/RNTester/AppDelegate.mm
index 16a33fa3cab524..d29a54cfa3246d 100644
--- a/packages/rn-tester/RNTester/AppDelegate.mm
+++ b/packages/rn-tester/RNTester/AppDelegate.mm
@@ -12,7 +12,7 @@
#import
#import
-#if !TARGET_OS_TV && !TARGET_OS_UIKITFORMAC
+#if !TARGET_OS_TV && !TARGET_OS_UIKITFORMAC && !TARGET_OS_VISION
#import
#endif
@@ -86,7 +86,7 @@ - (void)loadSourceForBridge:(RCTBridge *)bridge
return nullptr;
}
-#if !TARGET_OS_TV && !TARGET_OS_UIKITFORMAC
+#if !TARGET_OS_TV && !TARGET_OS_UIKITFORMAC && !TARGET_OS_VISION
// Required for the remoteNotificationsRegistered event.
- (void)application:(__unused UIApplication *)application
diff --git a/packages/rn-tester/RNTesterPods.xcodeproj/project.pbxproj b/packages/rn-tester/RNTesterPods.xcodeproj/project.pbxproj
index ff0cf5e629d1e3..5ac7883390f36f 100644
--- a/packages/rn-tester/RNTesterPods.xcodeproj/project.pbxproj
+++ b/packages/rn-tester/RNTesterPods.xcodeproj/project.pbxproj
@@ -377,7 +377,6 @@
13B07F8E1A680F5B00A75B9A /* Resources */,
68CD48B71D2BCB2C007E06A9 /* Build JS Bundle */,
79E8BE2B119D4C5CCD2F04B3 /* [RN] Copy Hermes Framework */,
- 02B6FEF7E86B613B42F31284 /* [CP] Embed Pods Frameworks */,
5625E703156DD564DE9175B0 /* [CP] Copy Pods Resources */,
);
buildRules = (
@@ -397,7 +396,6 @@
E7DB209B22B2BA84005AC45F /* Sources */,
E7DB209C22B2BA84005AC45F /* Frameworks */,
E7DB209D22B2BA84005AC45F /* Resources */,
- A904658C20543C2EDC217D15 /* [CP] Embed Pods Frameworks */,
01934C30687B8C926E4F59CD /* [CP] Copy Pods Resources */,
);
buildRules = (
@@ -418,7 +416,6 @@
E7DB214F22B2F332005AC45F /* Sources */,
E7DB215022B2F332005AC45F /* Frameworks */,
E7DB215122B2F332005AC45F /* Resources */,
- 4F27ACC9DB890B37D6C267F1 /* [CP] Embed Pods Frameworks */,
E446637427ECD101CAACE52B /* [CP] Copy Pods Resources */,
);
buildRules = (
@@ -518,40 +515,6 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RNTesterUnitTests/Pods-RNTesterUnitTests-resources.sh\"\n";
showEnvVarsInLog = 0;
};
- 02B6FEF7E86B613B42F31284 /* [CP] Embed Pods Frameworks */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-RNTester/Pods-RNTester-frameworks-${CONFIGURATION}-input-files.xcfilelist",
- );
- name = "[CP] Embed Pods Frameworks";
- outputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-RNTester/Pods-RNTester-frameworks-${CONFIGURATION}-output-files.xcfilelist",
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RNTester/Pods-RNTester-frameworks.sh\"\n";
- showEnvVarsInLog = 0;
- };
- 4F27ACC9DB890B37D6C267F1 /* [CP] Embed Pods Frameworks */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-RNTesterIntegrationTests/Pods-RNTesterIntegrationTests-frameworks-${CONFIGURATION}-input-files.xcfilelist",
- );
- name = "[CP] Embed Pods Frameworks";
- outputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-RNTesterIntegrationTests/Pods-RNTesterIntegrationTests-frameworks-${CONFIGURATION}-output-files.xcfilelist",
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RNTesterIntegrationTests/Pods-RNTesterIntegrationTests-frameworks.sh\"\n";
- showEnvVarsInLog = 0;
- };
4F76596957F7356516B534CE /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@@ -625,23 +588,6 @@
shellPath = /bin/sh;
shellScript = ". ../react-native/sdks/hermes-engine/utils/copy-hermes-xcode.sh\n";
};
- A904658C20543C2EDC217D15 /* [CP] Embed Pods Frameworks */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-RNTesterUnitTests/Pods-RNTesterUnitTests-frameworks-${CONFIGURATION}-input-files.xcfilelist",
- );
- name = "[CP] Embed Pods Frameworks";
- outputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-RNTesterUnitTests/Pods-RNTesterUnitTests-frameworks-${CONFIGURATION}-output-files.xcfilelist",
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RNTesterUnitTests/Pods-RNTesterUnitTests-frameworks.sh\"\n";
- showEnvVarsInLog = 0;
- };
ABDE2A52ACD1B95E14790B5E /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@@ -815,9 +761,12 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.meta.RNTester.localDevelopment;
PRODUCT_NAME = RNTester;
+ SUPPORTED_PLATFORMS = "iphoneos iphonesimulator xros xrsimulator";
+ SUPPORTS_MACCATALYST = NO;
+ SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
- TARGETED_DEVICE_FAMILY = "1,2";
+ TARGETED_DEVICE_FAMILY = "1,2,7";
};
name = Debug;
};
@@ -854,8 +803,11 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.meta.RNTester.localDevelopment;
PRODUCT_NAME = RNTester;
+ SUPPORTED_PLATFORMS = "iphoneos iphonesimulator xros xrsimulator";
+ SUPPORTS_MACCATALYST = NO;
+ SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_VERSION = 5.0;
- TARGETED_DEVICE_FAMILY = "1,2";
+ TARGETED_DEVICE_FAMILY = "1,2,7";
};
name = Release;
};
@@ -949,12 +901,10 @@
OTHER_LDFLAGS = (
"-ObjC",
"-lc++",
- "-Wl",
- "-ld_classic",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../react-native";
SDKROOT = iphoneos;
- USE_HERMES = true;
+ USE_HERMES = false;
WARNING_CFLAGS = (
"-Wextra",
"-Wall",
@@ -1045,12 +995,10 @@
OTHER_LDFLAGS = (
"-ObjC",
"-lc++",
- "-Wl",
- "-ld_classic",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../react-native";
SDKROOT = iphoneos;
- USE_HERMES = true;
+ USE_HERMES = false;
VALIDATE_PRODUCT = YES;
WARNING_CFLAGS = (
"-Wextra",
From 3c76949d2ddb25d3c16aa9d2f32fe9beb0785385 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Oskar=20Kwas=CC=81niewski?=
Date: Sun, 8 Oct 2023 11:31:18 +0200
Subject: [PATCH 02/15] fix: address issues with scale, ScrollView prop
---
packages/react-native/React/Base/RCTUtils.m | 2 +-
packages/react-native/React/Modules/RCTUIManager.m | 2 --
packages/react-native/React/UIUtils/RCTUIUtils.m | 2 +-
.../React/Views/ScrollView/RCTScrollViewManager.m | 5 +++--
.../samples/platform/ios/ReactCommon/RCTSampleTurboModule.mm | 5 ++++-
5 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/packages/react-native/React/Base/RCTUtils.m b/packages/react-native/React/Base/RCTUtils.m
index 49fe1d9985a0f8..19362b6746b6d6 100644
--- a/packages/react-native/React/Base/RCTUtils.m
+++ b/packages/react-native/React/Base/RCTUtils.m
@@ -317,7 +317,7 @@ CGFloat RCTScreenScale(void)
return screenScale;
#endif
- return 1;
+ return 2;
}
CGFloat RCTFontSizeMultiplier(void)
diff --git a/packages/react-native/React/Modules/RCTUIManager.m b/packages/react-native/React/Modules/RCTUIManager.m
index b8de9bcfca4fc0..ba4c895ca3d0d5 100644
--- a/packages/react-native/React/Modules/RCTUIManager.m
+++ b/packages/react-native/React/Modules/RCTUIManager.m
@@ -272,8 +272,6 @@ - (void)namedOrientationDidChange
body:orientationEvent];
#pragma clang diagnostic pop
#endif
- return;
-
}
- (dispatch_queue_t)methodQueue
diff --git a/packages/react-native/React/UIUtils/RCTUIUtils.m b/packages/react-native/React/UIUtils/RCTUIUtils.m
index 82411abebf7f2d..1a0005d90d93e2 100644
--- a/packages/react-native/React/UIUtils/RCTUIUtils.m
+++ b/packages/react-native/React/UIUtils/RCTUIUtils.m
@@ -23,7 +23,7 @@ RCTDimensions RCTGetDimensions(CGFloat fontScale)
CGSize windowSize = mainWindow ? mainWindow.bounds.size : screenSize;
CGFloat scale;
#if TARGET_OS_VISION
- scale = 1;
+ scale = 2;
#else
scale = mainScreen.scale;
#endif
diff --git a/packages/react-native/React/Views/ScrollView/RCTScrollViewManager.m b/packages/react-native/React/Views/ScrollView/RCTScrollViewManager.m
index 8805a8a8cb9001..a8d017d055774e 100644
--- a/packages/react-native/React/Views/ScrollView/RCTScrollViewManager.m
+++ b/packages/react-native/React/Views/ScrollView/RCTScrollViewManager.m
@@ -12,10 +12,11 @@
#import "RCTShadowView.h"
#import "RCTUIManager.h"
-#if !TARGET_OS_VISION
+
@implementation RCTConvert (UIScrollView)
+#if !TARGET_OS_VISION
RCT_ENUM_CONVERTER(
UIScrollViewKeyboardDismissMode,
(@{
@@ -27,6 +28,7 @@ @implementation RCTConvert (UIScrollView)
}),
UIScrollViewKeyboardDismissModeNone,
integerValue)
+#endif
RCT_ENUM_CONVERTER(
UIScrollViewIndicatorStyle,
@@ -51,7 +53,6 @@ @implementation RCTConvert (UIScrollView)
@end
-#endif
@implementation RCTScrollViewManager
diff --git a/packages/react-native/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTSampleTurboModule.mm b/packages/react-native/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTSampleTurboModule.mm
index 593f677ec2f3f1..c6650e53f6b356 100644
--- a/packages/react-native/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTSampleTurboModule.mm
+++ b/packages/react-native/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTSampleTurboModule.mm
@@ -47,7 +47,10 @@ - (NSDictionary *)getConstants
__block NSDictionary *constants;
RCTUnsafeExecuteOnMainQueueSync(^{
#if TARGET_OS_VISION
- CGSize screenSize = CGSizeMake(100, 100);
+ UIApplication *app = [[UIApplication class] performSelector:@selector(sharedApplication)];
+ UIWindowScene *scene = (UIWindowScene*)[app.connectedScenes anyObject];
+ UIWindow *window = [[UIWindow alloc] initWithWindowScene:scene];
+ CGSize screenSize = window.bounds.size;
#else
UIScreen *mainScreen = UIScreen.mainScreen;
CGSize screenSize = mainScreen.bounds.size;
From 6665b89caa9291e6fa5176a5e5377453a4645ffa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Oskar=20Kwas=CC=81niewski?=
Date: Sun, 8 Oct 2023 11:58:36 +0200
Subject: [PATCH 03/15] feat: implement Platform.isVisionOS
---
packages/react-native/Libraries/Utilities/Platform.flow.js | 2 ++
packages/react-native/Libraries/Utilities/Platform.ios.js | 5 +++++
packages/react-native/React/CoreModules/RCTPlatform.mm | 4 ++++
3 files changed, 11 insertions(+)
diff --git a/packages/react-native/Libraries/Utilities/Platform.flow.js b/packages/react-native/Libraries/Utilities/Platform.flow.js
index b0c23b4fe77cc5..15e7605223cf4c 100644
--- a/packages/react-native/Libraries/Utilities/Platform.flow.js
+++ b/packages/react-native/Libraries/Utilities/Platform.flow.js
@@ -42,6 +42,8 @@ type IOSPlatform = {
// $FlowFixMe[unsafe-getters-setters]
get isTV(): boolean,
// $FlowFixMe[unsafe-getters-setters]
+ get isVisionOS(): boolean,
+ // $FlowFixMe[unsafe-getters-setters]
get isTesting(): boolean,
// $FlowFixMe[unsafe-getters-setters]
get isDisableAnimations(): boolean,
diff --git a/packages/react-native/Libraries/Utilities/Platform.ios.js b/packages/react-native/Libraries/Utilities/Platform.ios.js
index 4c5377395c0b3b..e556189a835cfe 100644
--- a/packages/react-native/Libraries/Utilities/Platform.ios.js
+++ b/packages/react-native/Libraries/Utilities/Platform.ios.js
@@ -58,6 +58,11 @@ const Platform: PlatformType = {
return this.constants.interfaceIdiom === 'tv';
},
// $FlowFixMe[unsafe-getters-setters]
+ get isVisionOS(): boolean {
+ // $FlowFixMe[object-this-reference]
+ return this.constants.interfaceIdiom === 'vision';
+ },
+ // $FlowFixMe[unsafe-getters-setters]
get isTesting(): boolean {
if (__DEV__) {
// $FlowFixMe[object-this-reference]
diff --git a/packages/react-native/React/CoreModules/RCTPlatform.mm b/packages/react-native/React/CoreModules/RCTPlatform.mm
index d6ceed27dfa320..a908677a3c66c3 100644
--- a/packages/react-native/React/CoreModules/RCTPlatform.mm
+++ b/packages/react-native/React/CoreModules/RCTPlatform.mm
@@ -30,6 +30,10 @@
return @"tv";
case UIUserInterfaceIdiomCarPlay:
return @"carplay";
+#if TARGET_OS_VISION
+ case UIUserInterfaceIdiomVision:
+ return @"vision";
+#endif
default:
return @"unknown";
}
From 4834fb0ded08f9195069e1d67ffdeb4b6873b746 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Oskar=20Kwas=CC=81niewski?=
Date: Sun, 8 Oct 2023 13:48:10 +0200
Subject: [PATCH 04/15] feat: move min_visionos_version_supported to Helpers
---
packages/react-native/scripts/cocoapods/helpers.rb | 3 +++
packages/react-native/scripts/react_native_pods.rb | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/packages/react-native/scripts/cocoapods/helpers.rb b/packages/react-native/scripts/cocoapods/helpers.rb
index 4a46189002286b..f8b9e2d0244eba 100644
--- a/packages/react-native/scripts/cocoapods/helpers.rb
+++ b/packages/react-native/scripts/cocoapods/helpers.rb
@@ -40,5 +40,8 @@ class Constants
def self.min_ios_version_supported
return '13.4'
end
+ def self.min_visionos_version_supported
+ return '1.0'
+ end
end
end
diff --git a/packages/react-native/scripts/react_native_pods.rb b/packages/react-native/scripts/react_native_pods.rb
index 409c9bd9fc6f9f..ba3f9e1877a5d4 100644
--- a/packages/react-native/scripts/react_native_pods.rb
+++ b/packages/react-native/scripts/react_native_pods.rb
@@ -41,7 +41,7 @@ def min_ios_version_supported
end
def min_visionos_version_supported
- return '1.0'
+ return Helpers::Constants.min_visionos_version_supported
end
# This function returns the min supported OS versions supported by React Native
From ee7809e5f2560a2d8d487d3b0a1fd32c656c96ee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Oskar=20Kwas=CC=81niewski?=
Date: Wed, 11 Oct 2023 16:28:08 +0200
Subject: [PATCH 05/15] feat: implement `visionos_hoverStyle` prop
---
.../Components/Pressable/Pressable.js | 17 +++++++++-
.../Touchable/TouchableHighlight.js | 7 ++++
.../Touchable/TouchableOpacity.d.ts | 7 +++-
.../Components/Touchable/TouchableOpacity.js | 15 +++++++++
.../Components/View/ViewPropTypes.d.ts | 19 +++++++++++
.../Components/View/ViewPropTypes.js | 20 ++++++++++++
packages/react-native/React/Views/RCTView.h | 7 ++++
packages/react-native/React/Views/RCTView.m | 32 +++++++++++++++++++
.../react-native/React/Views/RCTViewManager.m | 1 +
9 files changed, 123 insertions(+), 2 deletions(-)
diff --git a/packages/react-native/Libraries/Components/Pressable/Pressable.js b/packages/react-native/Libraries/Components/Pressable/Pressable.js
index ef8dccaa830d04..44587a81eb92ae 100644
--- a/packages/react-native/Libraries/Components/Pressable/Pressable.js
+++ b/packages/react-native/Libraries/Components/Pressable/Pressable.js
@@ -20,6 +20,7 @@ import type {
AccessibilityState,
AccessibilityValue,
} from '../View/ViewAccessibility';
+import type {HoverStyle} from '../View/ViewPropTypes';
import {PressabilityDebugView} from '../../Pressability/PressabilityDebug';
import usePressability from '../../Pressability/usePressability';
@@ -32,12 +33,20 @@ import useAndroidRippleForView, {
import * as React from 'react';
import {useMemo, useRef, useState} from 'react';
+const defaultHoverStyle: HoverStyle = {
+ effectType: 'automatic',
+};
+
type ViewStyleProp = $ElementType, 'style'>;
export type StateCallbackType = $ReadOnly<{|
pressed: boolean,
|}>;
+type VisionOSProps = $ReadOnly<{|
+ visionos_hoverStyle?: ?HoverStyle,
+|}>;
+
type Props = $ReadOnly<{|
/**
* Accessibility.
@@ -193,6 +202,10 @@ type Props = $ReadOnly<{|
* https://github.com/facebook/react-native/issues/34424
*/
'aria-label'?: ?string,
+ /**
+ * Props needed for VisionOS.
+ */
+ ...VisionOSProps,
|}>;
/**
@@ -232,6 +245,7 @@ function Pressable(props: Props, forwardedRef): React.Node {
style,
testOnly_pressed,
unstable_pressDelay,
+ visionos_hoverStyle = defaultHoverStyle,
...restProps
} = props;
@@ -341,7 +355,8 @@ function Pressable(props: Props, forwardedRef): React.Node {
{...eventHandlers}
ref={mergedRef}
style={typeof style === 'function' ? style({pressed}) : style}
- collapsable={false}>
+ collapsable={false}
+ visionos_hoverStyle={visionos_hoverStyle}>
{typeof children === 'function' ? children({pressed}) : children}
{__DEV__ ? : null}
diff --git a/packages/react-native/Libraries/Components/Touchable/TouchableHighlight.js b/packages/react-native/Libraries/Components/Touchable/TouchableHighlight.js
index 998a7d02f3b45a..ad4a0663a739b8 100644
--- a/packages/react-native/Libraries/Components/Touchable/TouchableHighlight.js
+++ b/packages/react-native/Libraries/Components/Touchable/TouchableHighlight.js
@@ -9,6 +9,7 @@
*/
import type {ColorValue} from '../../StyleSheet/StyleSheet';
+import type {HoverStyle} from '../View/ViewPropTypes';
import typeof TouchableWithoutFeedback from './TouchableWithoutFeedback';
import View from '../../Components/View/View';
@@ -32,10 +33,15 @@ type IOSProps = $ReadOnly<{|
hasTVPreferredFocus?: ?boolean,
|}>;
+type VisionOSProps = $ReadOnly<{|
+ hoverStyle?: ?HoverStyle,
+|}>;
+
type Props = $ReadOnly<{|
...React.ElementConfig,
...AndroidProps,
...IOSProps,
+ ...VisionOSProps,
activeOpacity?: ?number,
underlayColor?: ?ColorValue,
@@ -341,6 +347,7 @@ class TouchableHighlight extends React.Component {
nextFocusLeft={this.props.nextFocusLeft}
nextFocusRight={this.props.nextFocusRight}
nextFocusUp={this.props.nextFocusUp}
+ visionos_hoverStyle={this.props.hoverStyle}
focusable={
this.props.focusable !== false && this.props.onPress !== undefined
}
diff --git a/packages/react-native/Libraries/Components/Touchable/TouchableOpacity.d.ts b/packages/react-native/Libraries/Components/Touchable/TouchableOpacity.d.ts
index 37c4ce6df43e4c..919e90dbfe9246 100644
--- a/packages/react-native/Libraries/Components/Touchable/TouchableOpacity.d.ts
+++ b/packages/react-native/Libraries/Components/Touchable/TouchableOpacity.d.ts
@@ -11,7 +11,7 @@ import type * as React from 'react';
import {Constructor} from '../../../types/private/Utilities';
import {TimerMixin} from '../../../types/private/TimerMixin';
import {NativeMethods} from '../../../types/public/ReactNativeTypes';
-import {TVParallaxProperties} from '../View/ViewPropTypes';
+import {HoverStyle, TVParallaxProperties} from '../View/ViewPropTypes';
import {TouchableMixin} from './Touchable';
import {TouchableWithoutFeedbackProps} from './TouchableWithoutFeedback';
@@ -86,6 +86,11 @@ export interface TouchableOpacityProps
* @platform android
*/
tvParallaxProperties?: TVParallaxProperties | undefined;
+
+ /**
+ * Hover style to apply to the view. Only supported on VisionOS.
+ */
+ visionos_hoverStyle?: HoverStyle | undefined;
}
/**
diff --git a/packages/react-native/Libraries/Components/Touchable/TouchableOpacity.js b/packages/react-native/Libraries/Components/Touchable/TouchableOpacity.js
index 95b3787905c082..35a3897cd1d305 100644
--- a/packages/react-native/Libraries/Components/Touchable/TouchableOpacity.js
+++ b/packages/react-native/Libraries/Components/Touchable/TouchableOpacity.js
@@ -9,6 +9,7 @@
*/
import type {ViewStyleProp} from '../../StyleSheet/StyleSheet';
+import type {HoverStyle} from '../View/ViewPropTypes';
import typeof TouchableWithoutFeedback from './TouchableWithoutFeedback';
import Animated from '../../Animated/Animated';
@@ -21,6 +22,10 @@ import flattenStyle from '../../StyleSheet/flattenStyle';
import Platform from '../../Utilities/Platform';
import * as React from 'react';
+const defaultHoverStyle: HoverStyle = {
+ effectType: 'automatic',
+};
+
type TVProps = $ReadOnly<{|
hasTVPreferredFocus?: ?boolean,
nextFocusDown?: ?number,
@@ -30,9 +35,14 @@ type TVProps = $ReadOnly<{|
nextFocusUp?: ?number,
|}>;
+type VisionOSProps = $ReadOnly<{|
+ visionos_hoverStyle?: ?HoverStyle,
+|}>;
+
type Props = $ReadOnly<{|
...React.ElementConfig,
...TVProps,
+ ...VisionOSProps,
activeOpacity?: ?number,
style?: ?ViewStyleProp,
@@ -130,6 +140,10 @@ type State = $ReadOnly<{|
*
*/
class TouchableOpacity extends React.Component {
+ static defaultProps: {|visionos_hoverStyle: HoverStyle|} = {
+ visionos_hoverStyle: defaultHoverStyle,
+ };
+
state: State = {
anim: new Animated.Value(this._getChildStyleOpacityWithDefault()),
pressability: new Pressability(this._createPressabilityConfig()),
@@ -286,6 +300,7 @@ class TouchableOpacity extends React.Component {
nextFocusUp={this.props.nextFocusUp}
hasTVPreferredFocus={this.props.hasTVPreferredFocus}
hitSlop={this.props.hitSlop}
+ visionos_hoverStyle={this.props.visionos_hoverStyle}
focusable={
this.props.focusable !== false && this.props.onPress !== undefined
}
diff --git a/packages/react-native/Libraries/Components/View/ViewPropTypes.d.ts b/packages/react-native/Libraries/Components/View/ViewPropTypes.d.ts
index 888f30731214fc..e847dd3b13430d 100644
--- a/packages/react-native/Libraries/Components/View/ViewPropTypes.d.ts
+++ b/packages/react-native/Libraries/Components/View/ViewPropTypes.d.ts
@@ -16,6 +16,21 @@ import {LayoutChangeEvent, PointerEvents} from '../../Types/CoreEventTypes';
import {Touchable} from '../Touchable/Touchable';
import {AccessibilityProps} from './ViewAccessibility';
+export type HoverStyle = {
+ /**
+ * If true the hover effect is enabled. Defaults to true.
+ */
+ enabled: boolean;
+ /**
+ * Hover effect type to apply to the view.
+ */
+ effectType: 'automatic' | 'lift' | 'highlight';
+ /**
+ * Corner radius of the hover effect.
+ */
+ cornerRadius?: number | undefined;
+};
+
export type TVParallaxProperties = {
/**
* If true, parallax effects are enabled. Defaults to true.
@@ -122,6 +137,10 @@ export interface ViewPropsIOS extends TVViewPropsIOS {
* Test and measure when using this property.
*/
shouldRasterizeIOS?: boolean | undefined;
+ /**
+ * Hover style to apply to the view. Only supported on VisionOS.
+ */
+ visionos_hoverStyle?: HoverStyle | undefined;
}
export interface ViewPropsAndroid {
diff --git a/packages/react-native/Libraries/Components/View/ViewPropTypes.js b/packages/react-native/Libraries/Components/View/ViewPropTypes.js
index 692410cd89d176..0cd084b47cb170 100644
--- a/packages/react-native/Libraries/Components/View/ViewPropTypes.js
+++ b/packages/react-native/Libraries/Components/View/ViewPropTypes.js
@@ -263,6 +263,21 @@ type AndroidDrawableRipple = $ReadOnly<{|
rippleRadius?: ?number,
|}>;
+export type HoverStyle = $ReadOnly<{|
+ /**
+ * If true the hover effect is enabled. Defaults to true.
+ */
+ enabled?: ?boolean,
+ /**
+ * Hover effect type to apply to the view.
+ */
+ effectType: 'automatic' | 'lift' | 'highlight',
+ /**
+ * Corner radius of the hover effect.
+ */
+ cornerRadius?: ?number,
+|}>;
+
type AndroidDrawable = AndroidDrawableThemeAttr | AndroidDrawableRipple;
type AndroidViewProps = $ReadOnly<{|
@@ -451,6 +466,11 @@ type IOSViewProps = $ReadOnly<{|
* See https://reactnative.dev/docs/view#shouldrasterizeios
*/
shouldRasterizeIOS?: ?boolean,
+
+ /**
+ * Hover style to apply to the view. Only supported on VisionOS.
+ */
+ visionos_hoverStyle?: ?HoverStyle,
|}>;
export type ViewProps = $ReadOnly<{|
diff --git a/packages/react-native/React/Views/RCTView.h b/packages/react-native/React/Views/RCTView.h
index 200d8b451bf59e..ace9840f5c59d5 100644
--- a/packages/react-native/React/Views/RCTView.h
+++ b/packages/react-native/React/Views/RCTView.h
@@ -120,6 +120,13 @@ extern const UIAccessibilityTraits SwitchAccessibilityTrait;
*/
@property (nonatomic, assign) UIEdgeInsets hitTestEdgeInsets;
+#if TARGET_OS_VISION
+/**
+ * The hover style to apply to a view, including an effect and a shape to use for displaying that effect.
+ */
+@property (nonatomic, copy) NSDictionary *hoverStyleProperties;
+#endif
+
/**
* (Experimental and unused for Paper) Pointer event handlers.
*/
diff --git a/packages/react-native/React/Views/RCTView.m b/packages/react-native/React/Views/RCTView.m
index bb8336615a0208..3b4fb6076aab62 100644
--- a/packages/react-native/React/Views/RCTView.m
+++ b/packages/react-native/React/Views/RCTView.m
@@ -666,6 +666,38 @@ - (UIEdgeInsets)bordersAsInsets
};
}
+
+#if TARGET_OS_VISION
+- (void)setHoverStyleProperties:(NSDictionary *)hoverStyleProperties {
+ _hoverStyleProperties = hoverStyleProperties;
+
+ BOOL enabled = _hoverStyleProperties[@"enabled"] != nil ? [_hoverStyleProperties[@"enabled"] boolValue] : YES;
+
+ if (!enabled || hoverStyleProperties == nil) {
+ self.hoverStyle = nil;
+ return;
+ }
+
+ NSString *effectType = (NSString *)[_hoverStyleProperties objectForKey:@"effectType"];
+ NSNumber *cornerRadius = (NSNumber *)[_hoverStyleProperties objectForKey:@"cornerRadius"];
+
+ float cornerRadiusFloat = [cornerRadius floatValue];
+
+ UIShape *shape = [UIShape rectShapeWithCornerRadius:cornerRadiusFloat];
+ id hoverEffect;
+
+ if ([effectType isEqualToString:@"lift"]) {
+ hoverEffect = [UIHoverLiftEffect effect];
+ } else if ([effectType isEqualToString:@"highlight"]) {
+ hoverEffect = [UIHoverHighlightEffect effect];
+ } else if ([effectType isEqualToString:@"automatic"]) {
+ hoverEffect = [UIHoverAutomaticEffect effect];
+ }
+
+ self.hoverStyle = [UIHoverStyle styleWithEffect:hoverEffect shape:shape];
+}
+#endif
+
- (RCTCornerRadii)cornerRadii
{
const BOOL isRTL = _reactLayoutDirection == UIUserInterfaceLayoutDirectionRightToLeft;
diff --git a/packages/react-native/React/Views/RCTViewManager.m b/packages/react-native/React/Views/RCTViewManager.m
index a3861f7a2cd669..a0a09439d0e4f9 100644
--- a/packages/react-native/React/Views/RCTViewManager.m
+++ b/packages/react-native/React/Views/RCTViewManager.m
@@ -194,6 +194,7 @@ - (RCTShadowView *)shadowView
RCT_REMAP_VIEW_PROPERTY(testID, reactAccessibilityElement.accessibilityIdentifier, NSString)
RCT_EXPORT_VIEW_PROPERTY(backgroundColor, UIColor)
+RCT_REMAP_VISIONOS_VIEW_PROPERTY(visionos_hoverStyle, hoverStyleProperties, NSDictionary)
RCT_REMAP_VIEW_PROPERTY(backfaceVisibility, layer.doubleSided, css_backface_visibility_t)
RCT_REMAP_VIEW_PROPERTY(opacity, alpha, CGFloat)
RCT_REMAP_VIEW_PROPERTY(shadowColor, layer.shadowColor, CGColor)
From a94620eb4d091df1afff8ce6e8564f71694b1be1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Oskar=20Kwas=CC=81niewski?=
Date: Wed, 11 Oct 2023 21:47:14 +0200
Subject: [PATCH 06/15] chore: update README.MD
---
README.md | 143 +++---------------------------------------------------
1 file changed, 8 insertions(+), 135 deletions(-)
diff --git a/README.md b/README.md
index a99a5c75c20e3f..3621904b39171b 100644
--- a/README.md
+++ b/README.md
@@ -1,147 +1,20 @@
Learn once, write anywhere:
- Build mobile apps with React.
+ Build spatial apps with React.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-React Native brings [**React**'s][r] declarative UI framework to iOS and Android. With React Native, you use native UI controls and have full access to the native platform.
-
-- **Declarative.** React makes it painless to create interactive UIs. Declarative views make your code more predictable and easier to debug.
-- **Component-Based.** Build encapsulated components that manage their state, then compose them to make complex UIs.
-- **Developer Velocity.** See local changes in seconds. Changes to JavaScript code can be live reloaded without rebuilding the native app.
-- **Portability.** Reuse code across iOS, Android, and [other platforms][p].
-
-React Native is developed and supported by many companies and individual core contributors. Find out more in our [ecosystem overview][e].
-
-[r]: https://react.dev/
-[p]: https://reactnative.dev/docs/out-of-tree-platforms
-[e]: https://github.com/facebook/react-native/blob/HEAD/ECOSYSTEM.md
-
-## Contents
-
-- [Requirements](#-requirements)
-- [Building your first React Native app](#-building-your-first-react-native-app)
-- [Documentation](#-documentation)
-- [Upgrading](#-upgrading)
-- [How to Contribute](#-how-to-contribute)
-- [Code of Conduct](#code-of-conduct)
-- [License](#-license)
-
-
-## 📋 Requirements
-
-React Native apps may target iOS 13.4 and Android 5.0 (API 21) or newer. You may use Windows, macOS, or Linux as your development operating system, though building and running iOS apps is limited to macOS. Tools like [Expo](https://expo.dev) can be used to work around this.
-
-## 🎉 Building your first React Native app
-
-Follow the [Getting Started guide](https://reactnative.dev/docs/getting-started). The recommended way to install React Native depends on your project. Here you can find short guides for the most common scenarios:
-
-- [Trying out React Native][hello-world]
-- [Creating a New Application][new-app]
-- [Adding React Native to an Existing Application][existing]
-
-[hello-world]: https://snack.expo.dev/@samples/hello-world
-[new-app]: https://reactnative.dev/docs/getting-started
-[existing]: https://reactnative.dev/docs/integration-with-existing-apps
-
-## 📖 Documentation
-
-The full documentation for React Native can be found on our [website][docs].
-
-The React Native documentation discusses components, APIs, and topics that are specific to React Native. For further documentation on the React API that is shared between React Native and React DOM, refer to the [React documentation][r-docs].
-
-The source for the React Native documentation and website is hosted on a separate repo, [**@facebook/react-native-website**][repo-website].
-
-[docs]: https://reactnative.dev/docs/getting-started
-[r-docs]: https://react.dev/learn
-[repo-website]: https://github.com/facebook/react-native-website
-
-## 🚀 Upgrading
-
-Upgrading to new versions of React Native may give you access to more APIs, views, developer tools, and other goodies. See the [Upgrading Guide][u] for instructions.
-
-React Native releases are discussed [in this discussion repo](https://github.com/reactwg/react-native-releases/discussions).
-
-[u]: https://reactnative.dev/docs/upgrading
-[repo-releases]: https://github.com/react-native-community/react-native-releases
-
-## 👏 How to Contribute
-
-The main purpose of this repository is to continue evolving React Native core. We want to make contributing to this project as easy and transparent as possible, and we are grateful to the community for contributing bug fixes and improvements. Read below to learn how you can take part in improving React Native.
-
-### [Code of Conduct][code]
-
-Facebook has adopted a Code of Conduct that we expect project participants to adhere to.
-Please read the [full text][code] so that you can understand what actions will and will not be tolerated.
-
-[code]: https://code.fb.com/codeofconduct/
-
-### [Contributing Guide][contribute]
-
-Read our [**Contributing Guide**][contribute] to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to React Native.
-
-[contribute]: https://reactnative.dev/docs/contributing
-
-### [Open Source Roadmap][roadmap]
-
-You can learn more about our vision for React Native in the [**Roadmap**][roadmap].
-
-[roadmap]: https://github.com/facebook/react-native/wiki/Roadmap
-
-### Good First Issues
-
-We have a list of [good first issues][gfi] that contain bugs which have a relatively limited scope. This is a great place to get started, gain experience, and get familiar with our contribution process.
-
-[gfi]: https://github.com/facebook/react-native/labels/good%20first%20issue
-
-### Discussions
-
-Larger discussions and proposals are discussed in [**@react-native-community/discussions-and-proposals**][repo-meta].
-
-[repo-meta]: https://github.com/react-native-community/discussions-and-proposals
-
-## 📄 License
+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.
-React Native is MIT licensed, as found in the [LICENSE][l] file.
+This project is still at an early stage of development and is not ready for production use.
-React Native documentation is Creative Commons licensed, as found in the [LICENSE-docs][ld] file.
+## Contributing
-[l]: https://github.com/facebook/react-native/blob/main/LICENSE
-[ld]: https://github.com/facebook/react-native/blob/main/LICENSE-docs
+1. Download latest Xcode beta [here](https://developer.apple.com/xcode/).
+2. Install VisionOS Simulator runtime.
+3. Follow the same steps as for running iOS defined in `packages/rn-tester/README.md`
From c3312bccb952cf5aaebebdbdbcd4dbe805be2325 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Oskar=20Kwas=CC=81niewski?=
Date: Sun, 15 Oct 2023 14:45:44 +0200
Subject: [PATCH 07/15] fix: refactor visionos_hoverStyle to take a string and
new arch support
---
.../Components/Pressable/Pressable.js | 12 +++----
.../Touchable/TouchableHighlight.js | 6 ++--
.../Touchable/TouchableOpacity.d.ts | 4 +--
.../Components/Touchable/TouchableOpacity.js | 14 ++++-----
.../Components/View/ViewPropTypes.d.ts | 17 ++--------
.../Components/View/ViewPropTypes.js | 17 ++--------
.../View/RCTViewComponentView.mm | 28 +++++++++++++++++
packages/react-native/React/Views/RCTView.h | 2 +-
packages/react-native/React/Views/RCTView.m | 31 +++++++------------
.../react-native/React/Views/RCTViewManager.m | 2 +-
.../components/view/BaseViewProps.cpp | 14 +++++++++
.../renderer/components/view/BaseViewProps.h | 4 +++
12 files changed, 80 insertions(+), 71 deletions(-)
diff --git a/packages/react-native/Libraries/Components/Pressable/Pressable.js b/packages/react-native/Libraries/Components/Pressable/Pressable.js
index 44587a81eb92ae..5fa9e0a67d53aa 100644
--- a/packages/react-native/Libraries/Components/Pressable/Pressable.js
+++ b/packages/react-native/Libraries/Components/Pressable/Pressable.js
@@ -20,7 +20,7 @@ import type {
AccessibilityState,
AccessibilityValue,
} from '../View/ViewAccessibility';
-import type {HoverStyle} from '../View/ViewPropTypes';
+import type {HoverEffect} from '../View/ViewPropTypes';
import {PressabilityDebugView} from '../../Pressability/PressabilityDebug';
import usePressability from '../../Pressability/usePressability';
@@ -33,9 +33,7 @@ import useAndroidRippleForView, {
import * as React from 'react';
import {useMemo, useRef, useState} from 'react';
-const defaultHoverStyle: HoverStyle = {
- effectType: 'automatic',
-};
+const defaultHoverEffect: HoverEffect = 'highlight';
type ViewStyleProp = $ElementType, 'style'>;
@@ -44,7 +42,7 @@ export type StateCallbackType = $ReadOnly<{|
|}>;
type VisionOSProps = $ReadOnly<{|
- visionos_hoverStyle?: ?HoverStyle,
+ visionos_hoverEffect?: ?HoverEffect,
|}>;
type Props = $ReadOnly<{|
@@ -245,7 +243,7 @@ function Pressable(props: Props, forwardedRef): React.Node {
style,
testOnly_pressed,
unstable_pressDelay,
- visionos_hoverStyle = defaultHoverStyle,
+ visionos_hoverEffect = defaultHoverEffect,
...restProps
} = props;
@@ -356,7 +354,7 @@ function Pressable(props: Props, forwardedRef): React.Node {
ref={mergedRef}
style={typeof style === 'function' ? style({pressed}) : style}
collapsable={false}
- visionos_hoverStyle={visionos_hoverStyle}>
+ visionos_hoverEffect={visionos_hoverEffect}>
{typeof children === 'function' ? children({pressed}) : children}
{__DEV__ ? : null}
diff --git a/packages/react-native/Libraries/Components/Touchable/TouchableHighlight.js b/packages/react-native/Libraries/Components/Touchable/TouchableHighlight.js
index ad4a0663a739b8..ceebee7470a93b 100644
--- a/packages/react-native/Libraries/Components/Touchable/TouchableHighlight.js
+++ b/packages/react-native/Libraries/Components/Touchable/TouchableHighlight.js
@@ -9,7 +9,7 @@
*/
import type {ColorValue} from '../../StyleSheet/StyleSheet';
-import type {HoverStyle} from '../View/ViewPropTypes';
+import type {HoverEffect} from '../View/ViewPropTypes';
import typeof TouchableWithoutFeedback from './TouchableWithoutFeedback';
import View from '../../Components/View/View';
@@ -34,7 +34,7 @@ type IOSProps = $ReadOnly<{|
|}>;
type VisionOSProps = $ReadOnly<{|
- hoverStyle?: ?HoverStyle,
+ hoverEffect?: ?HoverEffect,
|}>;
type Props = $ReadOnly<{|
@@ -347,7 +347,7 @@ class TouchableHighlight extends React.Component {
nextFocusLeft={this.props.nextFocusLeft}
nextFocusRight={this.props.nextFocusRight}
nextFocusUp={this.props.nextFocusUp}
- visionos_hoverStyle={this.props.hoverStyle}
+ visionos_hoverEffect={this.props.hoverEffect}
focusable={
this.props.focusable !== false && this.props.onPress !== undefined
}
diff --git a/packages/react-native/Libraries/Components/Touchable/TouchableOpacity.d.ts b/packages/react-native/Libraries/Components/Touchable/TouchableOpacity.d.ts
index 919e90dbfe9246..ec8485306a8050 100644
--- a/packages/react-native/Libraries/Components/Touchable/TouchableOpacity.d.ts
+++ b/packages/react-native/Libraries/Components/Touchable/TouchableOpacity.d.ts
@@ -11,7 +11,7 @@ import type * as React from 'react';
import {Constructor} from '../../../types/private/Utilities';
import {TimerMixin} from '../../../types/private/TimerMixin';
import {NativeMethods} from '../../../types/public/ReactNativeTypes';
-import {HoverStyle, TVParallaxProperties} from '../View/ViewPropTypes';
+import {HoverEffect, TVParallaxProperties} from '../View/ViewPropTypes';
import {TouchableMixin} from './Touchable';
import {TouchableWithoutFeedbackProps} from './TouchableWithoutFeedback';
@@ -90,7 +90,7 @@ export interface TouchableOpacityProps
/**
* Hover style to apply to the view. Only supported on VisionOS.
*/
- visionos_hoverStyle?: HoverStyle | undefined;
+ visionos_hoverEffect?: HoverEffect | undefined;
}
/**
diff --git a/packages/react-native/Libraries/Components/Touchable/TouchableOpacity.js b/packages/react-native/Libraries/Components/Touchable/TouchableOpacity.js
index 35a3897cd1d305..6fab99b54514b0 100644
--- a/packages/react-native/Libraries/Components/Touchable/TouchableOpacity.js
+++ b/packages/react-native/Libraries/Components/Touchable/TouchableOpacity.js
@@ -9,7 +9,7 @@
*/
import type {ViewStyleProp} from '../../StyleSheet/StyleSheet';
-import type {HoverStyle} from '../View/ViewPropTypes';
+import type {HoverEffect} from '../View/ViewPropTypes';
import typeof TouchableWithoutFeedback from './TouchableWithoutFeedback';
import Animated from '../../Animated/Animated';
@@ -22,9 +22,7 @@ import flattenStyle from '../../StyleSheet/flattenStyle';
import Platform from '../../Utilities/Platform';
import * as React from 'react';
-const defaultHoverStyle: HoverStyle = {
- effectType: 'automatic',
-};
+const defaultHoverEffect: HoverEffect = 'highlight';
type TVProps = $ReadOnly<{|
hasTVPreferredFocus?: ?boolean,
@@ -36,7 +34,7 @@ type TVProps = $ReadOnly<{|
|}>;
type VisionOSProps = $ReadOnly<{|
- visionos_hoverStyle?: ?HoverStyle,
+ visionos_hoverEffect?: ?HoverEffect,
|}>;
type Props = $ReadOnly<{|
@@ -140,8 +138,8 @@ type State = $ReadOnly<{|
*
*/
class TouchableOpacity extends React.Component {
- static defaultProps: {|visionos_hoverStyle: HoverStyle|} = {
- visionos_hoverStyle: defaultHoverStyle,
+ static defaultProps: {|visionos_hoverEffect: HoverEffect|} = {
+ visionos_hoverEffect: defaultHoverEffect,
};
state: State = {
@@ -300,7 +298,7 @@ class TouchableOpacity extends React.Component {
nextFocusUp={this.props.nextFocusUp}
hasTVPreferredFocus={this.props.hasTVPreferredFocus}
hitSlop={this.props.hitSlop}
- visionos_hoverStyle={this.props.visionos_hoverStyle}
+ visionos_hoverEffect={this.props.visionos_hoverEffect}
focusable={
this.props.focusable !== false && this.props.onPress !== undefined
}
diff --git a/packages/react-native/Libraries/Components/View/ViewPropTypes.d.ts b/packages/react-native/Libraries/Components/View/ViewPropTypes.d.ts
index e847dd3b13430d..70db99ee7aca85 100644
--- a/packages/react-native/Libraries/Components/View/ViewPropTypes.d.ts
+++ b/packages/react-native/Libraries/Components/View/ViewPropTypes.d.ts
@@ -16,20 +16,7 @@ import {LayoutChangeEvent, PointerEvents} from '../../Types/CoreEventTypes';
import {Touchable} from '../Touchable/Touchable';
import {AccessibilityProps} from './ViewAccessibility';
-export type HoverStyle = {
- /**
- * If true the hover effect is enabled. Defaults to true.
- */
- enabled: boolean;
- /**
- * Hover effect type to apply to the view.
- */
- effectType: 'automatic' | 'lift' | 'highlight';
- /**
- * Corner radius of the hover effect.
- */
- cornerRadius?: number | undefined;
-};
+export type HoverEffect = 'lift' | 'highlight';
export type TVParallaxProperties = {
/**
@@ -140,7 +127,7 @@ export interface ViewPropsIOS extends TVViewPropsIOS {
/**
* Hover style to apply to the view. Only supported on VisionOS.
*/
- visionos_hoverStyle?: HoverStyle | undefined;
+ visionos_hoverEffect?: HoverEffect | undefined;
}
export interface ViewPropsAndroid {
diff --git a/packages/react-native/Libraries/Components/View/ViewPropTypes.js b/packages/react-native/Libraries/Components/View/ViewPropTypes.js
index 0cd084b47cb170..e368d2a720de81 100644
--- a/packages/react-native/Libraries/Components/View/ViewPropTypes.js
+++ b/packages/react-native/Libraries/Components/View/ViewPropTypes.js
@@ -263,20 +263,7 @@ type AndroidDrawableRipple = $ReadOnly<{|
rippleRadius?: ?number,
|}>;
-export type HoverStyle = $ReadOnly<{|
- /**
- * If true the hover effect is enabled. Defaults to true.
- */
- enabled?: ?boolean,
- /**
- * Hover effect type to apply to the view.
- */
- effectType: 'automatic' | 'lift' | 'highlight',
- /**
- * Corner radius of the hover effect.
- */
- cornerRadius?: ?number,
-|}>;
+export type HoverEffect = 'lift' | 'highlight';
type AndroidDrawable = AndroidDrawableThemeAttr | AndroidDrawableRipple;
@@ -470,7 +457,7 @@ type IOSViewProps = $ReadOnly<{|
/**
* Hover style to apply to the view. Only supported on VisionOS.
*/
- visionos_hoverStyle?: ?HoverStyle,
+ visionos_hoverEffect?: ?HoverEffect,
|}>;
export type ViewProps = $ReadOnly<{|
diff --git a/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm b/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm
index e86e7dcafc09e0..d5083c8e65b59e 100644
--- a/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm
+++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm
@@ -296,6 +296,12 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared &
oldViewProps.borderColors != newViewProps.borderColors) {
needsInvalidateLayer = YES;
}
+
+#if TARGET_OS_VISION
+ if (oldViewProps.visionos_hoverEffect != newViewProps.visionos_hoverEffect) {
+ [self updateHoverEffect:[NSString stringWithUTF8String:newViewProps.visionos_hoverEffect.c_str()]];
+ }
+#endif
// `nativeId`
if (oldViewProps.nativeId != newViewProps.nativeId) {
@@ -517,6 +523,28 @@ - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
}
}
+#if TARGET_OS_VISION
+- (void) updateHoverEffect:(NSString*)hoverEffect {
+ if (hoverEffect == nil || [hoverEffect isEqualToString:@""]) {
+ self.hoverStyle = nil;
+ return;
+ }
+
+ UIShape *shape = [UIShape rectShapeWithCornerRadius:self.layer.cornerRadius];
+ id effect;
+
+ if ([hoverEffect isEqualToString:@"lift"]) {
+ effect = [UIHoverLiftEffect effect];
+ } else if ([hoverEffect isEqualToString:@"highlight"]) {
+ effect = [UIHoverHighlightEffect effect];
+ }
+
+ if (hoverEffect != nil) {
+ self.hoverStyle = [UIHoverStyle styleWithEffect:effect shape:shape];
+ }
+}
+#endif
+
static RCTCornerRadii RCTCornerRadiiFromBorderRadii(BorderRadii borderRadii)
{
return RCTCornerRadii{
diff --git a/packages/react-native/React/Views/RCTView.h b/packages/react-native/React/Views/RCTView.h
index ace9840f5c59d5..100cde3079f5c9 100644
--- a/packages/react-native/React/Views/RCTView.h
+++ b/packages/react-native/React/Views/RCTView.h
@@ -124,7 +124,7 @@ extern const UIAccessibilityTraits SwitchAccessibilityTrait;
/**
* The hover style to apply to a view, including an effect and a shape to use for displaying that effect.
*/
-@property (nonatomic, copy) NSDictionary *hoverStyleProperties;
+@property (nonatomic, copy) NSString *hoverEffect;
#endif
/**
diff --git a/packages/react-native/React/Views/RCTView.m b/packages/react-native/React/Views/RCTView.m
index 3b4fb6076aab62..821a5b1a1981a4 100644
--- a/packages/react-native/React/Views/RCTView.m
+++ b/packages/react-native/React/Views/RCTView.m
@@ -668,33 +668,26 @@ - (UIEdgeInsets)bordersAsInsets
#if TARGET_OS_VISION
-- (void)setHoverStyleProperties:(NSDictionary *)hoverStyleProperties {
- _hoverStyleProperties = hoverStyleProperties;
+- (void)setHoverEffect:(NSString *)hoverEffect {
+ _hoverEffect = hoverEffect;
- BOOL enabled = _hoverStyleProperties[@"enabled"] != nil ? [_hoverStyleProperties[@"enabled"] boolValue] : YES;
-
- if (!enabled || hoverStyleProperties == nil) {
+ if (hoverEffect == nil) {
self.hoverStyle = nil;
return;
}
- NSString *effectType = (NSString *)[_hoverStyleProperties objectForKey:@"effectType"];
- NSNumber *cornerRadius = (NSNumber *)[_hoverStyleProperties objectForKey:@"cornerRadius"];
-
- float cornerRadiusFloat = [cornerRadius floatValue];
+ UIShape *shape = [UIShape rectShapeWithCornerRadius:_borderRadius];
+ id effect;
- UIShape *shape = [UIShape rectShapeWithCornerRadius:cornerRadiusFloat];
- id hoverEffect;
-
- if ([effectType isEqualToString:@"lift"]) {
- hoverEffect = [UIHoverLiftEffect effect];
- } else if ([effectType isEqualToString:@"highlight"]) {
- hoverEffect = [UIHoverHighlightEffect effect];
- } else if ([effectType isEqualToString:@"automatic"]) {
- hoverEffect = [UIHoverAutomaticEffect effect];
+ if ([hoverEffect isEqualToString:@"lift"]) {
+ effect = [UIHoverLiftEffect effect];
+ } else if ([hoverEffect isEqualToString:@"highlight"]) {
+ effect = [UIHoverHighlightEffect effect];
}
- self.hoverStyle = [UIHoverStyle styleWithEffect:hoverEffect shape:shape];
+ if (hoverEffect != nil) {
+ self.hoverStyle = [UIHoverStyle styleWithEffect:effect shape:shape];
+ }
}
#endif
diff --git a/packages/react-native/React/Views/RCTViewManager.m b/packages/react-native/React/Views/RCTViewManager.m
index a0a09439d0e4f9..a25c0cd498b4a7 100644
--- a/packages/react-native/React/Views/RCTViewManager.m
+++ b/packages/react-native/React/Views/RCTViewManager.m
@@ -194,7 +194,7 @@ - (RCTShadowView *)shadowView
RCT_REMAP_VIEW_PROPERTY(testID, reactAccessibilityElement.accessibilityIdentifier, NSString)
RCT_EXPORT_VIEW_PROPERTY(backgroundColor, UIColor)
-RCT_REMAP_VISIONOS_VIEW_PROPERTY(visionos_hoverStyle, hoverStyleProperties, NSDictionary)
+RCT_REMAP_VISIONOS_VIEW_PROPERTY(visionos_hoverEffect, hoverEffect, NSString)
RCT_REMAP_VIEW_PROPERTY(backfaceVisibility, layer.doubleSided, css_backface_visibility_t)
RCT_REMAP_VIEW_PROPERTY(opacity, alpha, CGFloat)
RCT_REMAP_VIEW_PROPERTY(shadowColor, layer.shadowColor, CGColor)
diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/BaseViewProps.cpp b/packages/react-native/ReactCommon/react/renderer/components/view/BaseViewProps.cpp
index 58bb38b20385c1..22fa01d7170cae 100644
--- a/packages/react-native/ReactCommon/react/renderer/components/view/BaseViewProps.cpp
+++ b/packages/react-native/ReactCommon/react/renderer/components/view/BaseViewProps.cpp
@@ -71,6 +71,17 @@ BaseViewProps::BaseViewProps(
"backgroundColor",
sourceProps.backgroundColor,
{})),
+#if TARGET_OS_VISION
+ visionos_hoverEffect(
+ CoreFeatures::enablePropIteratorSetter
+ ? sourceProps.visionos_hoverEffect
+ : convertRawProp(
+ context,
+ rawProps,
+ "visionos_hoverEffect",
+ sourceProps.visionos_hoverEffect,
+ {})),
+#endif
borderRadii(
CoreFeatures::enablePropIteratorSetter ? sourceProps.borderRadii
: convertRawProp(
@@ -281,6 +292,9 @@ void BaseViewProps::setProp(
RAW_SET_PROP_SWITCH_CASE_BASIC(collapsable);
RAW_SET_PROP_SWITCH_CASE_BASIC(removeClippedSubviews);
RAW_SET_PROP_SWITCH_CASE_BASIC(experimental_layoutConformance);
+#if TARGET_OS_VISION
+ RAW_SET_PROP_SWITCH_CASE_BASIC(visionos_hoverEffect);
+#endif
// events field
VIEW_EVENT_CASE(PointerEnter);
VIEW_EVENT_CASE(PointerEnterCapture);
diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/BaseViewProps.h b/packages/react-native/ReactCommon/react/renderer/components/view/BaseViewProps.h
index b7bdd9afc7eb55..a70e8c578e8b9a 100644
--- a/packages/react-native/ReactCommon/react/renderer/components/view/BaseViewProps.h
+++ b/packages/react-native/ReactCommon/react/renderer/components/view/BaseViewProps.h
@@ -63,6 +63,10 @@ class BaseViewProps : public YogaStylableProps, public AccessibilityProps {
PointerEventsMode pointerEvents{};
EdgeInsets hitSlop{};
bool onLayout{};
+
+#if TARGET_OS_VISION
+ std::string visionos_hoverEffect{};
+#endif
ViewEvents events{};
From 91f7ba8930dd320b610338e3897c82d5cc1d7d8b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Oskar=20Kwas=CC=81niewski?=
Date: Tue, 17 Oct 2023 14:57:33 +0200
Subject: [PATCH 08/15] chore: sync Podfile.lock
---
packages/rn-tester/Podfile.lock | 90 ++++++++++++++++-----------------
1 file changed, 45 insertions(+), 45 deletions(-)
diff --git a/packages/rn-tester/Podfile.lock b/packages/rn-tester/Podfile.lock
index e4c2242b41fba4..dade32ff3acc00 100644
--- a/packages/rn-tester/Podfile.lock
+++ b/packages/rn-tester/Podfile.lock
@@ -1176,57 +1176,57 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
boost: 3f76a4d6d9d0f232d25b7782f83fcf988f47d517
DoubleConversion: 71bf0761505a44e4dfddc0aa04afa049fdfb63b5
- FBLazyVector: 03d09da8b28e51e6875ca70a13abfbe9fd3bf0a9
- FBReactNativeSpec: 57aba6ec82355626bdbdc7fd33d304b6e9536184
+ FBLazyVector: 0506222a1bca4e371cd88cb686ecaec57260af25
+ FBReactNativeSpec: eacc4acb0ce267528afcdab4fb12c2d930881303
fmt: 5d9ffa7ccba126c08b730252123601d514652320
glog: 4f05d17aa39a829fee878689fc9a41af587fabba
RCT-Folly: 35de8f372fc3e617131511a6f16028db5c3db620
- RCTRequired: 32995b086b46936af29f524bcc0cb79652602880
- RCTTypeSafety: 462e963599ca8f3c3907764e61b16144b485c081
- React: 595d23b1bcd67c5840231c817dd6f81505b6bb1b
- React-callinvoker: b5d8e1e5906dd8630610bd7846fc3e66c4f5e11b
+ RCTRequired: b17b137406dbee1698d98e3bfb7c027210c80224
+ RCTTypeSafety: 78ce101859404819efce5ccb5aec542444aa96c6
+ React: d45f4db4586d44df30ad0e047e0be44e20eb6bdc
+ React-callinvoker: 1dbb4501d8b5e4f1ececdcf6c59541bc977dc0a0
React-Codegen: cf0df8a0b283dbc95590d1d523511b1278f0aeaf
- React-Core: 38b2d0ef527b080cf8eab19886800456a4b8e57f
- React-CoreModules: dd649f75bc4b42caffce04b7461dfdbc1ce7e909
- React-cxxreact: ed4815bd2bcec801770bc68c317551587a2e4130
- React-debug: bf17536239f9ec991de4159a02b9b7cda303546f
- React-Fabric: e6e685c31900dae2c75f1b9b1d569e947a52fe77
- React-FabricImage: da62493c9b2744ebf380aeb1edb55920a7ac9709
- React-graphics: 6bc56cffb12ad3db9000316584de28b491360e11
- React-ImageManager: 1a301b8cdd395b6f873fd9aea9ac192da58ff72e
- React-jsc: 088ee5083396faa3c2635ae0590aca0f29b88d9a
- React-jserrorhandler: 665b25751f56e4d53a9f621b50c1b4c1cb377b75
- React-jsi: 7dad41d310534c1ad8a45e4f5f0578837e5fb434
- React-jsiexecutor: 5ec3b6e11ee8490a95553aa9102b4926f3fad5e1
- React-jsinspector: c73a67371e0ed16797115d3eb0b7e31881fa590e
- React-logger: 1fb5ac1074ed6303a72c5342233391c3901a6983
- React-Mapbuffer: a4a19b2bb75fc2266edb1ac4e8edf8d0fd0d1215
- React-nativeconfig: b5fe5cd512c653496d62f596d84cf353478cc448
- React-NativeModulesApple: 6ec440eb225836c697f301f7627a32a378b5eb88
- React-perflogger: 6e1e34f7b2483e598ac0982037631d717d1bd396
- React-RCTActionSheet: 9e8912d390a10a3b1a557941faf7a843922c04dd
- React-RCTAnimation: 1eb1d4aaaf45ebae7804b4ce4125391d10122c53
- React-RCTAppDelegate: 418882a75cdd971947616fe4200c4ef85af3fc49
- React-RCTBlob: 69c76bb89505b34395cae11c79570a8521fec505
- React-RCTFabric: 1315af871c6f8cd104682d1e71edd3602b962ec0
- React-RCTImage: 578925206e8dc284dd6fd02cb36cb4cf45a45998
- React-RCTLinking: 085e37c7a9b931b097975bb98fb78d95761a02b5
- React-RCTNetwork: cd2974423f7cf55de8c40223bb9319ac747b90ec
- React-RCTPushNotification: f8d38fb15ee3c00631a7c260cf7ee5d7c4b2afba
- React-RCTSettings: f0519c784147aec5f5aa452fc83e348735e76803
- React-RCTTest: e57a2b8e688ed4dc913f0653549d9de931889d8f
- React-RCTText: b887568977f9aed8c385da6ed1deecc9fc02e4f1
- React-RCTVibration: 360004f3382d2644b64f8c1f59aa2322e046058b
- React-rendererdebug: f086f35ac9daf03fbd77472b2e56c8820ae2742d
- React-rncore: efc20034e55f05d192cf7bbc7e78258122f6c7e4
- React-runtimeexecutor: e33022df6aff3defd9831172fee0503b57558107
- React-runtimescheduler: e11aad4333166a323ce3147e81b7bc109849031c
- React-utils: 6f4dac790091dd2d335fd5c0f2a098a29d9c3b09
- ReactCommon: cec7d2230ce255cd3a5c2b146c05d782dcc766e6
- ReactCommon-Samples: 702e409e2117dfe7cce8a48447cff51d1358e635
+ React-Core: 497ec9ec3e31e536e8a4309793fed6dc95d87fdf
+ React-CoreModules: 5b96f76dd9e1f2c7df7e2e6abd1dfc6a823100cb
+ React-cxxreact: ca7150cf50de8727a01d24ebb87ccb8f19c6367a
+ React-debug: 27a1707213fc5b498fbe25772e6218741fe5dc44
+ React-Fabric: dbcac2d273c44e26127f91e78a316d250b7d5daa
+ React-FabricImage: 9cc7b65f9f809deadd71071d91c9171749769eb7
+ React-graphics: b0efadaced3487d3bf4e3ff3db38e44ca00d197c
+ React-ImageManager: 4549b521e28574561ff4d40e6ab6541284bbfe46
+ React-jsc: 626fe8db69ad14e7e628b3dc2677fad420b36072
+ React-jserrorhandler: 3ef6ce284e8d71e4ff53b0419e9183c65fb8e050
+ React-jsi: 2c59afa4ac6857d132da11c64d0ce585d7113b77
+ React-jsiexecutor: 651c98a2d4e527f450091a299c18a75b1f3e3fef
+ React-jsinspector: 1df15c3eaadd5057b943a55c75f2570a0e198299
+ React-logger: d1472f4ec44cf44b1d66f63c9242a948f79fceba
+ React-Mapbuffer: 8dfda16da3cd9dbd21f96ecce86ca915e4154eb5
+ React-nativeconfig: 79c75b1781087b5316027e92632ba5e7519615be
+ React-NativeModulesApple: 7be23055626885bf4eed7022fdaeee337d5e818b
+ React-perflogger: efec48c21b2c13d382c80ffd364b427b2636439d
+ React-RCTActionSheet: 672e5e8b4c90a427f07898eac23df0e3b843f3de
+ React-RCTAnimation: 8eac4e16cb16c7b8276df8fa61ca1c2effcaf366
+ React-RCTAppDelegate: 94d7252db258806b86243106d0c81fb63cb022ae
+ React-RCTBlob: 2a5ec6e80a0c5d2df0c8254e6f0a1c40158e2528
+ React-RCTFabric: 02b2c32b6d066ab80a065eba14848b5301ef9b65
+ React-RCTImage: 3870795db19a13a546db20fd2526aa1e626a6d31
+ React-RCTLinking: 43f1f9f621db1b291f91a2afa5f30af3f90a642f
+ React-RCTNetwork: 0237480a8b59bc96933f8c91d2ebb1ccf7ea8e71
+ React-RCTPushNotification: e3ad38becfc4abe43f8e83317af90a635b3837d0
+ React-RCTSettings: e3857df2fdcfe9b86804b64adab551a62c3d86f2
+ React-RCTTest: 8e07b591897bdd59c306f7e37aad8b89d3e37040
+ React-RCTText: 9ff88016ea3f9245447013abb176b1d39061c45f
+ React-RCTVibration: 79b08baabc9f890590a67b6460647fe7bca7f097
+ React-rendererdebug: 09e253751ad438eacac845523ebe1d5bfd708f70
+ React-rncore: f34c4ee457c96a013fbf8d1c415f89d3050b1a4b
+ React-runtimeexecutor: d3ea7d497b9d6290303ef0d54bc3f6c482c6a885
+ React-runtimescheduler: 5e32929f1c06b9cd973cba45934c0b8e00b93a07
+ React-utils: a0a2d4e6c68f5c516f7312d5de358263ebbc24b4
+ ReactCommon: 0149853f505ea044776a09a1ed1cbdb90fa6ed4a
+ ReactCommon-Samples: 33e76e152cf1afe4b7ac0500cf758f54721afbc4
ScreenshotManager: b0e7b89964062d8655305156cd9c7ad0c836099f
SocketRocket: ce0a5a2620a4f749f45e494f1efa59d82e8b37f2
- Yoga: e8fb7473f2d90a5eb29c92cf9175e4118296d087
+ Yoga: bce6f2342e46cc6587a0273c232360c7e73be44a
PODFILE CHECKSUM: 011aeacfa9a55464d54974a9cc640af93fc896ce
From 50ce566c982ffe2b645e3aa97c02471be79b01b8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Oskar=20Kwas=CC=81niewski?=
Date: Wed, 18 Oct 2023 20:50:30 +0200
Subject: [PATCH 09/15] fix: presentation of alert controller
---
.../react-native/React/CoreModules/RCTAlertController.mm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/packages/react-native/React/CoreModules/RCTAlertController.mm b/packages/react-native/React/CoreModules/RCTAlertController.mm
index 2d9d3dcef83a34..c08da0261f7628 100644
--- a/packages/react-native/React/CoreModules/RCTAlertController.mm
+++ b/packages/react-native/React/CoreModules/RCTAlertController.mm
@@ -20,9 +20,11 @@ @implementation RCTAlertController
- (UIWindow *)alertWindow
{
if (_alertWindow == nil) {
+#if TARGET_OS_VISION
+ _alertWindow = [[UIWindow alloc] initWithFrame:CGRectZero];
+#else
_alertWindow = [self getUIWindowFromScene];
-
-#if !TARGET_OS_VISION
+
if (_alertWindow == nil) {
UIWindow *keyWindow = RCTSharedApplication().keyWindow;
if (keyWindow) {
From 499e1ae6de9cb8f0b6b9901246b904a8646fd7b7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?=
Date: Thu, 19 Oct 2023 13:39:39 +0200
Subject: [PATCH 10/15] docs: add link to rn-tester's README.md (#5)
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 3621904b39171b..a70e17ffd8a54d 100644
--- a/README.md
+++ b/README.md
@@ -17,4 +17,4 @@ This project is still at an early stage of development and is not ready for prod
1. Download latest Xcode beta [here](https://developer.apple.com/xcode/).
2. Install VisionOS Simulator runtime.
-3. Follow the same steps as for running iOS defined in `packages/rn-tester/README.md`
+3. Follow the same steps as for running iOS defined in [packages/rn-tester/README.md](./packages/rn-tester/README.md)
From cfad447c62cc868b82f8558b6708390ae810e708 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Ro=C5=BCniata?=
<56474758+krozniata@users.noreply.github.com>
Date: Fri, 20 Oct 2023 12:32:29 +0200
Subject: [PATCH 11/15] chore: change VisionOS to visionOS (#13)
---
README.md | 4 ++--
.../react-native/Libraries/Components/Pressable/Pressable.js | 2 +-
.../Libraries/Components/Touchable/TouchableOpacity.d.ts | 2 +-
.../react-native/Libraries/Components/View/ViewPropTypes.d.ts | 2 +-
.../react-native/Libraries/Components/View/ViewPropTypes.js | 2 +-
packages/react-native/React/Views/RCTViewManager.h | 2 +-
6 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/README.md b/README.md
index a70e17ffd8a54d..7b2c284cdb0ad2 100644
--- a/README.md
+++ b/README.md
@@ -9,12 +9,12 @@
Build spatial apps with React.
-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.
+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.
This project is still at an early stage of development and is not ready for production use.
## Contributing
1. Download latest Xcode beta [here](https://developer.apple.com/xcode/).
-2. Install VisionOS Simulator runtime.
+2. Install visionOS Simulator runtime.
3. Follow the same steps as for running iOS defined in [packages/rn-tester/README.md](./packages/rn-tester/README.md)
diff --git a/packages/react-native/Libraries/Components/Pressable/Pressable.js b/packages/react-native/Libraries/Components/Pressable/Pressable.js
index 5fa9e0a67d53aa..a0c4258ba30fb7 100644
--- a/packages/react-native/Libraries/Components/Pressable/Pressable.js
+++ b/packages/react-native/Libraries/Components/Pressable/Pressable.js
@@ -201,7 +201,7 @@ type Props = $ReadOnly<{|
*/
'aria-label'?: ?string,
/**
- * Props needed for VisionOS.
+ * Props needed for visionOS.
*/
...VisionOSProps,
|}>;
diff --git a/packages/react-native/Libraries/Components/Touchable/TouchableOpacity.d.ts b/packages/react-native/Libraries/Components/Touchable/TouchableOpacity.d.ts
index ec8485306a8050..f9b2e6a07f0df4 100644
--- a/packages/react-native/Libraries/Components/Touchable/TouchableOpacity.d.ts
+++ b/packages/react-native/Libraries/Components/Touchable/TouchableOpacity.d.ts
@@ -88,7 +88,7 @@ export interface TouchableOpacityProps
tvParallaxProperties?: TVParallaxProperties | undefined;
/**
- * Hover style to apply to the view. Only supported on VisionOS.
+ * Hover style to apply to the view. Only supported on visionOS.
*/
visionos_hoverEffect?: HoverEffect | undefined;
}
diff --git a/packages/react-native/Libraries/Components/View/ViewPropTypes.d.ts b/packages/react-native/Libraries/Components/View/ViewPropTypes.d.ts
index 70db99ee7aca85..3d1b87d8455990 100644
--- a/packages/react-native/Libraries/Components/View/ViewPropTypes.d.ts
+++ b/packages/react-native/Libraries/Components/View/ViewPropTypes.d.ts
@@ -125,7 +125,7 @@ export interface ViewPropsIOS extends TVViewPropsIOS {
*/
shouldRasterizeIOS?: boolean | undefined;
/**
- * Hover style to apply to the view. Only supported on VisionOS.
+ * Hover style to apply to the view. Only supported on visionOS.
*/
visionos_hoverEffect?: HoverEffect | undefined;
}
diff --git a/packages/react-native/Libraries/Components/View/ViewPropTypes.js b/packages/react-native/Libraries/Components/View/ViewPropTypes.js
index e368d2a720de81..8991759e403cb9 100644
--- a/packages/react-native/Libraries/Components/View/ViewPropTypes.js
+++ b/packages/react-native/Libraries/Components/View/ViewPropTypes.js
@@ -455,7 +455,7 @@ type IOSViewProps = $ReadOnly<{|
shouldRasterizeIOS?: ?boolean,
/**
- * Hover style to apply to the view. Only supported on VisionOS.
+ * Hover style to apply to the view. Only supported on visionOS.
*/
visionos_hoverEffect?: ?HoverEffect,
|}>;
diff --git a/packages/react-native/React/Views/RCTViewManager.h b/packages/react-native/React/Views/RCTViewManager.h
index ca76e780b720c5..9cde0f096d513d 100644
--- a/packages/react-native/React/Views/RCTViewManager.h
+++ b/packages/react-native/React/Views/RCTViewManager.h
@@ -81,7 +81,7 @@ typedef void (^RCTViewManagerUIBlock)(RCTUIManager *uiManager, NSDictionary
Date: Fri, 20 Oct 2023 16:26:14 +0200
Subject: [PATCH 12/15] chore: use `min_supported_versions` for
third-party-podspecs (#18)
---
.../third-party-podspecs/SocketRocket.podspec | 5 +-
.../third-party-podspecs/YogaKit.podspec | 2 +-
.../third-party-podspecs/libevent.podspec | 2 +-
packages/rn-tester/Podfile.lock | 92 +++++++++----------
4 files changed, 49 insertions(+), 52 deletions(-)
diff --git a/packages/react-native/third-party-podspecs/SocketRocket.podspec b/packages/react-native/third-party-podspecs/SocketRocket.podspec
index 46d4b8b2b7b8fe..7e65ab07b1710a 100644
--- a/packages/react-native/third-party-podspecs/SocketRocket.podspec
+++ b/packages/react-native/third-party-podspecs/SocketRocket.podspec
@@ -11,10 +11,7 @@ Pod::Spec.new do |s|
s.source_files = 'SocketRocket/**/*.{h,m}'
s.public_header_files = 'SocketRocket/*.h'
- s.ios.deployment_target = '9.0'
- s.osx.deployment_target = '10.9'
- s.tvos.deployment_target = '9.0'
- s.visionos.deployment_target = '1.0'
+ s.platforms = min_supported_versions
s.ios.frameworks = 'CFNetwork', 'Security'
s.osx.frameworks = 'CoreServices', 'Security'
diff --git a/packages/react-native/third-party-podspecs/YogaKit.podspec b/packages/react-native/third-party-podspecs/YogaKit.podspec
index ec2c5654a351b4..febbb126ee9302 100644
--- a/packages/react-native/third-party-podspecs/YogaKit.podspec
+++ b/packages/react-native/third-party-podspecs/YogaKit.podspec
@@ -19,7 +19,7 @@ podspec = Pod::Spec.new do |spec|
:tag => "1.18.0",
}
- spec.platforms = { :ios => "9.0", :visionos => "1.0" }
+ spec.platforms = min_supported_versions
spec.ios.deployment_target = '8.0'
spec.ios.frameworks = 'UIKit'
spec.module_name = 'YogaKit'
diff --git a/packages/react-native/third-party-podspecs/libevent.podspec b/packages/react-native/third-party-podspecs/libevent.podspec
index 7051785f86552a..c917f0227be3fd 100644
--- a/packages/react-native/third-party-podspecs/libevent.podspec
+++ b/packages/react-native/third-party-podspecs/libevent.podspec
@@ -544,7 +544,7 @@ Pod::Spec.new do |spec|
spec.homepage = "https://libevent.org"
spec.license = { :type => "BSD 3-Clause", :file => "LICENSE" }
spec.author = "Niels Provos and Nick Mathewson"
- spec.platforms = { :osx => "10.13", :ios => "10.0", :tvos => "10.0", :visionos => "1.0" }
+ spec.platforms = min_supported_versions
spec.source = { :git => "https://github.com/libevent/libevent.git", :tag => "release-2.1.12-stable" }
spec.prepare_command = "echo 'executing libevent prepare command'; touch evconfig-private.h; echo -e #{Shellwords.escape(CONFIG_WITHOUT_OPENSSL)} > include/event2/event-config.h; ls include/event2/"
spec.source_files =
diff --git a/packages/rn-tester/Podfile.lock b/packages/rn-tester/Podfile.lock
index dade32ff3acc00..515051a7f8a22a 100644
--- a/packages/rn-tester/Podfile.lock
+++ b/packages/rn-tester/Podfile.lock
@@ -1176,57 +1176,57 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
boost: 3f76a4d6d9d0f232d25b7782f83fcf988f47d517
DoubleConversion: 71bf0761505a44e4dfddc0aa04afa049fdfb63b5
- FBLazyVector: 0506222a1bca4e371cd88cb686ecaec57260af25
- FBReactNativeSpec: eacc4acb0ce267528afcdab4fb12c2d930881303
+ FBLazyVector: 5ae63b8f5ec7e2b1c11bd93afe0266da46db22f0
+ FBReactNativeSpec: fd8616a9c8296ad878cbb98b2349ae15ce6b464d
fmt: 5d9ffa7ccba126c08b730252123601d514652320
glog: 4f05d17aa39a829fee878689fc9a41af587fabba
RCT-Folly: 35de8f372fc3e617131511a6f16028db5c3db620
- RCTRequired: b17b137406dbee1698d98e3bfb7c027210c80224
- RCTTypeSafety: 78ce101859404819efce5ccb5aec542444aa96c6
- React: d45f4db4586d44df30ad0e047e0be44e20eb6bdc
- React-callinvoker: 1dbb4501d8b5e4f1ececdcf6c59541bc977dc0a0
+ RCTRequired: 78aba3d42dd83a8b4b911fe3bcd34649d57a7661
+ RCTTypeSafety: e1e5b7f5580eec584cd33a7c8c49363efae598ba
+ React: 9e2fca95cff5ec352c09701e71b7924307deeadb
+ React-callinvoker: f56d5f2ab5517c849bcc034be258eae46eec7d8e
React-Codegen: cf0df8a0b283dbc95590d1d523511b1278f0aeaf
- React-Core: 497ec9ec3e31e536e8a4309793fed6dc95d87fdf
- React-CoreModules: 5b96f76dd9e1f2c7df7e2e6abd1dfc6a823100cb
- React-cxxreact: ca7150cf50de8727a01d24ebb87ccb8f19c6367a
- React-debug: 27a1707213fc5b498fbe25772e6218741fe5dc44
- React-Fabric: dbcac2d273c44e26127f91e78a316d250b7d5daa
- React-FabricImage: 9cc7b65f9f809deadd71071d91c9171749769eb7
- React-graphics: b0efadaced3487d3bf4e3ff3db38e44ca00d197c
- React-ImageManager: 4549b521e28574561ff4d40e6ab6541284bbfe46
- React-jsc: 626fe8db69ad14e7e628b3dc2677fad420b36072
- React-jserrorhandler: 3ef6ce284e8d71e4ff53b0419e9183c65fb8e050
- React-jsi: 2c59afa4ac6857d132da11c64d0ce585d7113b77
- React-jsiexecutor: 651c98a2d4e527f450091a299c18a75b1f3e3fef
- React-jsinspector: 1df15c3eaadd5057b943a55c75f2570a0e198299
- React-logger: d1472f4ec44cf44b1d66f63c9242a948f79fceba
- React-Mapbuffer: 8dfda16da3cd9dbd21f96ecce86ca915e4154eb5
- React-nativeconfig: 79c75b1781087b5316027e92632ba5e7519615be
- React-NativeModulesApple: 7be23055626885bf4eed7022fdaeee337d5e818b
- React-perflogger: efec48c21b2c13d382c80ffd364b427b2636439d
- React-RCTActionSheet: 672e5e8b4c90a427f07898eac23df0e3b843f3de
- React-RCTAnimation: 8eac4e16cb16c7b8276df8fa61ca1c2effcaf366
- React-RCTAppDelegate: 94d7252db258806b86243106d0c81fb63cb022ae
- React-RCTBlob: 2a5ec6e80a0c5d2df0c8254e6f0a1c40158e2528
- React-RCTFabric: 02b2c32b6d066ab80a065eba14848b5301ef9b65
- React-RCTImage: 3870795db19a13a546db20fd2526aa1e626a6d31
- React-RCTLinking: 43f1f9f621db1b291f91a2afa5f30af3f90a642f
- React-RCTNetwork: 0237480a8b59bc96933f8c91d2ebb1ccf7ea8e71
- React-RCTPushNotification: e3ad38becfc4abe43f8e83317af90a635b3837d0
- React-RCTSettings: e3857df2fdcfe9b86804b64adab551a62c3d86f2
- React-RCTTest: 8e07b591897bdd59c306f7e37aad8b89d3e37040
- React-RCTText: 9ff88016ea3f9245447013abb176b1d39061c45f
- React-RCTVibration: 79b08baabc9f890590a67b6460647fe7bca7f097
- React-rendererdebug: 09e253751ad438eacac845523ebe1d5bfd708f70
- React-rncore: f34c4ee457c96a013fbf8d1c415f89d3050b1a4b
- React-runtimeexecutor: d3ea7d497b9d6290303ef0d54bc3f6c482c6a885
- React-runtimescheduler: 5e32929f1c06b9cd973cba45934c0b8e00b93a07
- React-utils: a0a2d4e6c68f5c516f7312d5de358263ebbc24b4
- ReactCommon: 0149853f505ea044776a09a1ed1cbdb90fa6ed4a
- ReactCommon-Samples: 33e76e152cf1afe4b7ac0500cf758f54721afbc4
+ React-Core: da674a57e1dcc6e56d4dc5963e1c3ab86373453c
+ React-CoreModules: 045bdcbf0f58670ec2d42232bb182e4ec77f70d1
+ React-cxxreact: 8ea89133dc258f0939ca9b6b021f1143445bf4a5
+ React-debug: 32ae3c1866eb05084dec885ef19668aa5736ea8a
+ React-Fabric: 21bc6607dc06bb14d67514d4624c6c913e39c273
+ React-FabricImage: edaf3cd45a0db1cece7f24af098df7d268710f13
+ React-graphics: bd151c6e9640ee9329d594232e6b0a457037845f
+ React-ImageManager: 1ed36c6ffb469e9b51273930876ae88eb8881400
+ React-jsc: 3ff5982e8bf5c32548042a4a24bfa9085cad6666
+ React-jserrorhandler: 5dee33b5949d0ec7c3d406736e7ca3b917783f24
+ React-jsi: 25b7d827cf2c6729c2d81e331a285dca6dfed24b
+ React-jsiexecutor: 38cf9e752c217fb54dac08be3a85030032cdd860
+ React-jsinspector: 1cf3f1a25bc569d57e229399eff8d4e783e08cdf
+ React-logger: 2b149c568aa5c31dabc301392a467fa8f98b4761
+ React-Mapbuffer: 09f3aaec47e82085fe0c598f7d598a9af0365c02
+ React-nativeconfig: 7d989b5064720b77589c72be5b7cbecbcf2ce657
+ React-NativeModulesApple: 352228420772d515df2ebc520292f79338cc2408
+ React-perflogger: fc9637805767d09b40cfe8e875b35cd7bdce198f
+ React-RCTActionSheet: 8268ac960efb7e7e789d89daf41eea1ff577c26c
+ React-RCTAnimation: 334cbc91778f2d7448feb0c0c92e6528b60643dd
+ React-RCTAppDelegate: 55cbdc2b3367b8515bd343f721ec820c421c072e
+ React-RCTBlob: 1de55d2a17a9058db2136bec3513243a43f60f17
+ React-RCTFabric: db1f4c27bbbaa8aa0462e2aedce4a5f4b8bc9b45
+ React-RCTImage: 7c95ba617e7b480d060adcaf34b597bedbd99838
+ React-RCTLinking: 011c2ddf94714178cbfc93c66bd891aef7e1321c
+ React-RCTNetwork: 418141ba010ca060e82148e3e8fe8d9669a7889c
+ React-RCTPushNotification: ad6530c623b48fcec78655b1fcccdc68530baf1e
+ React-RCTSettings: e766fc9ae96f80151761d73faa99c9f192e65741
+ React-RCTTest: 3849a569cf141aa39a48f3c1774b706cf412343d
+ React-RCTText: 13d9c31c186f0a24ca925c4575c8074fab392f6f
+ React-RCTVibration: 98d36884a8b79524ab2fd51d26ca4119cf6646ba
+ React-rendererdebug: 7db42aa24b64b0f07b3a82599d3dfac08d8341c6
+ React-rncore: 3e1fb90ac6825ea36c9dff4d18cbfa449a2c5865
+ React-runtimeexecutor: 3f1e64a8eaeee42445d3721d13f8e1408c9140eb
+ React-runtimescheduler: 540948bc325a7160ca9bad1e999c28591284ae65
+ React-utils: 9ff24358244e381242878d417a779c22b151e317
+ ReactCommon: 27ca79dfa807f4c1d60a847301746bc27b930698
+ ReactCommon-Samples: 274bb8230c1ed6734aec877c86b8c8be355ef830
ScreenshotManager: b0e7b89964062d8655305156cd9c7ad0c836099f
- SocketRocket: ce0a5a2620a4f749f45e494f1efa59d82e8b37f2
- Yoga: bce6f2342e46cc6587a0273c232360c7e73be44a
+ SocketRocket: 0ba3e799f983d2dfa878777017659ef6c866e5c6
+ Yoga: 5e0fb617bd1ec19170151acece834a4c47a2bf43
PODFILE CHECKSUM: 011aeacfa9a55464d54974a9cc640af93fc896ce
From e42266166c640304305d80457c4e395e28e6f722 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Oskar=20Kwa=C5=9Bniewski?=
Date: Thu, 26 Oct 2023 16:14:38 +0200
Subject: [PATCH 13/15] chore: remove not necessary ifs TARGET_OS_VISION,
minimise code diff (#22)
---
.../RCTPushNotificationManager.mm | 2 +-
.../react-native/React/CoreModules/RCTDeviceInfo.mm | 12 ++++++------
.../React/CoreModules/RCTStatusBarManager.mm | 6 ++++--
.../React/Views/RCTWrapperViewController.m | 3 ---
.../React/Views/ScrollView/RCTScrollViewManager.h | 2 --
.../React/Views/ScrollView/RCTScrollViewManager.m | 2 --
packages/rn-tester/RNTester/AppDelegate.mm | 6 ++++--
7 files changed, 15 insertions(+), 18 deletions(-)
diff --git a/packages/react-native/Libraries/PushNotificationIOS/RCTPushNotificationManager.mm b/packages/react-native/Libraries/PushNotificationIOS/RCTPushNotificationManager.mm
index ebb9558b06b186..87bd1142bf5a55 100644
--- a/packages/react-native/Libraries/PushNotificationIOS/RCTPushNotificationManager.mm
+++ b/packages/react-native/Libraries/PushNotificationIOS/RCTPushNotificationManager.mm
@@ -96,7 +96,7 @@ @implementation RCTConvert (UIBackgroundFetchResult)
@end
#else
-@interface RCTPushNotificationManager ()
+@interface RCTPushNotificationManager ()
@end
#endif // TARGET_OS_UIKITFORMAC
diff --git a/packages/react-native/React/CoreModules/RCTDeviceInfo.mm b/packages/react-native/React/CoreModules/RCTDeviceInfo.mm
index 4bfaa4aae05c9c..242c4da305f610 100644
--- a/packages/react-native/React/CoreModules/RCTDeviceInfo.mm
+++ b/packages/react-native/React/CoreModules/RCTDeviceInfo.mm
@@ -89,14 +89,14 @@ static BOOL RCTIsIPhoneNotched()
{
static BOOL isIPhoneNotched = NO;
#if !TARGET_OS_VISION
- static dispatch_once_t onceToken;
+ static dispatch_once_t onceToken;
- dispatch_once(&onceToken, ^{
- RCTAssertMainQueue();
+ dispatch_once(&onceToken, ^{
+ RCTAssertMainQueue();
- // 20pt is the top safeArea value in non-notched devices
- isIPhoneNotched = RCTSharedApplication().keyWindow.safeAreaInsets.top > 20;
- });
+ // 20pt is the top safeArea value in non-notched devices
+ isIPhoneNotched = RCTSharedApplication().keyWindow.safeAreaInsets.top > 20;
+});
#endif
return isIPhoneNotched;
}
diff --git a/packages/react-native/React/CoreModules/RCTStatusBarManager.mm b/packages/react-native/React/CoreModules/RCTStatusBarManager.mm
index af2154d0dea098..4cc09edc54010c 100644
--- a/packages/react-native/React/CoreModules/RCTStatusBarManager.mm
+++ b/packages/react-native/React/CoreModules/RCTStatusBarManager.mm
@@ -162,7 +162,7 @@ - (void)applicationWillChangeStatusBarFrame:(NSNotification *)notification
} else {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- [RCTSharedApplication() setStatusBarHidden:hidden withAnimation:animation];
+ [RCTSharedApplication() setStatusBarHidden:hidden withAnimation:animation];
#pragma clang diagnostic pop
}
});
@@ -172,7 +172,9 @@ - (void)applicationWillChangeStatusBarFrame:(NSNotification *)notification
RCT_EXPORT_METHOD(setNetworkActivityIndicatorVisible : (BOOL)visible)
{
#if !TARGET_OS_VISION
- RCTSharedApplication().networkActivityIndicatorVisible = visible;
+ dispatch_async(dispatch_get_main_queue(), ^{
+ RCTSharedApplication().networkActivityIndicatorVisible = visible;
+ });
#endif
}
diff --git a/packages/react-native/React/Views/RCTWrapperViewController.m b/packages/react-native/React/Views/RCTWrapperViewController.m
index 7b455799e1571a..eb041ad79a646e 100644
--- a/packages/react-native/React/Views/RCTWrapperViewController.m
+++ b/packages/react-native/React/Views/RCTWrapperViewController.m
@@ -29,9 +29,6 @@ - (instancetype)initWithContentView:(UIView *)contentView
if ((self = [super initWithNibName:nil bundle:nil])) {
_contentView = contentView;
-#if !TARGET_OS_VISION
- self.automaticallyAdjustsScrollViewInsets = NO;
-#endif
}
return self;
}
diff --git a/packages/react-native/React/Views/ScrollView/RCTScrollViewManager.h b/packages/react-native/React/Views/ScrollView/RCTScrollViewManager.h
index 5ff19178f30b70..b4aefe228c3fd5 100644
--- a/packages/react-native/React/Views/ScrollView/RCTScrollViewManager.h
+++ b/packages/react-native/React/Views/ScrollView/RCTScrollViewManager.h
@@ -21,5 +21,3 @@
@interface RCTScrollViewManager : RCTViewManager
@end
-
-
diff --git a/packages/react-native/React/Views/ScrollView/RCTScrollViewManager.m b/packages/react-native/React/Views/ScrollView/RCTScrollViewManager.m
index a8d017d055774e..551055fe791b03 100644
--- a/packages/react-native/React/Views/ScrollView/RCTScrollViewManager.m
+++ b/packages/react-native/React/Views/ScrollView/RCTScrollViewManager.m
@@ -12,8 +12,6 @@
#import "RCTShadowView.h"
#import "RCTUIManager.h"
-
-
@implementation RCTConvert (UIScrollView)
#if !TARGET_OS_VISION
diff --git a/packages/rn-tester/RNTester/AppDelegate.mm b/packages/rn-tester/RNTester/AppDelegate.mm
index d29a54cfa3246d..4ec057527aecd7 100644
--- a/packages/rn-tester/RNTester/AppDelegate.mm
+++ b/packages/rn-tester/RNTester/AppDelegate.mm
@@ -12,7 +12,7 @@
#import
#import
-#if !TARGET_OS_TV && !TARGET_OS_UIKITFORMAC && !TARGET_OS_VISION
+#if !TARGET_OS_TV && !TARGET_OS_UIKITFORMAC
#import
#endif
@@ -86,7 +86,7 @@ - (void)loadSourceForBridge:(RCTBridge *)bridge
return nullptr;
}
-#if !TARGET_OS_TV && !TARGET_OS_UIKITFORMAC && !TARGET_OS_VISION
+#if !TARGET_OS_TV && !TARGET_OS_UIKITFORMAC
// Required for the remoteNotificationsRegistered event.
- (void)application:(__unused UIApplication *)application
@@ -102,6 +102,7 @@ - (void)application:(__unused UIApplication *)application
[RCTPushNotificationManager didFailToRegisterForRemoteNotificationsWithError:error];
}
+#if !TARGET_OS_VISION
// Required for the remoteNotificationReceived event.
- (void)application:(__unused UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)notification
{
@@ -114,6 +115,7 @@ - (void)application:(__unused UIApplication *)application
{
[RCTPushNotificationManager didReceiveLocalNotification:notification];
}
+#endif
#endif
From 6bf6ed67f034b9f775ea1211a03adbc27eb8c691 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Oskar=20Kwas=CC=81niewski?=
Date: Fri, 27 Oct 2023 09:32:24 +0200
Subject: [PATCH 14/15] chore: sync Podfile.lock
---
packages/rn-tester/Podfile.lock | 90 ++++++++++++++++-----------------
1 file changed, 45 insertions(+), 45 deletions(-)
diff --git a/packages/rn-tester/Podfile.lock b/packages/rn-tester/Podfile.lock
index 515051a7f8a22a..378d796ed18ff2 100644
--- a/packages/rn-tester/Podfile.lock
+++ b/packages/rn-tester/Podfile.lock
@@ -1176,57 +1176,57 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
boost: 3f76a4d6d9d0f232d25b7782f83fcf988f47d517
DoubleConversion: 71bf0761505a44e4dfddc0aa04afa049fdfb63b5
- FBLazyVector: 5ae63b8f5ec7e2b1c11bd93afe0266da46db22f0
- FBReactNativeSpec: fd8616a9c8296ad878cbb98b2349ae15ce6b464d
+ FBLazyVector: 66e9a277e9bdb4cb788ecba385ebdf5dd4c83d5a
+ FBReactNativeSpec: 3d0321f18f2ea690d7c1ba975e9e85d282bbbcff
fmt: 5d9ffa7ccba126c08b730252123601d514652320
glog: 4f05d17aa39a829fee878689fc9a41af587fabba
RCT-Folly: 35de8f372fc3e617131511a6f16028db5c3db620
- RCTRequired: 78aba3d42dd83a8b4b911fe3bcd34649d57a7661
- RCTTypeSafety: e1e5b7f5580eec584cd33a7c8c49363efae598ba
- React: 9e2fca95cff5ec352c09701e71b7924307deeadb
- React-callinvoker: f56d5f2ab5517c849bcc034be258eae46eec7d8e
+ RCTRequired: 2b88e91330175f689446739f97fe1e76689bdd41
+ RCTTypeSafety: 8151789a8d06fb60461e16756c2d4a698f956c32
+ React: 1281d9b95305df44cfd7c77a85ca94ee661b9b0c
+ React-callinvoker: fcd0f449fdb0818881fd1d58aadaac37ae53382b
React-Codegen: cf0df8a0b283dbc95590d1d523511b1278f0aeaf
- React-Core: da674a57e1dcc6e56d4dc5963e1c3ab86373453c
- React-CoreModules: 045bdcbf0f58670ec2d42232bb182e4ec77f70d1
- React-cxxreact: 8ea89133dc258f0939ca9b6b021f1143445bf4a5
- React-debug: 32ae3c1866eb05084dec885ef19668aa5736ea8a
- React-Fabric: 21bc6607dc06bb14d67514d4624c6c913e39c273
- React-FabricImage: edaf3cd45a0db1cece7f24af098df7d268710f13
- React-graphics: bd151c6e9640ee9329d594232e6b0a457037845f
- React-ImageManager: 1ed36c6ffb469e9b51273930876ae88eb8881400
- React-jsc: 3ff5982e8bf5c32548042a4a24bfa9085cad6666
- React-jserrorhandler: 5dee33b5949d0ec7c3d406736e7ca3b917783f24
- React-jsi: 25b7d827cf2c6729c2d81e331a285dca6dfed24b
- React-jsiexecutor: 38cf9e752c217fb54dac08be3a85030032cdd860
- React-jsinspector: 1cf3f1a25bc569d57e229399eff8d4e783e08cdf
- React-logger: 2b149c568aa5c31dabc301392a467fa8f98b4761
- React-Mapbuffer: 09f3aaec47e82085fe0c598f7d598a9af0365c02
- React-nativeconfig: 7d989b5064720b77589c72be5b7cbecbcf2ce657
- React-NativeModulesApple: 352228420772d515df2ebc520292f79338cc2408
- React-perflogger: fc9637805767d09b40cfe8e875b35cd7bdce198f
- React-RCTActionSheet: 8268ac960efb7e7e789d89daf41eea1ff577c26c
- React-RCTAnimation: 334cbc91778f2d7448feb0c0c92e6528b60643dd
- React-RCTAppDelegate: 55cbdc2b3367b8515bd343f721ec820c421c072e
- React-RCTBlob: 1de55d2a17a9058db2136bec3513243a43f60f17
- React-RCTFabric: db1f4c27bbbaa8aa0462e2aedce4a5f4b8bc9b45
- React-RCTImage: 7c95ba617e7b480d060adcaf34b597bedbd99838
- React-RCTLinking: 011c2ddf94714178cbfc93c66bd891aef7e1321c
- React-RCTNetwork: 418141ba010ca060e82148e3e8fe8d9669a7889c
- React-RCTPushNotification: ad6530c623b48fcec78655b1fcccdc68530baf1e
- React-RCTSettings: e766fc9ae96f80151761d73faa99c9f192e65741
- React-RCTTest: 3849a569cf141aa39a48f3c1774b706cf412343d
- React-RCTText: 13d9c31c186f0a24ca925c4575c8074fab392f6f
- React-RCTVibration: 98d36884a8b79524ab2fd51d26ca4119cf6646ba
- React-rendererdebug: 7db42aa24b64b0f07b3a82599d3dfac08d8341c6
- React-rncore: 3e1fb90ac6825ea36c9dff4d18cbfa449a2c5865
- React-runtimeexecutor: 3f1e64a8eaeee42445d3721d13f8e1408c9140eb
- React-runtimescheduler: 540948bc325a7160ca9bad1e999c28591284ae65
- React-utils: 9ff24358244e381242878d417a779c22b151e317
- ReactCommon: 27ca79dfa807f4c1d60a847301746bc27b930698
- ReactCommon-Samples: 274bb8230c1ed6734aec877c86b8c8be355ef830
+ React-Core: c05dad22a75a99c3f0569c727d2c46bdae18f787
+ React-CoreModules: cb89ae59fad5f0f0eff5e451fd8bbf23ad483285
+ React-cxxreact: ab646b2f6fcbe8668dc7878560a6408414984e22
+ React-debug: 90f7a403caa0ffeb482479bff3c6fe4ef48a905d
+ React-Fabric: d5f15465ad52721c3817ea16fe28092257456710
+ React-FabricImage: 395990b3406e0aac9b1cdaff6fe73631972fe17d
+ React-graphics: 6cb331f696e663d4767b19dfeab32e56c5f946d9
+ React-ImageManager: fa5f77ab6eeabbd1636cc0b70935b183d417ef4d
+ React-jsc: f01c456df84f43d206d3887850a3bb380dc0ed31
+ React-jserrorhandler: 32778d8efd7998cf822b59d5466077f9e9fdc29a
+ React-jsi: 8631af25f10ed0e8d7ef37f6cc06a3c04bd8fa0a
+ React-jsiexecutor: eb6f5eb5a5e08cdb6f2c0a87913b1639b3c4afe2
+ React-jsinspector: 283f601ed64279a923de836c7a437be0dda7d426
+ React-logger: 2a0c0918880949078aa8cd5e44bb1011f651e046
+ React-Mapbuffer: e9f907e1c8a2f9128a3af886547aa878dac9fcd2
+ React-nativeconfig: 127ee8083fd5cad3e681c739a0495689b0ccf773
+ React-NativeModulesApple: 14dc54e843af0793e89c7a14663ed5e2a1a29e79
+ React-perflogger: a91aea56500e94da632d97daa3ff9cb213294c87
+ React-RCTActionSheet: 0167f0f5238fb1e85e1806647cdcafc4a06dfbc3
+ React-RCTAnimation: 26e2ffecdaa8d479304cda029dd97c87f6607601
+ React-RCTAppDelegate: fc687e10f10d5759c5ee917b1d876faf2656c8fe
+ React-RCTBlob: 444f6d77040a88c3f9a1859882f94a8c8e571387
+ React-RCTFabric: 8472c491a4aa0f92eeafd3d1b40097471f1b92e9
+ React-RCTImage: eaf674b53c964392d910401433c73b5f807ba2c4
+ React-RCTLinking: e4b4c9b238c99e70a1ec66da02db80be494c8c27
+ React-RCTNetwork: c779ee2e99799bee5a9f3c41e4987d5f97706abc
+ React-RCTPushNotification: d63a8f9a1f6f6f2994ad2a4f93b808096887de39
+ React-RCTSettings: 457422913942d72b086310feda7588663234c3bc
+ React-RCTTest: 377a30139134620d300f20b0b092c28b9fb6c2c0
+ React-RCTText: b61bded86e179a85e6f04f18931a59762b4fedc1
+ React-RCTVibration: d982689434ede9a33f864a31b2900b4792b4b22d
+ React-rendererdebug: 307da5a2cbee7873130b780ec8c7745b86e96efc
+ React-rncore: 62c493de987e94b6ea2059bf207c8bc001f51127
+ React-runtimeexecutor: 2ed24fa2b93d7c0dc1aef9f751126ea40362d91a
+ React-runtimescheduler: 21e8493fe8dba4dc5cafb01a3c29cf7c88b75624
+ React-utils: e91a980ea0a0d4b6d75d277d1960d3492024b7b8
+ ReactCommon: e0adfa3d0224d2fb73edc4bc352cafcba87225c7
+ ReactCommon-Samples: adc4baeaeedb1b689267b60bad92dbfe7a99ac1b
ScreenshotManager: b0e7b89964062d8655305156cd9c7ad0c836099f
SocketRocket: 0ba3e799f983d2dfa878777017659ef6c866e5c6
- Yoga: 5e0fb617bd1ec19170151acece834a4c47a2bf43
+ Yoga: 9658effb03398eca0b8f47f765dd9ad8a42061e5
PODFILE CHECKSUM: 011aeacfa9a55464d54974a9cc640af93fc896ce
From 7e38e517a8ae625c5b8c052999e8464c6d697ec4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Oskar=20Kwas=CC=81niewski?=
Date: Fri, 27 Oct 2023 09:44:40 +0200
Subject: [PATCH 15/15] feat: properly retrieve displayScale for visionOS
---
packages/react-native/React/Base/RCTUtils.m | 14 ++++++++------
.../ComponentViews/View/RCTViewComponentView.mm | 2 +-
packages/react-native/React/Views/RCTViewManager.m | 3 ++-
.../RCTTest/FBSnapshotTestCase/UIImage+Compare.m | 4 ++++
4 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/packages/react-native/React/Base/RCTUtils.m b/packages/react-native/React/Base/RCTUtils.m
index 19362b6746b6d6..529c47407c37ec 100644
--- a/packages/react-native/React/Base/RCTUtils.m
+++ b/packages/react-native/React/Base/RCTUtils.m
@@ -301,23 +301,25 @@ static void RCTUnsafeExecuteOnMainQueueOnceSync(dispatch_once_t *onceToken, disp
void RCTComputeScreenScale(void)
{
-#if !TARGET_OS_VISION
dispatch_once(&onceTokenScreenScale, ^{
+#if TARGET_OS_VISION
+ screenScale = [UITraitCollection currentTraitCollection].displayScale;
+#else
screenScale = [UIScreen mainScreen].scale;
- });
#endif
+ });
}
CGFloat RCTScreenScale(void)
{
-#if !TARGET_OS_VISION
RCTUnsafeExecuteOnMainQueueOnceSync(&onceTokenScreenScale, ^{
+#if TARGET_OS_VISION
+ screenScale = [UITraitCollection currentTraitCollection].displayScale;
+#else
screenScale = [UIScreen mainScreen].scale;
+#endif
});
return screenScale;
-#endif
-
- return 2;
}
CGFloat RCTFontSizeMultiplier(void)
diff --git a/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm b/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm
index d5083c8e65b59e..dc877453bb4d42 100644
--- a/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm
+++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm
@@ -255,7 +255,7 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared &
#if !TARGET_OS_VISION
self.layer.rasterizationScale = newViewProps.shouldRasterize ? [UIScreen mainScreen].scale : 1.0;
#else
- self.layer.rasterizationScale = 1.0;
+ self.layer.rasterizationScale = newViewProps.shouldRasterize ? [UITraitCollection currentTraitCollection].displayScale : 1.0;
#endif
}
diff --git a/packages/react-native/React/Views/RCTViewManager.m b/packages/react-native/React/Views/RCTViewManager.m
index a25c0cd498b4a7..5d5d9f9fe2dd6a 100644
--- a/packages/react-native/React/Views/RCTViewManager.m
+++ b/packages/react-native/React/Views/RCTViewManager.m
@@ -214,7 +214,8 @@ - (RCTShadowView *)shadowView
{
view.layer.shouldRasterize = json ? [RCTConvert BOOL:json] : defaultView.layer.shouldRasterize;
#if TARGET_OS_VISION
- view.layer.rasterizationScale = defaultView.layer.rasterizationScale;
+ view.layer.rasterizationScale =
+ view.layer.shouldRasterize ? [UITraitCollection currentTraitCollection].displayScale : defaultView.layer.rasterizationScale;
#else
view.layer.rasterizationScale =
view.layer.shouldRasterize ? [UIScreen mainScreen].scale : defaultView.layer.rasterizationScale;
diff --git a/packages/rn-tester/RCTTest/FBSnapshotTestCase/UIImage+Compare.m b/packages/rn-tester/RCTTest/FBSnapshotTestCase/UIImage+Compare.m
index 2ddf514138d0d1..39fbcac5d05a0e 100644
--- a/packages/rn-tester/RCTTest/FBSnapshotTestCase/UIImage+Compare.m
+++ b/packages/rn-tester/RCTTest/FBSnapshotTestCase/UIImage+Compare.m
@@ -42,7 +42,11 @@ - (BOOL)compareWithImage:(UIImage *)image
CGImageGetColorSpace(image.CGImage),
(CGBitmapInfo)kCGImageAlphaPremultipliedLast);
+#if TARGET_OS_VISION
+ CGFloat scaleFactor = [UITraitCollection currentTraitCollection].displayScale;
+#else
CGFloat scaleFactor = [UIScreen mainScreen].scale;
+#endif
CGContextScaleCTM(referenceImageContext, scaleFactor, scaleFactor);
CGContextScaleCTM(imageContext, scaleFactor, scaleFactor);