Skip to content

hdpinc/heal-healthkit-generator

 
 

Repository files navigation

  • HealthKitのダミーデータをセットするアプリ
  • 起動したら真っ白だけど、少し放置するとダミーデータが入る
  • アプリを配布するのにFirebase App Distributionを使っていたので、Firebaseが依存に入っている
    • そのためGoogleService-Info.plistが必要なのでビルド時に準備しておく
    • 配置するpathはgitignoreを参照

Heal HealthKit Sample Data Generator

This is a small project for generating sample data within HealthKit on an iOS Simulator.

Setup

  1. Run pod install and open the created workspace
  2. Inside ViewController.swift, set sampleData.sampleTypes to the Set of sample types that you would like to generate random data for. The project includes an HKOBjectTypes file which contains a Set of all sharable HealthKit sample types.
  3. Inside ViewController.swift, set sampleData.writeDataSince to the length of time would like to generate data for.
  4. Run the project, allow the app permission for all sample types and the app will begin populating HealthKit

To clear all HealthKit data, erase and restart the simulator.

Please note that this generator uses random numbers from 1 - 100. The data WILL look weird in HealthKit. We're hoping to implmement sensible ranges for each quantity type in the future.

About

Generate HealthKit sample data for the iOS simulator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 95.1%
  • Ruby 4.9%