Nikita Zernov Nikita Zernov - 6 days ago 4x
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?


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.