下载HomeKit Accessory Simulator
无需为了开发Homekit 应用程序而购买硬件产品。你可以使HomeKit Accessory Simulator来测试HomeKit app和模拟配件设备之间的通信。HomeKit Accessory Simulator不是和Xcode一起发布的。
下载HomeKit Accessory Simulator步骤如下：
在Capabilities面板的HomeKit分区，点击Download HomeKit Accessory Simulator按钮。（或者选择Xcode > Open Developer Tool > More Developer Tools）
在浏览器中搜索并且下载"Hardware IO Tools for Xcode “.dmg文件。
把HomeKit Accessory Simulator拖拽到/Application文件中。
之后，你将可以使用HomeKit Accessory Simulator测试你的HomeKit应用程序，正如Testing YourHomeKit App（第30页）中描述的那样。
Testing Your HomeKit App
If you don’t have physical accessories, use HomeKit Accessory Simulator to simulate accessories in a home. Each simulated accessory has services with characteristics that you can control from your app. Your app creates the objects and relationships that are stored in the HomeKit database. It creates the home layout, adds new accessories to the home in the simulated environment, and adds the accessories to rooms in a home. Then your app can control the accessories displayed in HomeKit Accessory Simulator. To test with HomeKit Accessory Simulator, run your app in iOS Simulator, or run it on an iOS device using Xcode.
HomeKit Accessory Simulator is an additional developer tool that is not installed with Xcode. To install HomeKit Accessory Simulator, follow the steps in Download HomeKit Accessory Simulator.
Use HomeKit Accessory Simulator to add some accessories to the simulated network.
To add an accessory to the network
1.In HomeKit Accessory Simulator, click the Add button (+) at the bottom of the left column.
2.Choose Add Accessory from the pop-up menu.
3.Enter an accessory name and manufacturer.
4.Click Finish. To delete an accessory, select the accessory and enter Delete on the keyboard.