I have an issue that When I want to add the room to the Home incase if the user is Guest then I am getting HMErrorCodeInsufficientPrivileges
error. I have a view which will display after click on the button named "Add Room", My intensin is I want to detect it when the user clicked on the Add Room button and wants to display the alert without redirecting the user to Add Room View. Thank you for the valuable time. Please let me know if I am not clear.
Asked
Active
Viewed 143 times
5

SRI
- 1,514
- 21
- 39
-
I found the answer and may be helpful for someone so I have posted my answer – SRI Sep 08 '15 at 07:16
1 Answers
2
Finally in iOS 9 I found this solution.
HMUser *adminOrNot = [selectedHome currentUser];
HMHomeAccessControl *homeContr = [selectedHome homeAccessControlForUser:adminOrNot];
if(homeContr.administrator)
{
}

SRI
- 1,514
- 21
- 39