-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Remove redundant #available(iOS 13, *) and @available(iOS 13, *) checks
#19699
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
Merged
mokagio
merged 6 commits into
trunk
from
mokagio/remove-ios-13-available-straightforward
Dec 5, 2022
Merged
Remove redundant #available(iOS 13, *) and @available(iOS 13, *) checks
#19699
mokagio
merged 6 commits into
trunk
from
mokagio/remove-ios-13-available-straightforward
Dec 5, 2022
Conversation
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
They always return `true` since the deployment version is 13.0, and will soon become 14.0. Only two have been left: - In `WidgetStyles.swift`, because it will change again when bumping the deployment target to 14+. - In `MainShareViewController.swift` because we might want to take the occasion to restructure that logic. See conversation at #19513 (comment)
Co-authored-by: Olivier Halligon <[email protected]>
Maybe due to a recent Swift improvement, we are now able to declare `static var` and `static let` within an `extension`. There's no need to compute the value at runtime anymore.
The deployment version is 13.0 making these methods always available.
It was already unused, but I noticed that in the previous commit, 4bb1cdf, which made it clear it was an iOS-12-specific method and therefore no longer relevant for us.
Contributor
You can test the changes in WordPress from this Pull Request by:
|
Contributor
You can test the changes in Jetpack from this Pull Request by:
|
4 tasks
The app targets iOS 14.0+ and the check would always return `true`.
crazytonyli
approved these changes
Dec 5, 2022
This was referenced Dec 5, 2022
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.
Same as #19513, but without one
#availableremoval that I'll open a dedicated PR for and additional@available(iOS 13, *)removals that I hadn't considered earlier.The checks always return
truesince the deployment version is 13.0, and will soon become 14.0.Only two have been left:
WidgetStyles.swift, because it will change again when bumping the deployment target to 14+.MainShareViewController.swiftbecause we might want to take the occasion to restructure that logic. See conversation at Remove redundant#available(iOS 13, *)checks #19513 (comment)You might also find a leftoverThe app targets iOS 14.0+ 🤦♂️#available(13.4, *)check. That one needs to stay, though, because the deployment target is 13.0, allowing for the (admittedly rare) code path in which the check fails.See also
@available(iOS 12, *)annotations and checks #19707available(iOS 14, *)annotations and checks #19709Regression Notes
RELEASE-NOTES.txtif necessary. N.A.