robreuss / VirtualGameController

Software-based game controllers for iOS, tvOS, OS X and watchOS in Swift 4.2.
MIT License
462 stars 44 forks source link

Crash with app > 2 dots (.) in appIdentifier #26

Closed ghost closed 5 years ago

ghost commented 8 years ago

To recreate (tested on Apple TV): VgcManager.startAs(.Central, appIdentifier: "1.2.3.4", includesPeerToPeer: true)

Debug Log reports: Setting up as a CENTRAL IncludesPeerToPeer is set to: true Initializing Central Publisher Publishing NetService service to listen for Peripherals on Apple TV Central net service did not publish, error: ["NSNetServicesErrorDomain": 10, "NSNetServicesErrorCode": -72004], registered name: nil, server name: Apple TV Republishing net service

Results in an infinite loop, leading to an memory range crash.

robreuss commented 8 years ago

Interesting. The appIdentifier is included in the Bonjour service name as the "type" parameter of the method initWithDomain, so I'm guessing this may be a NSNetService-level constraint rather than a bug in the framework. Were you able to find out more or work-around?