react-native-visit-rn-sdk 3.0.12 → 3.0.13

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
@@ -1,7 +1,7 @@
1
1
  ### **Instructions for configuring your Android Project**
2
2
 
3
3
  * Install Visit React Native Plugin
4
- `npm install react-native-visit-rn-sdk@3.0.11`
4
+ `npm install react-native-visit-rn-sdk@3.0.13`
5
5
  * Install these transitive plugins that Visit Plugin requires internally:
6
6
  `npm install react-native-device-info`
7
7
  `npm install https://github.com/sashko9807/react-native-location-enabler`
@@ -42,7 +42,7 @@ android {
42
42
 
43
43
  ### **Instructions for configuring Plugin in iOS project**
44
44
 
45
- * Add the plugin `npm install react-native-visit-rn-sdk@3.0.11 && npx pod-install`
45
+ * Add the plugin `npm install react-native-visit-rn-sdk@3.0.13 && npx pod-install`
46
46
  * Install pods(for M1 processors running build on `x86_64` hardware)
47
47
 
48
48
  `arch -x86_64 pod install`
@@ -86,7 +86,7 @@ To see the full usage code for getting Health Connect/HealthKit connection statu
86
86
 
87
87
  ## **Health Connect Connection Flow (Android)**
88
88
 
89
- Version `3.0.11` uses AndroidSDK `v3.13` and routes the PWA's Health Connect request according to the Health Connect installation status and the device's native step-tracking capability.
89
+ Version `3.0.13` uses AndroidSDK `v3.13` and routes the PWA's Health Connect request according to the Health Connect installation status and the device's native step-tracking capability.
90
90
 
91
91
  The maintained RN 3.x release is also available through its npm dist-tag:
92
92
 
@@ -197,6 +197,15 @@ Set `isLoggingEnabled={true}` on `VisitRnSdkView` to log the status, capability
197
197
 
198
198
  ## **RN 3.x Release Notes**
199
199
 
200
+ ### **3.0.13**
201
+
202
+ * Add iOS compatibility methods for `getTodaySleepMinutes()` and `getTodayCalorieCount()` that resolve to `0`.
203
+ * Keep the existing JavaScript APIs and callback signatures unchanged.
204
+
205
+ ### **3.0.12**
206
+
207
+ * Rely on the PWA's `GET_HEALTH_CONNECT_STATUS` request instead of automatically refreshing Health Connect status whenever the Android app returns to the foreground.
208
+
200
209
  ### **3.0.11**
201
210
 
202
211
  * Upgrade AndroidSDK to `v3.13`.
@@ -19,6 +19,8 @@
19
19
  - (void)getHealthKitStatus:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject;
20
20
  - (void)requestHealthKitAuthorization:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject;
21
21
  - (void)getTodayStepCount:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject;
22
+ - (void)getTodaySleepMinutes:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject;
23
+ - (void)getTodayCalorieCount:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject;
22
24
  - (void)triggerManualSync:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject;
23
25
 
24
26
  @end
@@ -1158,6 +1158,22 @@ RCT_REMAP_METHOD(getTodayStepCount,
1158
1158
  [[VisitRnSdkViewManager sharedManager] executeQuery:query];
1159
1159
  }
1160
1160
 
1161
+ // Compatibility stub: always resolves 0.
1162
+ RCT_REMAP_METHOD(getTodaySleepMinutes,
1163
+ getTodaySleepMinutesWithResolver:(RCTPromiseResolveBlock)resolve
1164
+ rejecter:(RCTPromiseRejectBlock)reject)
1165
+ {
1166
+ resolve(@0);
1167
+ }
1168
+
1169
+ // Compatibility stub: always resolves 0.
1170
+ RCT_REMAP_METHOD(getTodayCalorieCount,
1171
+ getTodayCalorieCountWithResolver:(RCTPromiseResolveBlock)resolve
1172
+ rejecter:(RCTPromiseRejectBlock)reject)
1173
+ {
1174
+ resolve(@0);
1175
+ }
1176
+
1161
1177
  RCT_REMAP_METHOD(triggerManualSync,
1162
1178
  triggerManualSyncWithResolver:(RCTPromiseResolveBlock)resolve
1163
1179
  rejecter:(RCTPromiseRejectBlock)reject)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-visit-rn-sdk",
3
- "version": "3.0.12",
3
+ "version": "3.0.13",
4
4
  "description": "a package to inject data into visit health pwa",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",