HMHome.AddAndSetupAccessories Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AddAndSetupAccessories(Action<NSError>) |
Displays a device selection user interface that allows the user to choose which devices to add and set up, and then runs a handler when the user exits the UI. |
AddAndSetupAccessories(HMAccessorySetupPayload, Action<HMAccessory[],NSError>) |
Scans for nearby accessories so the user can add them to the HomeKit object. |
AddAndSetupAccessories(Action<NSError>)
Displays a device selection user interface that allows the user to choose which devices to add and set up, and then runs a handler when the user exits the UI.
[Foundation.Export("addAndSetupAccessoriesWithCompletionHandler:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 10, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.TvOS, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual void AddAndSetupAccessories (Action<Foundation.NSError> completion);
abstract member AddAndSetupAccessories : Action<Foundation.NSError> -> unit
override this.AddAndSetupAccessories : Action<Foundation.NSError> -> unit
Parameters
- Attributes
Applies to
AddAndSetupAccessories(HMAccessorySetupPayload, Action<HMAccessory[],NSError>)
Scans for nearby accessories so the user can add them to the HomeKit object.
[Foundation.Export("addAndSetupAccessoriesWithPayload:completionHandler:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 11, 3, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.TvOS, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual void AddAndSetupAccessories (HomeKit.HMAccessorySetupPayload payload, Action<HomeKit.HMAccessory[],Foundation.NSError> completion);
abstract member AddAndSetupAccessories : HomeKit.HMAccessorySetupPayload * Action<HomeKit.HMAccessory[], Foundation.NSError> -> unit
override this.AddAndSetupAccessories : HomeKit.HMAccessorySetupPayload * Action<HomeKit.HMAccessory[], Foundation.NSError> -> unit
Parameters
- payload
- HMAccessorySetupPayload
The setup payload.
- completion
- Action<HMAccessory[],NSError>
A handler to run when the operation completes.
- Attributes