@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.
- package/android/build.gradle +1 -1
- package/app.plugin.js +33 -0
- package/package.json +1 -1
- package/vital-health-react-native.podspec +1 -1
package/android/build.gradle
CHANGED
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
|
@@ -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.
|
|
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
|