Support checking Home Data permissions for HomeKit

Originator:simon911011
Number:rdar://26251592 Date Originated:12-May-2016 03:09 PM
Status:Open Resolved:
Product:iOS Product Version:iOS 9.3
Classification:Enhancement Reproducible:Always
 
Summary:
HomeKit should allow developers to check whether the user has granted Home Data permissions for the application. Currently there isn't a documented way to do so, and developers have to wait for HMErrorCode.HomeAccessNotAuthorized to see that the application is not authorized.

Steps to Reproduce:
1. Perform some HomeKit operation

Expected Results:
There should be a property to check HomeKit permission without relying on an error - similar to `isRegisteredForRemoteNotifications` for notifications or `authorizationStatus()` for CLLocationManager

Actual Results:
Operation returns with error HMErrorCode.HomeAccessNotAuthorized. Only then the application knows Home Data access is not available

Version:
iOS 9.3

Notes:


Configuration:
iPhone 6, T-Mobile 64GB, using WiFi

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!