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