Skip to content

Commit

Permalink
Replace deprecated uniform type identifiers
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 fbc5e6a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/react-native/Libraries/Image/RCTImageUtils.mm
Original file line number Diff line number Diff line change
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
4 changes: 2 additions & 2 deletions packages/react-native/Libraries/Text/Text/RCTTextView.mm
Original file line number Diff line number Diff line change
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 @@ -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 fbc5e6a

Please sign in to comment.