File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
packages/react-native/React/Fabric/Mounting/ComponentViews/View Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 1111#import < QuartzCore/QuartzCore.h>
1212#import < objc/runtime.h>
1313#import < ranges>
14+ #if TARGET_OS_OSX // [macOS
15+ #import < UniformTypeIdentifiers/UniformTypeIdentifiers.h>
16+ #endif // macOS]
1417
1518#import < React/RCTAssert.h>
1619#import < React/RCTBorderDrawing.h>
@@ -1751,7 +1754,7 @@ - (void)buildDataTransferItems:(std::vector<DataTransferItem> &)dataTransferItem
17511754
17521755 NSPasteboardType imageType = [pasteboard availableTypeFromArray: @[NSPasteboardTypePNG , NSPasteboardTypeTIFF ]];
17531756 if (imageType && fileNames.count == 0 ) {
1754- NSString *MIMETypeString = imageType == NSPasteboardTypePNG ? @" image/png " : @" image/tiff " ;
1757+ NSString *MIMETypeString = imageType == NSPasteboardTypePNG ?[UTTypePNG preferredMIMEType ] : [UTTypeTIFF preferredMIMEType ] ;
17551758 NSData *imageData = [pasteboard dataForType: imageType];
17561759 NSImage *image = [[NSImage alloc ] initWithData: imageData];
17571760 CGImageRef cgImage = [image CGImageForProposedRect: nil context: nil hints: nil ];
You can’t perform that action at this time.
0 commit comments