Remove @available annotations where allowed.#122539
Merged
jkoritzinsky merged 1 commit intodotnet:mainfrom Dec 16, 2025
Merged
Conversation
iOS / tvOS now have a minimum version of 13. We can simplify our source `@available` annotations where reasonable, as well as make the IsSupported logic simpler.
Contributor
|
Tagging subscribers to this area: @dotnet/area-system-security, @bartonjs, @vcsjones |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR simplifies availability annotations and runtime checks for ChaCha20Poly1305 and AES-GCM cryptographic APIs on Apple platforms, now that iOS/tvOS 13 is the minimum supported version.
Key Changes:
- Removed
@available(iOS 13, tvOS 13, *)attributes from Swift bindings since these versions are now the minimum - Simplified
IsSupportedproperties to unconditionally returntruefor both algorithms
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/native/libs/System.Security.Cryptography.Native.Apple/pal_swiftbindings.swift | Removed 11 @available(iOS 13, tvOS 13, *) annotations from protocols, extensions, and public functions now that these are the baseline versions |
| src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/ChaCha20Poly1305.Apple.cs | Simplified IsSupported property to return true unconditionally and updated comment to reflect this change |
| src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AesGcm.Apple.cs | Simplified IsSupported property to return true unconditionally and updated comment to reflect this change |
...ries/System.Security.Cryptography/src/System/Security/Cryptography/ChaCha20Poly1305.Apple.cs
Show resolved
Hide resolved
src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AesGcm.Apple.cs
Show resolved
Hide resolved
jkoritzinsky
approved these changes
Dec 16, 2025
Member
|
/ba-g wasm failure unrelated on Apple-only PR. |
This was referenced Jan 9, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
iOS / tvOS now have a minimum version of 13. We can simplify our source
@availableannotations where reasonable, as well as make the IsSupported logic simpler.