简体   繁体   English

HomeKit HMHome用户已弃用iOS9

[英]HomeKit HMHome Users deprecated iOS9

在iOS8中,HMHome可以访问用户,但在iOS9中却无法使用,您如何知道与iOS9共享房屋的哪些用户?

You don't. 你不知道 The only available information is the access control the user has to the home, whether he/she is an administrator of the home or is a guest of a home (shared). 唯一可用的信息是用户对房屋的访问控制权,无论他/她是房屋的管理员还是房屋的客人(共享)。 Apple controls the list of users with its own dialog. Apple通过自己的对话框控制用户列表。

You use this function to show Apple dialog 您使用此功能显示Apple对话框

manageUsersWithCompletionHandler(_: (NSError?) -> Void)

where you can check the access the user has with this HMHome extension 您可以在其中检查此HMHome扩展对用户的访问权限

var isAdmin: Bool {
    return self.homeAccessControlForUser(currentUser).administrator
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM