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.
Finally in iOS 9 I found this solution.
HMUser *adminOrNot = [selectedHome currentUser];
HMHomeAccessControl *homeContr = [selectedHome homeAccessControlForUser:adminOrNot];
if(homeContr.administrator)
{
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With