HMAccessoryOwnershipToken
Authentication data that your app provides when adding an accessory to a home.
Declaration
class HMAccessoryOwnershipTokenOverview
If you manufacture an accessory that requires user authentication to add the accessory to a home, manage the authentication in your app and produce a token that represents the successful outcome of that process. Wrap the token data in an HMAccessoryOwnershipToken instance and call the init(url:ownershipToken:) method to create an authenticated HMAccessorySetupPayload instance. Then call the addAndSetupAccessories(with:completionHandler:) method with the payload.
If the user attempts from the Home app to add an accessory that requires a token, the Home app calls the associated app’s homeManager(_:didReceiveAddAccessoryRequest:) home manager delegate method to perform the negotiation and provide the token.