简体   繁体   中英

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.

You use this function to show Apple dialog

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

where you can check the access the user has with this HMHome extension

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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