Расскажи про AccessorySetupKit

Generated on 8/6/2024

1 search

AccessorySetupKit is a new framework introduced by Apple at WWDC 2024, designed to streamline and enhance the setup experience for Bluetooth and WiFi accessories in iOS 18 and iPadOS 18. Here are the key points about AccessorySetupKit:

  1. Streamlined Setup: AccessorySetupKit simplifies the process of pairing accessories with your app. With just one tap, the accessory is paired, granting your app both Bluetooth and WiFi access. This reduces friction during the initial setup, making it easier for users to get started with their accessories.

  2. Privacy-Friendly Design: The accessory picker, which is used to select and pair accessories, runs in a separate process from your app. This design ensures that the setup process is privacy-friendly. Your app sends discovery rules and assets to the picker process, which can be configured for both Bluetooth and WiFi interfaces.

  3. Enhanced User Control: Users can easily identify accessories through the accessory picker, which displays the friendly name and product image of the accessory. They can also modify the accessory name, toggle access for paired apps, or remove the accessory from the system.

  4. API Integration: To use AccessorySetupKit, developers need to add specific entries to the app's info plist, such as Bluetooth and WiFi under accessory setup kit support. The framework handles the discovery and authorization of accessories, while communication is managed using Core Bluetooth and Network Extension.

  5. Migration of Existing Accessories: If your app already manages accessories using system access, you can migrate these accessories to AccessorySetupKit. This is done using migration display items, which allow existing accessories to be found in the new accessory settings.

  6. Design Recommendations: Apple provides guidelines to ensure that accessory images look sharp and are well-presented in both light and dark modes. The accessory picker offers a container box of 180 by 120 points to house the product image.

For a detailed overview and to see how to implement AccessorySetupKit in your app, you can watch the session Meet AccessorySetupKit (00:02:49).