diff --git a/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryComponentView.mm b/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryComponentView.mm index 364ea6c26b3773..3f4c2664f540da 100644 --- a/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryComponentView.mm +++ b/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_OSX // [macOS] _textInput.inputAccessoryView = _contentView; +#endif // [macOS] } else { _textInput = RCTFindTextInputWithNativeId(_contentView, nil); } diff --git a/React/Fabric/Mounting/UIView+ComponentViewProtocol.mm b/React/Fabric/Mounting/UIView+ComponentViewProtocol.mm index 9d7b3717683e70..b8d0f26b50835a 100644 --- a/React/Fabric/Mounting/UIView+ComponentViewProtocol.mm +++ b/React/Fabric/Mounting/UIView+ComponentViewProtocol.mm @@ -103,16 +103,20 @@ - (void)updateLayoutMetrics:(LayoutMetrics const &)layoutMetrics } else { // Note: Changing `frame` when `layer.transform` is not the `identity transform` is undefined behavior. // Therefore, we must use `center` and `bounds`. +#if !TARGET_OS_OSX // [macOS] self.center = CGPoint{CGRectGetMidX(frame), CGRectGetMidY(frame)}; +#endif // [macOS] self.bounds = CGRect{CGPointZero, frame.size}; } } +#if !TARGET_OS_OSX // [macOS] if (forceUpdate || (layoutMetrics.layoutDirection != oldLayoutMetrics.layoutDirection)) { self.semanticContentAttribute = layoutMetrics.layoutDirection == LayoutDirection::RightToLeft ? UISemanticContentAttributeForceRightToLeft : UISemanticContentAttributeForceLeftToRight; } +#endif // [macOS] if (forceUpdate || (layoutMetrics.displayType != oldLayoutMetrics.displayType)) { self.hidden = layoutMetrics.displayType == DisplayType::None; diff --git a/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTFontUtils.mm b/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTFontUtils.mm index 4f8d5aa0703293..b8144992ecef8d 100644 --- a/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTFontUtils.mm +++ b/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTFontUtils.mm @@ -118,7 +118,11 @@ static RCTFontStyle RCTGetFontStyle(UIFont *font) // the specific metrics of the standard system font as closely as possible. font = RCTDefaultFontWithFontProperties(fontProperties); } else { +#if !TARGET_OS_OSX // [macOS] NSArray *fontNames = [UIFont fontNamesForFamilyName:fontProperties.family]; +#else // [macOS + NSArray *fontNames = @[]; +#endif // macOS] if (fontNames.count == 0) { // Gracefully handle being given a font name rather than font family, for