Skip to content

Commit

Permalink
Replace deprecated uniform type identifiers (facebook#47135)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
NickGerleman authored and facebook-github-bot committed Oct 21, 2024
1 parent e7a3f47 commit 79f6556
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions packages/react-native/Libraries/Image/RCTImageUtils.mm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#import <tgmath.h>

#import <ImageIO/ImageIO.h>
#import <MobileCoreServices/UTCoreTypes.h>
#import <UniformTypeIdentifiers/UniformTypeIdentifiers.h>

#import <React/RCTLog.h>
#import <React/RCTUtils.h>
Expand Down Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions packages/react-native/Libraries/Text/Text/RCTTextView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#import <React/RCTTextView.h>

#import <MobileCoreServices/UTCoreTypes.h>
#import <UniformTypeIdentifiers/UniformTypeIdentifiers.h>

#import <React/RCTUtils.h>
#import <React/UIView+React.h>
Expand Down Expand Up @@ -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 ];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#import "RCTParagraphComponentView.h"
#import "RCTParagraphComponentAccessibilityProvider.h"

#import <MobileCoreServices/UTCoreTypes.h>
#import <UniformTypeIdentifiers/UniformTypeIdentifiers.h>
#import <react/renderer/components/text/ParagraphComponentDescriptor.h>
#import <react/renderer/components/text/ParagraphProps.h>
#import <react/renderer/components/text/ParagraphState.h>
Expand Down Expand Up @@ -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 ];
Expand Down

0 comments on commit 79f6556

Please sign in to comment.