HMHome.AddServiceGroup(String, Action<HMServiceGroup,NSError>) 方法

定义

将名为 的服务 serviceGroupName 组添加到主页并在添加后运行 completion

[Foundation.Export("addServiceGroupWithName:completionHandler:")]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.TvOS, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual void AddServiceGroup (string serviceGroupName, Action<HomeKit.HMServiceGroup,Foundation.NSError> completion);
abstract member AddServiceGroup : string * Action<HomeKit.HMServiceGroup, Foundation.NSError> -> unit
override this.AddServiceGroup : string * Action<HomeKit.HMServiceGroup, Foundation.NSError> -> unit

参数

serviceGroupName
String
completion
Action<HMServiceGroup,NSError>

成功时返回的 null 处理程序,在失败时返回错误对象。

属性

适用于