You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The readme for this plugin instructs the developer to manually add the HealthKit entitlement when adding the plugin.
Make sure your app id has the 'HealthKit' entitlement when this plugin is installed (see iOS dev center).
For my app, we clean and rebuild the cordova platforms every time we build, so this means that we have to manually go into Xcode and add the HealthKit entitlement each time, which is time consuming and error prone.
We were able to do this sort of automatically by upgrading to cordova-ios 4.3, which ensures that the xcode project gets an entitlement file. We then used this post-prepare hook to add the capability:
#!/bin/bash
PLIST=platforms/ios/*/Entitlements-Debug.plist
cat << EOF |
Add :com.apple.developer.healthkit bool YES
EOF
while read line
do
/usr/libexec/PlistBuddy -c "$line" $PLIST
done
true
This adds the capability to the plist file (you'd have to do the same for Release). Still it would be great if the plugin does this automatically.
The readme for this plugin instructs the developer to manually add the HealthKit entitlement when adding the plugin.
For my app, we clean and rebuild the cordova platforms every time we build, so this means that we have to manually go into Xcode and add the HealthKit entitlement each time, which is time consuming and error prone.
As an example, it looks like the cordova-universal-links-plugin adds the entitlements it needs via hooks:
https://github.com/nordnet/cordova-universal-links-plugin/tree/master/hooks
Note that the HealthKit plugin.xml file does include the framework
However, I believe the entitlement is not added automatically (despite this comment: #15 (comment)).
The text was updated successfully, but these errors were encountered: