diff --git a/packages/react-native/Libraries/Image/RCTImageUtils.mm b/packages/react-native/Libraries/Image/RCTImageUtils.mm index 38fbd6bad434..6d190b3b694a 100644 --- a/packages/react-native/Libraries/Image/RCTImageUtils.mm +++ b/packages/react-native/Libraries/Image/RCTImageUtils.mm @@ -9,6 +9,8 @@ #import +#import + #import #import @@ -337,10 +339,10 @@ BOOL RCTUpscalingRequired( CFMutableDataRef imageData = CFDataCreateMutable(NULL, 0); if (RCTImageHasAlpha(cgImage)) { // get png data - destination = CGImageDestinationCreateWithData(imageData, kUTTypePNG, 1, NULL); + destination = CGImageDestinationCreateWithData(imageData, (__bridge CFStringRef)[UTTypePNG identifier], 1, NULL); } else { // get jpeg data - destination = CGImageDestinationCreateWithData(imageData, kUTTypeJPEG, 1, NULL); + destination = CGImageDestinationCreateWithData(imageData, (__bridge CFStringRef)[UTTypeJPEG identifier], 1, NULL); [properties setValue:@(quality) forKey:(id)kCGImageDestinationLossyCompressionQuality]; } if (!destination) { diff --git a/packages/react-native/Libraries/Image/React-RCTImage.podspec b/packages/react-native/Libraries/Image/React-RCTImage.podspec index f0a56a7d67d6..9cb5bea18ed4 100644 --- a/packages/react-native/Libraries/Image/React-RCTImage.podspec +++ b/packages/react-native/Libraries/Image/React-RCTImage.podspec @@ -45,7 +45,7 @@ Pod::Spec.new do |s| "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(), "HEADER_SEARCH_PATHS" => header_search_paths.join(' ') } - s.framework = ["Accelerate", "UIKit", "QuartzCore", "ImageIO", "CoreGraphics"] + s.framework = ["Accelerate", "UIKit", "QuartzCore", "ImageIO", "CoreGraphics", "UniformTypeIdentifiers"] s.dependency "RCT-Folly", folly_version s.dependency "RCTTypeSafety" diff --git a/packages/react-native/Libraries/Text/React-RCTText.podspec b/packages/react-native/Libraries/Text/React-RCTText.podspec index 6766c335abe6..3af8be71ad63 100644 --- a/packages/react-native/Libraries/Text/React-RCTText.podspec +++ b/packages/react-native/Libraries/Text/React-RCTText.podspec @@ -29,7 +29,7 @@ Pod::Spec.new do |s| s.source_files = "**/*.{h,m,mm}" s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs" s.header_dir = "RCTText" - s.framework = ["MobileCoreServices"] + s.framework = ["MobileCoreServices", "UniformTypeIdentifiers"] s.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard() } s.dependency "Yoga" diff --git a/packages/react-native/Libraries/Text/Text/RCTTextView.mm b/packages/react-native/Libraries/Text/Text/RCTTextView.mm index 47632aa885cd..c6ed90cf9a15 100644 --- a/packages/react-native/Libraries/Text/Text/RCTTextView.mm +++ b/packages/react-native/Libraries/Text/Text/RCTTextView.mm @@ -9,6 +9,8 @@ #import +#import + #import #import @@ -282,10 +284,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 3f87fcec8454..4e6ee136df79 100644 --- a/packages/react-native/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm +++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm @@ -8,6 +8,7 @@ #import "RCTParagraphComponentView.h" #import "RCTParagraphComponentAccessibilityProvider.h" +#import #import #import #import @@ -306,10 +307,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 ];