AccessorySetupKit Remove paired accessory from app

Current if we use the removeAccessory(_:completionHandler:) method in ASAccessorySession, it removes the accessory from the system and all apps that have previously paired also lose access.

Is there a way to remove the paired accessory only from the app from where the removeAccessory() call is being made? This would be useful in cases where one or more accessories are shared across apps and we need to manage them.

Yes, removeAccessory() will remove it from the system and for all apps. This is by design, and this call will always remove it from the system.

While it may not be a usable solution for you, there are some nuances to removing accessories. If the accessory is shared by multiple apps, the removal is not automatic, and the user will be prompted and they will be notified that if they go ahead the device will be gone from the system. The user needs to be able to revoke an accessory for good, is the thinking behind this behavior.


Argun Tekant /  DTS Engineer / Core Technologies

AccessorySetupKit Remove paired accessory from app
 
 
Q