HomeKit is an app service available only to apps distributed through the App Store. HomeKit requires additional configuration in your Xcode project. Your app must be provisioned and code signed to use HomeKit. To avoid code signing issues, enable HomeKit in the Xcode Capabilities pane. You don’t need to edit entitlements directly in Xcode or Member Center.
To perform all the steps in this document, you need:
A Mac computer with Xcode 6 or later installed
For the best experience, the latest OS X and Xcode releases installed on your Mac
Membership in the iOS Developer Program
Permission to create code signing and provisioning assets in Member Center
Verify that you have performed these tasks before you begin using HomeKit. To create your team provisioning profile, read App Distribution Quick Start.
Join the iOS Developer Program.
Create an Xcode project that builds and runs.
Add your Apple ID to Accounts preferences.
In the General pane, create your team provisioning profile:
When you successfully complete the preceding tasks, the error message and the Fix Issue button below the Team pop-up menu in the General pane disappear. The screenshot below shows the General pane when the code signing assets are successfully created.
To troubleshoot code signing and provisioning, read Troubleshooting in App Distribution Guide.
To use HomeKit, you first enable it. Xcode will add the HomeKit entitlement to your entitlements file in the project and App ID in Member Center. Xcode also adds the HomeKit framework to your project. HomeKit requires an explicit App ID, which is created for you when you complete these steps.
To enable HomeKit
In Xcode, choose View > Navigators > Show Project Navigator.
Choose the target from the Project/Targets pop-up menu (or in the Product/Targets sidebar if it appears).
Click Capabilities to view app services that you can add to your app.
Scroll down to the HomeKit row and select the switch.
Download HomeKit Accessory Simulator
You don’t need to buy accessories to develop your HomeKit app. You can use HomeKit Accessory Simulator to test the communication of your HomeKit app with simulated accessories. HomeKit Accessory Simulator is not distributed with Xcode.
To download HomeKit Accessory Simulator
In the HomeKit section of the Capabilities pane, click Download HomeKit Accessory Simulator.
Alternatively, choose Xcode > Open Developer Tool > More Developer Tools.
In a browser, search for and download the “Hardware IO Tools for Xcode”
In the Finder, double-click the
Drag HomeKit Accessory Simulator to the
Later, you’ll test your app using HomeKit Accessory Simulator, as described in Testing Your HomeKit App.