Skip to content

[AccessoryAccess] Add bindings up to Xcode 27.0 Beta 3#25982

Open
dalexsoto wants to merge 1 commit into
xcode27.0from
dev/alex/xc27-accessoryaccess
Open

[AccessoryAccess] Add bindings up to Xcode 27.0 Beta 3#25982
dalexsoto wants to merge 1 commit into
xcode27.0from
dev/alex/xc27-accessoryaccess

Conversation

@dalexsoto

Copy link
Copy Markdown
Member

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.

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>
@dalexsoto dalexsoto added this to the xcode27 milestone Jul 8, 2026
@dalexsoto dalexsoto requested a review from rolfbjarne as a code owner July 8, 2026 20:38
Copilot AI review requested due to automatic review settings July 8, 2026 20:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_ACCESSORYACCESS for .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).

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [PR Build #b8c602d] Build passed (Detect API changes) ✅

Pipeline on Agent
Hash: b8c602d10246822f9ff14d8794773da01fb85423 [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [PR Build #b8c602d] Build passed (Build packages) ✅

Pipeline on Agent
Hash: b8c602d10246822f9ff14d8794773da01fb85423 [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ API diff for current PR / commit

NET (empty diffs)

✅ API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: b8c602d10246822f9ff14d8794773da01fb85423 [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [PR Build #b8c602d] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: b8c602d10246822f9ff14d8794773da01fb85423 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@dalexsoto

Copy link
Copy Markdown
Member Author

Note to self we must run size tests when adding a new framework, or maybe just run them all the time...

DotNet tests: Failed (Execution failed with exit code 1)
Xamarin.Tests.AppSizeTest.CoreCLR_Interpreter_TrimmableStatic(Ma...: App size changed significantly (+69,040 bytes (67.4 KB = 0.1 MB) different > tolerance of +-10,240 bytes (10.0 KB = 0.0 MB)). Ex...
Xamarin.Tests.AppSizeTest.CoreCLR_Interpreter(MacOSX,"osx-arm64;...: App size changed significantly (+43,440 bytes (42.4 KB = 0.0 MB) different > tolerance of +-10,240 bytes (10.0 KB = 0.0 MB)). Ex...
Xamarin.Tests.AppSizeTest.NativeAOT_TrimmableStatic(MacOSX,"osx-...: App size changed significantly (+16,400 bytes (16.0 KB = 0.0 MB) different > tolerance of +-10,240 bytes (10.0 KB = 0.0 MB)). Ex...

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🔥 [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

  • DotNet tests: Failed (Execution failed with exit code 1)
    • Xamarin.Tests.AppSizeTest.CoreCLR_Interpreter_TrimmableStatic(Ma...: App size changed significantly (+69,040 bytes (67.4 KB = 0.1 MB) different > tolerance of +-10,240 bytes (10.0 KB = 0.0 MB)). Ex...
    • Xamarin.Tests.AppSizeTest.CoreCLR_Interpreter(MacOSX,"osx-arm64;...: App size changed significantly (+43,440 bytes (42.4 KB = 0.0 MB) different > tolerance of +-10,240 bytes (10.0 KB = 0.0 MB)). Ex...
    • Xamarin.Tests.AppSizeTest.NativeAOT_TrimmableStatic(MacOSX,"osx-...: App size changed significantly (+16,400 bytes (16.0 KB = 0.0 MB) different > tolerance of +-10,240 bytes (10.0 KB = 0.0 MB)). Ex...

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
✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (iOS): All 1 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 6 tests passed. Html Report (VSDrops) Download
✅ linker (iOS): All 15 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ linker (MacCatalyst): All 15 tests passed. Html Report (VSDrops) Download
✅ linker (macOS): All 21 tests passed. Html Report (VSDrops) Download
✅ linker (tvOS): All 15 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 18 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 17 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 18 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 18 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ sharpie: All 1 tests passed. Html Report (VSDrops) Download
✅ windows: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

macOS tests

✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sequoia (15): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Tahoe (26): All 5 tests passed. Html Report (VSDrops) Download

Linux Build Verification

Linux build succeeded

Pipeline on Agent
Hash: b8c602d10246822f9ff14d8794773da01fb85423 [PR build]

Comment thread src/accessoryaccess.cs
[BaseType (typeof (NSObject))]
interface AAUSBAccessoryListener {
[Export ("usbAccessoryDidConnect:")]
void UsbAccessoryDidConnect (AAUSBAccessory usbAccessory);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Casing mismatch: "USB" in the type name and "Usb" in method name. I believe this should all be "Usb" everywhere.

Comment thread src/accessoryaccess.cs
// 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;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think IOUSBHostDevice is a C++ class, not an Objective-C class, in which case it should be bound as IntPtr not NSObject.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants