dariosalvi78 / cordova-plugin-health

Cordova plugin for the HealthKit and Google Fit frameworks
MIT License
176 stars 127 forks source link

ios10 - Missing parameters in info.plist #15

Closed 80leaves closed 7 years ago

80leaves commented 7 years ago

Not quite sure where exactly it belongs into, but as of iOS 10 following two parameters have to be present in the info.plist

https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW48

NSHealthShareUsageDescription="A very good reason why I want to read your data."; NSHealthUpdateUsageDescription="A very good reason why I want to write data.";

80leaves

p.s. also opened up the same issue in HealthKit project https://github.com/Telerik-Verified-Plugins/HealthKit/issues/77

dariosalvi78 commented 7 years ago

thanks for the suggestion. There is a way for cordova to modify the plist file, see this. If I put this into the plugin.xml, then the two sentences would be defined by the plugin, while they should be defined by the developer of the app. Another option could be adding a hook in the plugin.xml (see last answer). With a generic script, I could read the two sentences from a separate file that the user should specify (in some fixed position). Alternatively, I could just do nothing, and instruct the user in the README and with an in the plugin.xml.

Ideas are more than welcome.