Skip to content

Instantly share code, notes, and snippets.

View converted2mac's full-sized avatar

Daniel James converted2mac

View GitHub Profile
@converted2mac
converted2mac / ActivityKit.swift
Last active April 5, 2019 23:16
Drop-in wrapper around fetching data from HealthKit, written in Swift 3. Not open source, but I have permission to use for portfolio.
//
// Created by Daniel James on 3/1/17.
//
// At the time of original writing, I only needed to support three data types,
// but wanted to be able to easily add additional types later. As such, adding
// a supported type should be as simple as including the new type in the
// ActivityTypeOptions OptionSet and an if-statement to check for that type in
// the healthKitActivityTypes() function.
//