Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to UniformTypeIdentifiers #48623

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Migrate to UniformTypeIdentifiers #48623

wants to merge 1 commit into from

Conversation

woxtu
Copy link
Contributor

@woxtu woxtu commented Jan 12, 2025

Summary:

This PR changes to use the Uniform Type Identifiers framework instead of the Mobile Core Services framework, and resolves deprecation warnings like the following:

'kUTTypeUTF8PlainText' is deprecated: first deprecated in iOS 15.0 - Use UTTypeUTF8PlainText or UTType.utf8PlainText (swift) instead.

Changelog:

[INTERNAL] [FIXED] - Migrate to UniformTypeIdentifiers

Test Plan:

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 12, 2025
NSString *MIMEType = (__bridge_transfer NSString *)UTTypeCopyPreferredTagWithClass(UTI, kUTTagClassMIMEType);
NSString *MIMEType = [UTType typeWithIdentifier:(__bridge NSString *)UTI].preferredMIMEType;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'UTTypeCopyPreferredTagWithClass' is deprecated: first deprecated in iOS 15.0 - Use the UTType class instead.

destination = CGImageDestinationCreateWithData(imageData, kUTTypePNG, 1, NULL);
destination = CGImageDestinationCreateWithData(imageData, (__bridge CFStringRef)UTTypePNG.identifier, 1, NULL);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'kUTTypePNG' is deprecated: first deprecated in iOS 15.0 - Use UTTypePNG or UTType.png (swift) instead.

@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Jan 12, 2025
@facebook-github-bot
Copy link
Contributor

@fabriziocucci has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Copy link
Contributor

@cipolleschi cipolleschi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing these warnings!

Unfortunately @woxtu, we need to wait a little before landing this change: internally we have a couple of apps that are still on iOS 13.4 and therefore we can't push this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants