diff --git a/packages/react-native/Libraries/LinkingIOS/RCTLinkingManager.mm b/packages/react-native/Libraries/LinkingIOS/RCTLinkingManager.mm index f0c943f6aa30..eb3e18ef79da 100644 --- a/packages/react-native/Libraries/LinkingIOS/RCTLinkingManager.mm +++ b/packages/react-native/Libraries/LinkingIOS/RCTLinkingManager.mm @@ -5,6 +5,9 @@ * LICENSE file in the root directory of this source tree. */ +#import +#if !TARGET_OS_OSX // [macOS] + #import #import @@ -205,3 +208,5 @@ Class RCTLinkingManagerCls(void) { return RCTLinkingManager.class; } + +#endif // !TARGET_OS_OSX [macOS] diff --git a/packages/react-native/Libraries/LinkingIOS/macos/RCTLinkingManager.mm b/packages/react-native/Libraries/LinkingIOS/macos/RCTLinkingManager.mm index 6b0108d8da3f..3a427e3552f6 100644 --- a/packages/react-native/Libraries/LinkingIOS/macos/RCTLinkingManager.mm +++ b/packages/react-native/Libraries/LinkingIOS/macos/RCTLinkingManager.mm @@ -7,12 +7,16 @@ // [macOS] -#import "RCTLinkingManager.h" +#import +#if TARGET_OS_OSX // [macOS] + +#import #import #import #import +#import #import #import "RCTLinkingPlugins.h" @@ -23,6 +27,9 @@ static BOOL moduleInitalized = NO; static BOOL alwaysForegroundLastWindow = YES; +@interface RCTLinkingManager () +@end + static void postNotificationWithURL(NSString *url, id sender) { NSDictionary *payload = @{@"url": url}; @@ -116,8 +123,34 @@ - (void)handleOpenURLNotification:(NSNotification *)notification { resolve(RCTNullIfNil(initialURL)); } + +RCT_EXPORT_METHOD(openSettings:(RCTPromiseResolveBlock)resolve + reject:(__unused RCTPromiseRejectBlock)reject) +{ + // macOS doesn't have a direct equivalent of UIApplicationOpenSettingsURLString + // Open System Preferences instead + [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"x-apple.systempreferences:"]]; + resolve(nil); +} + +RCT_EXPORT_METHOD(sendIntent:(NSString *)action + extras:(NSArray *_Nullable)extras + resolve:(RCTPromiseResolveBlock)resolve + reject:(RCTPromiseRejectBlock)reject) +{ + RCTLogError(@"Not implemented: %@", NSStringFromSelector(_cmd)); +} + +- (std::shared_ptr)getTurboModule: + (const facebook::react::ObjCTurboModule::InitParams &)params +{ + return std::make_shared(params); +} + @end Class RCTLinkingManagerCls(void) { return RCTLinkingManager.class; } + +#endif // TARGET_OS_OSX [macOS] 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 78b616a03a7a..e858d506c15b 100644 --- a/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm @@ -341,11 +341,6 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared & needsInvalidateLayer = YES; } - // `cursor` - if (oldViewProps.cursor != newViewProps.cursor) { - needsInvalidateLayer = YES; - } - // `shouldRasterize` if (oldViewProps.shouldRasterize != newViewProps.shouldRasterize) { self.layer.shouldRasterize = newViewProps.shouldRasterize; diff --git a/packages/react-native/React/Views/RCTCursor.m b/packages/react-native/React/Views/RCTCursor.m index 05575465fbef..91aea687309c 100644 --- a/packages/react-native/React/Views/RCTCursor.m +++ b/packages/react-native/React/Views/RCTCursor.m @@ -8,6 +8,9 @@ // [macOS] #import +#if TARGET_OS_OSX // [macOS +#import +#endif // macOS] #import "RCTCursor.h" #if defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 150000 /* __MAC_15_0 */