Instance Method

accessoryDidDisconnect(_:)

Tells the delegate that the specified accessory was disconnected from the device.

Declaration

optional func accessoryDidDisconnect(_ accessory: EAAccessory)

Parameters

accessory

The accessory that was disconnected.

Discussion

The accessory manager calls this method as a convenience whenever it receives an EAAccessoryDidDisconnect notification. You can use this method to remove any references to the specified accessory object and to stop any services currently using the accessory.

Because this is a convenience method, your delegate does not also need to register as an observer of the EAAccessoryDidDisconnect notification. However, if you want your delegate to be notified of newly connected accessories, you should configure it as an observer of the EAAccessoryDidConnect notification.