I want to use the AppleTV remote control as a GCController microGamepad as suggested in the
tvOS beta documentation.
In my viewDidLoad method I´m trying to obtain the available controllers, but the remote control
doesn't show up in the GCController.controllers() array:
The code
// Obtain available controllers
let controllers = GCController.controllers()
if controllers.isEmpty {
print("No Controllers, trying to find one...")
GCController.startWirelessControllerDiscoveryWithCompletionHandler({
let controllers = GCController.controllers()
if controllers.isEmpty {
print("No Controllers found :(")
} else {
print("Controllers detected: \(controllers)")
}
})
} else {
print("Controllers detected: \(controllers)")
}
}never prints: Controllers detected...
Any idea what I'm doing wrong?
Thank you for your help.