You must enable it on the Apple Developer Portal.
Go to "Application Identifiers" and edit your application.
Select the Wireless Accessory Configuration check box.
Cick done

Now just update the provisioning profile and rebuild / archive using the newly created profile.
source share