@capgo/capacitor-health 7.2.6 → 7.2.8

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/README.md CHANGED
@@ -8,6 +8,20 @@
8
8
 
9
9
  Capacitor plugin to read and write health metrics via Apple HealthKit (iOS) and Health Connect (Android). The TypeScript API keeps the same data types and units across platforms so you can build once and deploy everywhere.
10
10
 
11
+ ## Why Capacitor Health?
12
+
13
+ The only **free**, **unified** health data plugin for Capacitor supporting the latest native APIs:
14
+
15
+ - **Health Connect (Android)** - Uses Google's newest health platform (replaces deprecated Google Fit)
16
+ - **HealthKit (iOS)** - Full integration with Apple's health framework
17
+ - **Unified API** - Same TypeScript interface across platforms with consistent units
18
+ - **Multiple metrics** - Steps, distance, calories, heart rate, weight
19
+ - **Read & Write** - Query historical data and save new health entries
20
+ - **Modern standards** - Supports Android 8.0+ and iOS 14+
21
+ - **Modern package management** - Supports both Swift Package Manager (SPM) and CocoaPods (SPM-ready for Capacitor 8)
22
+
23
+ Perfect for fitness apps, health trackers, wellness platforms, and medical applications.
24
+
11
25
  ## Documentation
12
26
 
13
27
  The most complete doc is available here: https://capgo.app/docs/plugins/health/
@@ -22,7 +22,7 @@ import kotlinx.coroutines.withContext
22
22
 
23
23
  @CapacitorPlugin(name = "Health")
24
24
  class HealthPlugin : Plugin() {
25
- private val PLUGIN_VERSION = "7.2.5"
25
+ private val pluginVersion = "7.2.5"
26
26
  private val manager = HealthManager()
27
27
  private val pluginScope = CoroutineScope(SupervisorJob() + Dispatchers.Main.immediate)
28
28
  private var pendingAuthorization: PendingAuthorization? = null
@@ -313,7 +313,7 @@ class HealthPlugin : Plugin() {
313
313
  fun getPluginVersion(call: PluginCall) {
314
314
  try {
315
315
  val ret = JSObject()
316
- ret.put("version", PLUGIN_VERSION)
316
+ ret.put("version", pluginVersion)
317
317
  call.resolve(ret)
318
318
  } catch (e: Exception) {
319
319
  call.reject("Could not get plugin version", e)
@@ -3,7 +3,7 @@ import Capacitor
3
3
 
4
4
  @objc(HealthPlugin)
5
5
  public class HealthPlugin: CAPPlugin, CAPBridgedPlugin {
6
- private let PLUGIN_VERSION: String = "7.2.6"
6
+ private let pluginVersion: String = "7.2.8"
7
7
  public let identifier = "HealthPlugin"
8
8
  public let jsName = "Health"
9
9
  public let pluginMethods: [CAPPluginMethod] = [
@@ -131,7 +131,7 @@ public class HealthPlugin: CAPPlugin, CAPBridgedPlugin {
131
131
  }
132
132
 
133
133
  @objc func getPluginVersion(_ call: CAPPluginCall) {
134
- call.resolve(["version": self.PLUGIN_VERSION])
134
+ call.resolve(["version": self.pluginVersion])
135
135
  }
136
136
 
137
137
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-health",
3
- "version": "7.2.6",
3
+ "version": "7.2.8",
4
4
  "description": "Capacitor plugin to interact with data from Apple HealthKit and Health Connect",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",