Senseful
Senseful

Reputation: 91751

HMHomeManager homes is empty

I'm creating an instance of HMHomeManager, registering the delegate, waiting until homeManegerDidUpdateHomes() is called, but when I read manager.homes, it returns an empty array.

I tried checking the following:

Nothing seems to work, though.

Upvotes: 1

Views: 936

Answers (1)

Senseful
Senseful

Reputation: 91751

Turns out it's not enough to enable all those settings. You also need to go to the Capabilities tab of your project, and enable HomeKit. Otherwise manager.homes.count will be zero, and manager.primaryHome will be nil.

Upvotes: 0

Related Questions