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 11
11
#import < QuartzCore/QuartzCore.h>
12
12
#import < objc/runtime.h>
13
13
#import < ranges>
14
+ #if TARGET_OS_OSX // [macOS
15
+ #import < UniformTypeIdentifiers/UniformTypeIdentifiers.h>
16
+ #endif // macOS]
14
17
15
18
#import < React/RCTAssert.h>
16
19
#import < React/RCTBorderDrawing.h>
@@ -1751,7 +1754,7 @@ - (void)buildDataTransferItems:(std::vector<DataTransferItem> &)dataTransferItem
1751
1754
1752
1755
NSPasteboardType imageType = [pasteboard availableTypeFromArray: @[NSPasteboardTypePNG , NSPasteboardTypeTIFF ]];
1753
1756
if (imageType && fileNames.count == 0 ) {
1754
- NSString *MIMETypeString = imageType == NSPasteboardTypePNG ? @" image/png " : @" image/tiff " ;
1757
+ NSString *MIMETypeString = imageType == NSPasteboardTypePNG ?[UTTypePNG preferredMIMEType ] : [UTTypeTIFF preferredMIMEType ] ;
1755
1758
NSData *imageData = [pasteboard dataForType: imageType];
1756
1759
NSImage *image = [[NSImage alloc ] initWithData: imageData];
1757
1760
CGImageRef cgImage = [image CGImageForProposedRect: nil context: nil hints: nil ];
You can’t perform that action at this time.
0 commit comments