You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On success, the callback function will be provided with a `peakFlow` object containing the Peak Flow Expiratory rate `value`, and the `startDate` and `endDate` of the Peak Flow sample. _Note: startDate and endDate will be the same as samples are saved at a specific point in time._
endDate:newDate().toISOString(), // optional; default now
12
+
ascending:false, // optional; default false
13
+
limit:10, // optional; default no limit
14
+
}
15
+
```
16
+
17
+
Call the method:
18
+
19
+
```javascript
20
+
AppleHealthKit.getPeakFlowSamples(
21
+
options,
22
+
(err:Object, results:Array<HealthValue>) => {
23
+
if (err) {
24
+
return
25
+
}
26
+
console.log(results)
27
+
},
28
+
)
29
+
```
30
+
31
+
Example output:
32
+
33
+
Note the first item in the sample was saved from the app using `.savePeakFlow` hence it has the _sourceId_ and _sourceName_ of the app. The others have _Apple Health_ as a _sourceId_ since they were saved in Apple Health directly.
0 commit comments