I have added health cordova plugin to my project using command meteor add cordova:com.telerik.plugins.healthkit@0.3.8
But when i check for health kit using this code i get nothing
window.plugins.healthkit.available(
function(isAvailable) {
alert(isAvailable ? "HealthKit available :)" : "No HealthKit on this device :(")
}
);
i tried using navigator.plugins in place of window.plugins but i still got nothing.
Any help would be appreciated.
Solved:The problem was i was unable to find Plugin_name.m file in the plugins directory in Xcode, so i manually added the Plugin_name.m file in build phases (you can find Plugin_name.m file in plugin->src->ios folder) and then copy (remove back-slashes) the feature name of plugin from ios.json file (which is present in cordova-builds folder) and added it in project’s config.xml file.
Plugin works fine and i’m getting step counts
Note:- You may have to add all the files in build phases which is included in plugin_name.m file.
For anybody searching the forums for HealthKit… as of June 2017, it appears that Apple has just announced support for Argonaut Project and Fast Healthcare Interoperability Resources (FHIR).