beeminder / BeeSwift

Official Beeminder for iOS app
Other
30 stars 6 forks source link

Isolate HealthKit interactions from the rest of the codebase #325

Closed theospears closed 1 year ago

theospears commented 1 year ago

This PR takes two steps towards isolating HealthKit logic from the rest of the codebase

  1. It removes logic from the JSONGoal class, and instead moves it to a HealthKitConnection class
  2. It moves all health kit data model operations to behind HealthStoreManager

This reduction in surface area should make it much simpler to refactor the health kit code.

Test Plan:

Note that this code cannot be correctly tested on simulator as it does not have data available.