Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/SimformSolutionsPvtLtd/CMPedometerDemo

Let's count steps using CMPedometer
https://github.com/SimformSolutionsPvtLtd/CMPedometerDemo

coremotion ios pedometer watchkit watchos

Last synced: about 1 month ago
JSON representation

Let's count steps using CMPedometer

Awesome Lists containing this project

README

        

# CMPedometerDemo
Let's count steps using CMPedometer

# Usage
#### Live steps

```swift
activityHelper.stepsCountingHandler = { steps,
distance,
averagePace,
pace,
floorsAscended,
floorsDscended,
cadence,
timeElapsed in
}
```
Then start observing using:

```swift
activityHelper.startMonitoring()
```

To Stop observing Steps:

```swift
activityHelper.stopMonitoring()
```

#### Historical steps

```swift
let startDate = Date() // Your desire start date
let endDate = Date() // Your desire end date
activityHelper.getStepsDataFor(startDate: startDate,
endDate: endDate,
successBlock: {(steps,
distance,
averagePace,
pace,
floorsAscended,
floorsDscended,
cadence,
timeElapsed ) in

}, errorBlock: { (error) in

})
```