-
Notifications
You must be signed in to change notification settings - Fork 555
[UIKit] Enable nullability and clean up UIScreen. #24685
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
Conversation
This is file 20 of 30 files with nullability disabled in UIKit. * Enable nullability (#nullable enable). * Remove unused using directives (System.Collections, CoreGraphics). * Make CreateDisplayLink return nullable (CADisplayLink?) to match the generated overload signature. * Add null guard for KeyWindow in Capture, throwing InvalidOperationException when no key window is available. * Use ArgumentNullException.ThrowIfNull() instead of manual null check. * Improve XML documentation comments: remove 'To be added.' placeholders, reorder elements (summary, param, returns), add 'see cref' references, simplify namespace-qualified see cref. Contributes towards #17285.
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.
Pull request overview
Enables nullable reference types for the UIKit UIScreen helper partial, aligning the helper API with the generated bindings and improving runtime behavior/documentation as part of the broader UIKit nullability effort.
Changes:
- Enabled
#nullableinUIScreen.csand removed now-unusedusingdirectives. - Updated
CreateDisplayLinkto returnCADisplayLink?and usedArgumentNullException.ThrowIfNull. - Added a null-guard for
UIApplication.SharedApplication.KeyWindowinCaptureand improved XML docs.
✅ [PR Build #072f0df] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ [CI Build #072f0df] Build passed (Build packages) ✅Pipeline on Agent |
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
✅ [CI Build #072f0df] Build passed (Build macOS tests) ✅Pipeline on Agent |
💻 [CI Build #072f0df] Tests on macOS X64 - Mac Sonoma (14) passed 💻✅ All tests on macOS X64 - Mac Sonoma (14) passed. Pipeline on Agent |
💻 [CI Build #072f0df] Tests on macOS M1 - Mac Monterey (12) passed 💻✅ All tests on macOS M1 - Mac Monterey (12) passed. Pipeline on Agent |
💻 [CI Build #072f0df] Tests on macOS arm64 - Mac Sequoia (15) passed 💻✅ All tests on macOS arm64 - Mac Sequoia (15) passed. Pipeline on Agent |
💻 [CI Build #072f0df] Tests on macOS M1 - Mac Ventura (13) passed 💻✅ All tests on macOS M1 - Mac Ventura (13) passed. Pipeline on Agent |
💻 [CI Build #072f0df] Tests on macOS arm64 - Mac Tahoe (26) passed 💻✅ All tests on macOS arm64 - Mac Tahoe (26) passed. Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
🚀 [CI Build #072f0df] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 130 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
This is file 20 of 30 files with nullability disabled in UIKit.
the generated overload signature.
InvalidOperationException when no key window is available.
reorder elements (summary, param, returns), add 'see cref' references,
simplify namespace-qualified see cref.
Contributes towards #17285.