Apple platform
iOS
Framework version
net9.0-*
Affected platform version
VS 2022 17.13.2, .NET 9.0.100 iOS 18.2.9180
Description
Based on swift example the ASAccessorySession should be initialized from constructor, in the api bindings is marked with DisableDefaultCtor attribute or a partial class should be implemented with constructor.
|
[DisableDefaultCtor] |
|
interface ASAccessorySession { |
import AccessorySetupKit
// Create a session
var session = ASAccessorySession()
// Activate session with event handler
session.activate(on: DispatchQueue.main, eventHandler: handleSessionEvent(event:))
// Handle event
func handleSessionEvent(event: ASAccessoryEvent) {
switch event.eventType {
case .activated:
print("Session is activated and ready to use")
print(session.accessories)
default:
print("Received event type \(event.eventType)")
}
}
Steps to Reproduce
Create an empty solution and try to create a new object ASAccessorySession.
Cannot create & compile a project with ASAccessorySession session = new();
Did you find any workaround?
No response
Relevant log output
No response
Apple platform
iOS
Framework version
net9.0-*
Affected platform version
VS 2022 17.13.2, .NET 9.0.100 iOS 18.2.9180
Description
Based on swift example the
ASAccessorySessionshould be initialized from constructor, in the api bindings is marked withDisableDefaultCtorattribute or a partial class should be implemented with constructor.macios/src/accessorysetupkit.cs
Lines 109 to 110 in de4717a
Steps to Reproduce
Create an empty solution and try to create a new object
ASAccessorySession.Cannot create & compile a project with
ASAccessorySession session = new();Did you find any workaround?
No response
Relevant log output
No response