@flomentumsolutions/capacitor-health-extended 0.7.3 → 0.7.4
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.
|
@@ -892,9 +892,17 @@ public class HealthPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
892
892
|
return [HKObjectType.quantityType(forIdentifier: .heartRate)].compactMap { $0 as? HKSampleType }
|
|
893
893
|
case "WRITE_ROUTE":
|
|
894
894
|
return [HKSeriesType.workoutRoute()].compactMap { $0 as? HKSampleType }
|
|
895
|
+
case "WRITE_WEIGHT":
|
|
896
|
+
return [HKObjectType.quantityType(forIdentifier: .bodyMass)].compactMap { $0 as? HKSampleType }
|
|
897
|
+
case "WRITE_HEIGHT":
|
|
898
|
+
return [HKObjectType.quantityType(forIdentifier: .height)].compactMap { $0 as? HKSampleType }
|
|
899
|
+
case "WRITE_BODY_FAT":
|
|
900
|
+
return [HKObjectType.quantityType(forIdentifier: .bodyFatPercentage)].compactMap { $0 as? HKSampleType }
|
|
901
|
+
case "WRITE_RESTING_HEART_RATE":
|
|
902
|
+
return [HKObjectType.quantityType(forIdentifier: .restingHeartRate)].compactMap { $0 as? HKSampleType }
|
|
895
903
|
default:
|
|
896
|
-
//
|
|
897
|
-
return
|
|
904
|
+
// Avoid requesting write/share authorization when only read permissions are supplied.
|
|
905
|
+
return []
|
|
898
906
|
}
|
|
899
907
|
}
|
|
900
908
|
|
package/package.json
CHANGED