Nikita Zernov Nikita Zernov - 1 year ago 95
iOS Question

HomeKit: Check for permission

I have an iOS application using HomeKit and I need to check if application can access HomeKit Store. As I noticed,

will be called anyway. How do I check for HomeKit store permission?

Answer Source

Edit: This apparently doesn't work anymore. Unfortunately, I'm not doing HK development anymore. See @windwalker's comment below for some info.

[[HMHomeManager alloc] init]

will return nil if you don't have access to the home. Other HomeKit inits will also return nil, that's just the one that I'm checking since it's the first thing that we try once the app loads.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download