Skip to content

Drop iOS 14 Support: Update remaining UTType usages (#3)#20905

Merged
kean merged 1 commit intotrunkfrom
task/ios-15-remove-remaning-deprecated-uttype-apis
Jun 20, 2023
Merged

Drop iOS 14 Support: Update remaining UTType usages (#3)#20905
kean merged 1 commit intotrunkfrom
task/ios-15-remove-remaning-deprecated-uttype-apis

Conversation

@kean
Copy link
Contributor

@kean kean commented Jun 19, 2023

Related Issue #20860

Removes all the remaining deprecated UTType APIs.

Conversion TL;DR

  • kUTTypePNGUTType.png
  • UTTypeEqual(lhs, rhs)lhs == rhs
  • UTTypeConformsTo(lhs, rhs)lhs.conforms(to: rhs)
  • UTTypeCopyPreferredTagWithClass(type as CFString, kUTTagClassFilenameExtension)UTType(type)?.preferredFilenameExtension

To 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

  1. Potential unintended areas of impact: Media-related features
  2. What I did to test those areas of impact (or what existing automated tests I relied on): manual tests and unit tests
  3. What automated tests I added (or what prevented me from doing so): yes

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding unit tests for my changes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@kean kean added this to the Pending milestone Jun 19, 2023
@kean kean force-pushed the task/ios-15-remove-remaning-deprecated-uttype-apis branch from 42f81c6 to 9f4a4c5 Compare June 19, 2023 20:12
@wpmobilebot
Copy link
Contributor

Jetpack Alpha📲 You can test the changes from this Pull Request in Jetpack Alpha by scanning the QR code below to install the corresponding build.
App NameJetpack Alpha Jetpack Alpha
ConfigurationRelease-Alpha
Build Numberpr20905-9f4a4c5
Version22.6
Bundle IDcom.jetpack.alpha
Commit9f4a4c5
App Center Buildjetpack-installable-builds #5068
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@wpmobilebot
Copy link
Contributor

WordPress Alpha📲 You can test the changes from this Pull Request in WordPress Alpha by scanning the QR code below to install the corresponding build.
App NameWordPress Alpha WordPress Alpha
ConfigurationRelease-Alpha
Build Numberpr20905-9f4a4c5
Version22.6
Bundle IDorg.wordpress.alpha
Commit9f4a4c5
App Center BuildWPiOS - One-Offs #6042
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@kean kean merged commit aa12b00 into trunk Jun 20, 2023
@kean kean deleted the task/ios-15-remove-remaning-deprecated-uttype-apis branch June 20, 2023 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants