GCController.DidConnectMessage
A message that posts after a game controller accessory connects to the device.
Declaration
struct DidConnectMessageOverview
Use the .didConnect identifier with NotificationCenter to listen for this message.
let observation = NotificationCenter.default.addObserver(of: GCController.self, for: .didConnect) { message in
let controller = message.controller
}Connections of controller accessories will be reflected in the controllers array of the GCController class when the message posts.