[MessageUI] Update bindings up to Xcode 27.0 Beta 3 - #26180
Conversation
Bind MFMailDraft and MFComposeAssistantViewController for iOS and Mac Catalyst. Model the draft properties, initializer, compose-assistant delegate, and required callback with Xcode 27 availability and nullability. Hide native initialization paths that produce invalid state or abort, and identify initWithDelegate: as the valid designated initializer. Remove the resolved xtro todo files and document the SDK-header/runtime mismatch for the designated initializer. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 153b8939-99d0-4969-9178-e1f2fc5ce69a
There was a problem hiding this comment.
Pull request overview
Updates the MessageUI bindings to align with Xcode 27.0 Beta 3 by adding new types/APIs and adjusting test expectations in xtro annotations to reflect a designated-initializer mismatch between headers and runtime behavior.
Changes:
- Added bindings for
MFMailDraft,MFComposeAssistantViewController, andMFComposeAssistantViewControllerDelegate(iOS/Mac Catalyst 27.0). - Hid unsafe initialization paths for
MFComposeAssistantViewControllerand exposedinitWithDelegate:as the designated initializer. - Removed resolved MessageUI xtro
.todofiles and added.ignoreentries documenting/acknowledging the header vs runtime designated-initializer discrepancy.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-MessageUI.todo | Removed resolved xtro TODO entries after bindings were added. |
| tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-MessageUI.ignore | Added ignore entry (and rationale) for the designated-initializer mismatch reported by xtro. |
| tests/xtro-sharpie/api-annotations-dotnet/iOS-MessageUI.todo | Removed resolved xtro TODO entries after bindings were added. |
| tests/xtro-sharpie/api-annotations-dotnet/iOS-MessageUI.ignore | Added ignore entry (and rationale) for the designated-initializer mismatch reported by xtro. |
| src/messageui.cs | Introduced new MessageUI bindings for Xcode 27.0 APIs and adjusted initialization semantics. |
This comment has been minimized.
This comment has been minimized.
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
/azp run xamarin-macios-sim-pr-tests |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Remove the designated-initializer attribute from MFComposeAssistantViewController.initWithDelegate: because the Xcode header does not annotate it. Drop the corresponding xtro exceptions and add a narrow introspection match for the inherited UIViewController initializer that aborts at runtime. Keep the invalid generated initialization paths non-public. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 153b8939-99d0-4969-9178-e1f2fc5ce69a
This comment has been minimized.
This comment has been minimized.
|
/azp run xamarin-macios-sim-pr-tests |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
/azp run xamarin-macios-pr-apidiff |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
This comment has been minimized.
This comment has been minimized.
✅ 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 |
This comment has been minimized.
This comment has been minimized.
|
/azp run xamarin-macios-sim-pr-tests |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
/azp run xamarin-macios-sim-pr-tests |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
| /// <summary>Provides an interface for composing an email draft.</summary> | ||
| [NoTV, NoMac, iOS (27, 0), MacCatalyst (27, 0)] | ||
| [BaseType (typeof (UIViewController))] | ||
| [PrivateDefaultCtor] // init and initWithCoder: abort at runtime |
There was a problem hiding this comment.
Why not just [DisableDefaultCtor]?
There was a problem hiding this comment.
[DisableDefaultCtor] only suppresses the generated parameterless init. Because UIViewController conforms to NSCoding, bgen separately emits .ctor(NSCoder) and leaves it public under [DisableDefaultCtor]. On the Xcode 27 Beta 3 runtime, both initWithCoder: and initWithNibName:bundle: unconditionally trap; only initWithDelegate: works. [PrivateDefaultCtor] is intentional so the generated init and .ctor(NSCoder) stay non-public, while the narrow introspection match avoids re-exposing the trapping nib initializer. I verified this against the generated iOS/Mac Catalyst sources and the Beta 3 runtime implementation. There is no separate bgen attribute to suppress only the NSCoder constructor.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
🚀 [CI Build #897e85a] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 195 tests passed 🎉 Tests counts✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
Summary
MFMailDraft, including its properties and full initializer, for iOS and Mac Catalyst.MFComposeAssistantViewControllerand its required delegate protocol.initWithDelegate:as the supported initializer.initWithDelegate:without designated-initializer metadata, and narrowly exempt the inheritedUIViewControllerinitializer that aborts at runtime.Validation
make worldUIBarMinimizationdefault-constructor failure remainsAppSizeTest: 0 failures; all 16 cases skipped by the beta-Xcode guard