[AccessoryAccess] Add bindings up to Xcode 27.0 Beta 3#25982
Conversation
Bind the AccessoryAccess framework (macOS 27.0), resolving all entries in tests/xtro-sharpie/api-annotations-dotnet/macOS-AccessoryAccess.todo: * AAUSBAccessory (NSSecureCoding) * AAUSBAccessoryManager (with the shared manager + listener registration) * AAUSBAccessoryMatchingCriteria (NSCopying) * AAUSBAccessoryListener protocol * AAErrorCode / AAErrorDomain * AAUSBAccessoryMatchingCriteriaInterfaceMatchingOption Register the framework for macOS, update the LinkMode=None linked-frameworks test, regenerate the documentation known-failures baseline, and remove the resolved .todo file. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR adds a new macOS binding surface for Apple’s AccessoryAccess framework (macOS 27.0), integrates it into the build’s framework registration/defines, and updates test baselines to reflect the new public API.
Changes:
- Added new binding definitions for AccessoryAccess (types, enums, protocol, and async-friendly APIs).
- Registered AccessoryAccess as a macOS framework and enabled
HAS_ACCESSORYACCESSfor .NET macOS builds. - Updated linked-framework expectations and regenerated documentation known-failures; removed the resolved xtro todo.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tools/common/Frameworks.cs | Registers AccessoryAccess as a macOS framework (27.0). |
| tests/xtro-sharpie/api-annotations-dotnet/macOS-AccessoryAccess.todo | Removes resolved xtro annotations for AccessoryAccess. |
| tests/dotnet/UnitTests/ProjectTest.cs | Updates macOS LinkMode=None linked-framework expectations to include AccessoryAccess. |
| tests/cecil-tests/Documentation.KnownFailures.txt | Regenerates doc-known-failure baseline for newly introduced AccessoryAccess symbols. |
| src/rsp/dotnet/macos-defines-dotnet.rsp | Adds -d:HAS_ACCESSORYACCESS define for .NET macOS builds. |
| src/frameworks.sources | Adds AccessoryAccess to the macOS frameworks list used by the build. |
| src/build/dotnet/generator-frameworks.g.cs | Updates generated framework-availability helpers to include AccessoryAccess. |
| src/accessoryaccess.cs | Introduces the AccessoryAccess binding definitions (macOS 27.0). |
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #b8c602d] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ [PR Build #b8c602d] 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 |
✅ [PR Build #b8c602d] Build passed (Build macOS tests) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
|
Note to self we must run size tests when adding a new framework, or maybe just run them all the time... |
🔥 [CI Build #b8c602d] Test results 🔥Test results❌ Tests failed on VSTS: test results 1 tests crashed, 1 tests failed, 190 tests passed. Failures❌ dotnettests tests (macOS) [attempt 2]1 tests failed, 0 tests passed.Failed tests
Html Report (VSDrops) Download ❌ Tests on macOS Golden Gate (27) tests [attempt 3]🔥 Failed catastrophically on VSTS: test results - mac_golden_gate (no summary found). Html Report (VSDrops) Download Successes✅ 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 |
| [BaseType (typeof (NSObject))] | ||
| interface AAUSBAccessoryListener { | ||
| [Export ("usbAccessoryDidConnect:")] | ||
| void UsbAccessoryDidConnect (AAUSBAccessory usbAccessory); |
There was a problem hiding this comment.
Casing mismatch: "USB" in the type name and "Usb" in method name. I believe this should all be "Usb" everywhere.
| // NS_REFINED_FOR_SWIFT (see IGNORED_MACOS_FRAMEWORKS in tests/xtro-sharpie/Makefile). The instance | ||
| // returned by AAUSBAccessory.Open is a valid IOUSBHostDevice handle; consumers that need to perform | ||
| // USB I/O on it should hand the accessory to a native/Swift XPC service using CreateXpcRepresentation. | ||
| using IOUSBHostDevice = Foundation.NSObject; |
There was a problem hiding this comment.
I think IOUSBHostDevice is a C++ class, not an Objective-C class, in which case it should be bound as IntPtr not NSObject.
Bind the AccessoryAccess framework (macOS 27.0), resolving all entries in tests/xtro-sharpie/api-annotations-dotnet/macOS-AccessoryAccess.todo:
Register the framework for macOS, update the LinkMode=None linked-frameworks test, regenerate the documentation known-failures baseline, and remove the resolved .todo file.