Search code examples
swifthealthkitwatchos-6

How to enable Healthkit in watch only app


Does anyone know how to enable Healthkit for an independent watchos only app ? When i go to the projects target i can't find capabilities to add to the app.

Am i missing something ?

I tried looking for it in the project but could not find anything.


Solution

  • From the documentation i found following information:

    In the Project navigator, select the project and in the project editor, select the target.

    Choose the target from the Project/Targets pop-up menu or in the Targets section of the outline view if it appears.

    In the project editor, click Signing & Capabilities.

    Click All or select a specific build configuration.

    For example, select Debug if you want to test a capability without adding it to a release build.

    Click the + Capability button (Editor > Add Capability) to open the Capability library, .

    The Capability library shows only the capabilities available to the target type and your program membership. If you are not a member of the Apple Developer Program, the capabilities you can add are limited.

    I think it has to do something with the last line. I have no paid membership, and in a later project got the message that not more then 10 app'id's are allowed and i have to wait 7 days. So annoying.