Software Archive
Read-only legacy content
17061 Discussions

Using iOS HealthKit in Intel XDK

Narayan_P_
Beginner
456 Views

I am using HealthKit in an Intel XDK app. For HeathKit I am using ngCordova HealthKit Plugin(http://ngcordova.com/docs/plugins/healthkit/)

But the problem is how do I add "HealthKit" entitlement to the entitlements file.

Please see the attached image for the list of things required for HealthKit to work

Everything else such as linking the framework, app ID etc is done. Please help

0 Kudos
5 Replies
Brandon_K_Intel
Employee
456 Views

From the documentation, it looks like the plugin adds this for you. Have you tried building your application?

0 Kudos
Narayan_P_
Beginner
456 Views

No it doesn't. I have tried it multiple times.

I used Cordova CLI to generate XCode project. Then made this change in the XCode it worded. Therefore plugin doesn't do that.

Any solution?

0 Kudos
PaulF_IntelCorp
Employee
456 Views

Since you were able to do it locally, with an XCode project, you could deduce what the change in XCode meant for the plugin code. One way to do that would be to:

  • take a snapshot of the XCode project before you make the "entitlements file" change
  • make the XCode project change that fixes the "entitlements file" issue
  • compare the snapshot project to the fixed project
  • report the changes you found

Based on the changes you found we might be able to provide instructions on how to make this change manually in the plugin. If not, it may be that this can only be done on a local CLI build, in which case our cloud-based build system will not work for this plugin.

0 Kudos
Narayan_P_
Beginner
456 Views

It creates an .entitlements file after enabling the options. I have attached a image. The first file in the directory.

How can I do that using the plugin?

0 Kudos
PaulF_IntelCorp
Employee
456 Views

That location of that entitlements file is not going to translate well into the XDK cloud build system. If it was located inside the www directory our build system could deal with it, but that location is not going to work with our current system. I'm assuming that you do not move the file from that location, and the build works properly when the file is located there?

0 Kudos
Reply