-
Notifications
You must be signed in to change notification settings - Fork 24.6k
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
base: main
Are you sure you want to change the base?
Conversation
NSString *MIMEType = (__bridge_transfer NSString *)UTTypeCopyPreferredTagWithClass(UTI, kUTTagClassMIMEType); | ||
NSString *MIMEType = [UTType typeWithIdentifier:(__bridge NSString *)UTI].preferredMIMEType; |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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.
@fabriziocucci has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
There was a problem hiding this 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.
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:
Changelog:
[INTERNAL] [FIXED] - Migrate to UniformTypeIdentifiers
Test Plan: