Class

EAAccessoryManager

The EAAccessoryManager class coordinates the attached accessories for an iOS-based device. You use this class to retrieve a list of accessories to which your application might want to connect. You also use this class to start and stop the sending of accessory-related connect and disconnect notifications.

Topics

Getting the Shared Accessory Manager

class func shared()

Returns the shared EAAccessoryManager object for the iOS-based device.

Starting and Stopping Accessory Notifications

func registerForLocalNotifications()

Begins the delivery of accessory-related notifications to the current application.

func unregisterForLocalNotifications()

Stops the delivery of accessory-related notifications to the current application.

Presenting the Bluetooth Picker

func showBluetoothAccessoryPicker(withNameFilter: NSPredicate?, completion: EABluetoothAccessoryPickerCompletion? = nil)

Displays an alert that allows the user to pair the device with a Bluetooth accessory.

Getting the Available Accessories

var connectedAccessories: [EAAccessory]

The accessory objects corresponding to the list of currently connected accessories.

Constants

Notification User Info Keys

Keys associated with the info dictionary of accessory notifications.

typealias EABluetoothAccessoryPickerCompletion

The completion block for the Bluetooth picker.

Accessory Picker Error Domain

Constants associated with the Bluetooth picker.

enum EABluetoothAccessoryPickerError.Code

The error codes that may be passed in an error object to a EABluetoothAccessoryPickerCompletion block.

Notifications

static let EAAccessoryDidConnect: NSNotification.Name

Posted when an accessory becomes connected and available for your application to use.

static let EAAccessoryDidDisconnect: NSNotification.Name

Posted when an accessory is disconnected and no longer available for your application to use.

Relationships

Inherits From

Conforms To

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software