HomeKit addAndSetupAccessories always fails in simulator?

hi there,

i've just started digging into developing for HomeKit, so it's quite possible i'm missing something (or this is expected?), but calling addAndSetupAccessories always fails instantly (no UI appears) when running in the simulator. the error is:

Code Block
addAndSetupAccessories got error Optional(Error Domain=HMErrorDomain Code=79 "Failed to add the accessory." UserInfo={NSLocalizedDescription=Failed to add the accessory.})


i'm running the HomeKit simulator with a home created + one standard lightbulb accessory added.

if i run on device it works as expected (using my real homekit accessories)

xcode: Version 12.0 beta 4 (12A8179i)
homekit accessory simulator: Version 4.0 (135.3)




Oh, i should also say that HMAccessoryBrowser's startSearchingForNewAccessories is able to find the simulated accessories when my app is running in the simulator.
Ahh hmm I spoke to soon.. I also get an error using HMAccessoryBrowser and then calling addAccessory on the home, so it seems the issue isn't with discovering accessories but adding them to the home.

not sure if these error message are any use, but...

Code Block
[Activity] [-[HMHome _addAccessory:accessoryDescription:password:setupCodeDeferred:progress:completionHandler:], /Library/Caches/com.apple.xbs/Sources/HomeKit_Sim/HomeKit-705.2.0.0.2/Sources/HomeKit/HMHome.m:6645 (B2912D6E-601D-4835-B7BA-4DCFC161FB10)] Thread left active (1): <NSThread: 0x60000128c440>{number = 9, name = main}

Code Block
 sendMessageWithDictionary: Failed to get remote object proxy: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service on pid 0 named com.apple.rtcreportingd" UserInfo={NSDebugDescription=connection to service on pid 0 named com.apple.rtcreportingd}

Code Block
sendMessageWithDictionary: Failed to get remote object proxy: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service on pid 0 named com.apple.rtcreportingd" UserInfo={NSDebugDescription=connection to service on pid 0 named com.apple.rtcreportingd}


Im seeing the same exact error as ziggmike. Have you found a solution you could possibly share please?

HomeKit addAndSetupAccessories always fails in simulator?
 
 
Q