@tryvital/vital-health-react-native 2.0.0 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -130,7 +130,7 @@ repositories {
130
130
  }
131
131
 
132
132
  def kotlin_version = getExtOrDefault('kotlinVersion')
133
- def vital_sdk_version = '1.0.0-beta.21'
133
+ def vital_sdk_version = '1.0.0-beta.23'
134
134
  def health_connect_version = '1.0.0-alpha11'
135
135
 
136
136
  dependencies {
package/app.plugin.js ADDED
@@ -0,0 +1,33 @@
1
+ const { withEntitlementsPlist, withInfoPlist } = require('@expo/config-plugins')
2
+
3
+ const HEALTH_SHARE = 'Allow $(PRODUCT_NAME) to check health info'
4
+
5
+ const withHealthKit = (
6
+ config,
7
+ { healthSharePermission } = {},
8
+ ) => {
9
+ // Add permissions
10
+ config = withInfoPlist(config, (config) => {
11
+ config.modResults.NSHealthShareUsageDescription =
12
+ healthSharePermission ||
13
+ config.modResults.NSHealthShareUsageDescription ||
14
+ HEALTH_SHARE
15
+
16
+ return config
17
+ })
18
+
19
+ // Add entitlements. These are automatically synced when using EAS build for production apps.
20
+ config = withEntitlementsPlist(config, (config) => {
21
+ config.modResults['com.apple.developer.healthkit'] = true
22
+ if (
23
+ !Array.isArray(config.modResults['com.apple.developer.healthkit.access'])
24
+ ) {
25
+ config.modResults['com.apple.developer.healthkit.access'] = []
26
+ }
27
+
28
+ return config
29
+ })
30
+
31
+ return config
32
+ }
33
+ module.exports = withHealthKit
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryvital/vital-health-react-native",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "Client to access iOS's HealthKit and Android HealthConnect",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -17,7 +17,7 @@ Pod::Spec.new do |s|
17
17
  s.source_files = "ios/**/*.{h,m,mm,swift}"
18
18
 
19
19
  s.dependency "React-Core"
20
- s.dependency "VitalHealthKit", "~> 0.10.6"
20
+ s.dependency "VitalHealthKit", "~> 0.10.8"
21
21
 
22
22
  # Don't install the dependencies when we run `pod install` in the old architecture.
23
23
  if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then