From fbc5e6a36d867f3158808589542d147ba946d26a Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Sun, 20 Oct 2024 17:28:37 -0700 Subject: [PATCH] Replace deprecated uniform type identifiers Summary: These show up as deprecated a bunch of times on GitHub PRs. Lets do the trivial change to non deprecated names. {F1940536675} Changelog: [Internal] Differential Revision: D64672460 --- packages/react-native/Libraries/Image/RCTImageUtils.mm | 4 ++-- packages/react-native/Libraries/Text/Text/RCTTextView.mm | 4 ++-- .../Mounting/ComponentViews/Text/RCTParagraphComponentView.mm | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/react-native/Libraries/Image/RCTImageUtils.mm b/packages/react-native/Libraries/Image/RCTImageUtils.mm index 38fbd6bad434af..a82a0ee8a1351b 100644 --- a/packages/react-native/Libraries/Image/RCTImageUtils.mm +++ b/packages/react-native/Libraries/Image/RCTImageUtils.mm @@ -337,10 +337,10 @@ BOOL RCTUpscalingRequired( CFMutableDataRef imageData = CFDataCreateMutable(NULL, 0); if (RCTImageHasAlpha(cgImage)) { // get png data - destination = CGImageDestinationCreateWithData(imageData, kUTTypePNG, 1, NULL); + destination = CGImageDestinationCreateWithData(imageData, UTTypePNG, 1, NULL); } else { // get jpeg data - destination = CGImageDestinationCreateWithData(imageData, kUTTypeJPEG, 1, NULL); + destination = CGImageDestinationCreateWithData(imageData, UTTypeJPEG, 1, NULL); [properties setValue:@(quality) forKey:(id)kCGImageDestinationLossyCompressionQuality]; } if (!destination) { diff --git a/packages/react-native/Libraries/Text/Text/RCTTextView.mm b/packages/react-native/Libraries/Text/Text/RCTTextView.mm index 47632aa885cdb3..1222a307687ad1 100644 --- a/packages/react-native/Libraries/Text/Text/RCTTextView.mm +++ b/packages/react-native/Libraries/Text/Text/RCTTextView.mm @@ -282,10 +282,10 @@ - (void)copy:(id)sender error:nil]; if (rtf) { - [item setObject:rtf forKey:(id)kUTTypeFlatRTFD]; + [item setObject:rtf forKey:(id)UTTypeFlatRTFD]; } - [item setObject:attributedText.string forKey:(id)kUTTypeUTF8PlainText]; + [item setObject:attributedText.string forKey:(id)UTTypeUTF8PlainText]; UIPasteboard *pasteboard = [UIPasteboard generalPasteboard]; pasteboard.items = @[ item ]; 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 3f87fcec845487..ece4fd945ba05f 100644 --- a/packages/react-native/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm +++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm @@ -306,10 +306,10 @@ - (void)copy:(id)sender error:nil]; if (rtf) { - [item setObject:rtf forKey:(id)kUTTypeFlatRTFD]; + [item setObject:rtf forKey:(id)UTTypeFlatRTFD]; } - [item setObject:attributedText.string forKey:(id)kUTTypeUTF8PlainText]; + [item setObject:attributedText.string forKey:(id)UTTypeUTF8PlainText]; UIPasteboard *pasteboard = [UIPasteboard generalPasteboard]; pasteboard.items = @[ item ];