/HealthKitCombine

A library to create Swift Combine publishers to retrieve HealthKit data.

Primary LanguageSwiftMIT LicenseMIT

bitrise CI platforms Swift Package Manager compatible

HealthKitCombine

HealthKitCombine is a library that makes HealthKit functions for retrieving workouts via Swift Combine publishers. This makes it easy to integrate HealthKit into a SwiftUI application. This library is used in Travaartje: https://travaartje.net.

How to use

See https://github.com/katoemba/travaartje for examples how this library can be used.

Requirements

  • iOS 13, watchOS 6
  • Swift 5.1

Installation

Build and usage via swift package manager is supported:

The easiest way to add the library is directly from within XCode (11). Alternatively you can create a Package.swift file.

// swift-tools-version:5.0

import PackageDescription

let package = Package(
  name: "MyProject",
  dependencies: [
  .package(url: "https://github.com/katoemba/healthkitcombine.git", from: "1.0.0")
  ],
  targets: [
    .target(name: "MyProject", dependencies: ["HealthKitCombine"])
  ]
)

Testing

There are no unit tests, as this would require extensive mocking of HealthKit which doesn't seem worth the trouble.

Who do I talk to?

  • In case of questions you can contact berrie at travaartje dot net