The idea:

Time in daylight is a new value tracked in the Health app. This is automatically done on watchOS 10 on Apple Watch SE (2nd generation), Apple Watch Series 6 and later, and Apple Watch Ultra. Go Outside app reminds you to go outside, compare yourself with friends, streaks, and more.

Current state:

  • gets data from HealthKit and stores the daily count in a local database
  • summary card: progress of today
  • summary card: progress of last seven days
  • summary card: current streak count and longest streak count
  • welcome to the app sheet (see screenshot)
  • in Settings you can set your daily goal
Screenshot

Go Outside on day 2. Welcome sheet.

Tech

I worked a lot with SwiftData today. Like it!

@Query(sort: \.date, order: .reverse) private var timeInDaylight: [TimeInDaylightData]

Like the Query macro, can do a lot of stuff with it including usage of predicates.

Next week: syncing with iCloud and sharing with friends.