startWirelessControllerDiscovery(completionHandler:)
Starts searching for nearby wireless controllers.
Declaration
class func startWirelessControllerDiscovery(completionHandler: (@Sendable () -> Void)? = nil)class func startWirelessControllerDiscovery() asyncParameters
- completionHandler:
The block that the framework calls when it completes the request.
Discussion
Call this method when the user chooses to discover wireless controllers from your interface. The framework searches asynchronously for discoverable wireless controllers. The framework posts the GCControllerDidConnect (Swift) or GCControllerDidConnectNotification (Objective-C) notification when it discovers new controllers. Implement the completion handler you pass to this method to handle when the framework finishes discovering controllers or when it times out.
If you call the startWirelessControllerDiscovery(completionHandler:) method multiple times during discovery, the framework only calls the last completion handler you pass to this method.