-
Notifications
You must be signed in to change notification settings - Fork 517
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
[Security] Add Xcode 13 beta 4 support. #12365
[Security] Add Xcode 13 beta 4 support. #12365
Conversation
[Deprecated (PlatformName.MacOSX, 12, 0, message: "Use 'SecKeyCreateRandomKey' instead.")] | ||
[Deprecated (PlatformName.iOS, 15, 0, message: "Use 'SecKeyCreateRandomKey' instead.")] | ||
[Deprecated (PlatformName.TvOS, 15, 0, message: "Use 'SecKeyCreateRandomKey' instead.")] | ||
[Deprecated (PlatformName.WatchOS, 8, 0, message: "Use 'SecKeyCreateRandomKey' instead.")] |
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.
You need to use the new (dotnet) attributes in manual bindings. Otherwise you're pushing extra work to fix #11055
#if NET
[UnsupportedOSPlatform ("macos12.0")]
[UnsupportedOSPlatform ("ios15.0")]
[UnsupportedOSPlatform ("tvos15.0")]
[UnsupportedOSPlatform ("maccatalyst15.0")]
#else
[Deprecated (PlatformName.MacOSX, 12, 0, message: "Use 'SecKeyCreateRandomKey' instead.")]
[Deprecated (PlatformName.iOS, 15, 0, message: "Use 'SecKeyCreateRandomKey' instead.")]
[Deprecated (PlatformName.TvOS, 15, 0, message: "Use 'SecKeyCreateRandomKey' instead.")]
[Deprecated (PlatformName.WatchOS, 8, 0, message: "Use 'SecKeyCreateRandomKey' instead.")]
#endif
No need for [UnsupportedOSPlatform ("watchos")]
since it's done at the assembly-level, see src/MinimumVersions.cs.in
However you need [UnsupportedOSPlatform ("maccatalyst15.0")]
or [UnsupportedOSPlatform ("maccatalyst")]
(and #if !MACCATALYST
) if it has never been available.
Optionally you can add an [Obsolete]
attribute to suggest an alternative. This is what the generator does, see src/ObjCRuntime/PlatformAvailability2.cs
.
The tricky part is that it's general to all platforms, so you might need to use #if ... #endif
around each [Obsolete]
if the message is not identical (or if it's not deprecated on every platforms).
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.
a bit more in #10580 (comment)
🔥 Tests failed catastrophically on Build (no summary found). 🔥Result file $(TEST_SUMMARY_PATH) not found. |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
🔥 Tests failed catastrophically on Build (no summary found). 🔥Result file $(TEST_SUMMARY_PATH) not found. |
✅ [PR Build] Tests passed on Build. ✅Tests passed on Build. API diff✅ API Diff from stable View API diffAPI & Generator diffℹ️ API Diff (from PR only) (please review changes) GitHub pagesResults can be found in the following github pages (it might take some time to publish): 🎉 All 92 tests passed 🎉Pipeline on Agent XAMBOT-1101.BigSur' |
src/Security/Certificate.cs
Outdated
[UnsupportedOSPlatform ("tvos15.0")] | ||
[UnsupportedOSPlatform ("maccatalyst15.0")] | ||
#if __MACCATALYST__ | ||
[Obsolete ("Starting with maccatalyst15.0 API removed, please use 'SecKeyCreateRandomKey' instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")] |
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.
The API removed, please
from my earlier example comes from ObsoletedAttribute.Message
IOW this specific API it not removed, just obsoleted
If that had been a generated it would have been:
"Starting with maccatalyst15.0 Use 'SecKeyCreateRandomKey' instead."
"Starting with " + platform + " + Message: "Use 'SecKeyCreateRandomKey' instead."
❌ [PR Build] Tests failed on Build ❌Tests failed on Build. API diff✅ API Diff from stable View API diffAPI & Generator diffℹ️ API Diff (from PR only) (please review changes) GitHub pagesResults can be found in the following github pages (it might take some time to publish): Test results2 tests failed, 90 tests passed.Failed tests
Pipeline on Agent XAMBOT-1104.BigSur' |
Unrelated errors: https://github.com/xamarin/maccore/issues/2414 |
No description provided.