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 faa494a615dc0f..3bca1fc9fb356e 100644 --- a/packages/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm @@ -101,7 +101,7 @@ - (void)updateEventEmitter:(const EventEmitter::Shared &)eventEmitter NSMutableDictionary *defaultAttributes = [_backedTextInputView.defaultTextAttributes mutableCopy]; -#if !TARGET_OS_MACCATALYST +#if !TARGET_OS_MAC && !TARGET_OS_MACCATALYST RCTWeakEventEmitterWrapper *eventEmitterWrapper = [RCTWeakEventEmitterWrapper new]; eventEmitterWrapper.eventEmitter = _eventEmitter; defaultAttributes[RCTAttributedStringEventEmitterKey] = eventEmitterWrapper; @@ -266,7 +266,7 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared & if (newTextInputProps.textAttributes != oldTextInputProps.textAttributes) { NSMutableDictionary *defaultAttributes = RCTNSTextAttributesFromTextAttributes(newTextInputProps.getEffectiveTextAttributes(RCTFontSizeMultiplier())); -#if !TARGET_OS_MACCATALYST +#if !TARGET_OS_MAC && !TARGET_OS_MACCATALYST defaultAttributes[RCTAttributedStringEventEmitterKey] = _backedTextInputView.defaultTextAttributes[RCTAttributedStringEventEmitterKey]; #endif diff --git a/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm b/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm index 2a5185d344ccf3..ec8465320e82c7 100644 --- a/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm +++ b/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm @@ -407,7 +407,7 @@ void RCTApplyBaselineOffset(NSMutableAttributedString *attributedText) { auto nsAttributedStringFragment = RCTNSAttributedStringFragmentFromFragment(fragment, placeholderImage); -#if !TARGET_OS_MACCATALYST +#if !TARGET_OS_MAC && !TARGET_OS_MACCATALYST if (fragment.parentShadowView.componentHandle) { RCTWeakEventEmitterWrapper *eventEmitterWrapper = [RCTWeakEventEmitterWrapper new]; eventEmitterWrapper.eventEmitter = fragment.parentShadowView.eventEmitter;