Instance Method

registerForLocalNotifications()

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

Declaration

func registerForLocalNotifications()

Discussion

You must call this method if you want to be notified when accessories become connected or disconnected. The system does not send these notifications automatically, so calling this method lets the system know that your application is interested in them. Typically, you would call this method only once early in your application, either before or after configuring your notification observers. When you no longer need to monitor these notifications, you should call the matching unregisterForLocalNotifications() method.

You can configure your notification observers either before or after calling this method. Because the shared accessory manager is the only object that sends accessory-related notifications, specifying that object or nil for the notification sender has the same outcome.

See Also

Starting and Stopping Accessory Notifications

func unregisterForLocalNotifications()

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

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