Drop iOS 14 Support: Update remaining UTType usages (#3)#20905
Merged
Conversation
42f81c6 to
9f4a4c5
Compare
Contributor
|
| App Name | Jetpack Alpha |
|
| Configuration | Release-Alpha | |
| Build Number | pr20905-9f4a4c5 | |
| Version | 22.6 | |
| Bundle ID | com.jetpack.alpha | |
| Commit | 9f4a4c5 | |
| App Center Build | jetpack-installable-builds #5068 |
Contributor
|
| App Name | WordPress Alpha |
|
| Configuration | Release-Alpha | |
| Build Number | pr20905-9f4a4c5 | |
| Version | 22.6 | |
| Bundle ID | org.wordpress.alpha | |
| Commit | 9f4a4c5 | |
| App Center Build | WPiOS - One-Offs #6042 |
momo-ozawa
approved these changes
Jun 20, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Related Issue #20860
Removes all the remaining deprecated UTType APIs.
Conversion TL;DR
kUTTypePNG→UTType.pngUTTypeEqual(lhs, rhs)→lhs == rhsUTTypeConformsTo(lhs, rhs)→lhs.conforms(to: rhs)UTTypeCopyPreferredTagWithClass(type as CFString, kUTTagClassFilenameExtension)→UTType(type)?.preferredFilenameExtensionTo test:
Most of the changes are covered by the existing unit tests. The changes are one-to-one replacements from the deprecated to the new API. I tested them in a separate target, too, just to make sure they produced the same results.
Regression Notes
PR submission checklist:
RELEASE-NOTES.txtif necessary.