편집

다음을 통해 공유


HMHome.AddAndSetupAccessories Method

Definition

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

completion
Action<NSError>

A handler to run when the operation completes.

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

Applies to