Skip to content

Instantly share code, notes, and snippets.

View flexih's full-sized avatar

Xinghua flexih

  • Beijing
  • 05:57 (UTC +08:00)
View GitHub Profile
@flexih
flexih / weathermetada.swift
Last active February 25, 2023 23:14
Add weather conditions from WeatherKit to workout, displayed in Health App
extension WeatherCondition {
var hkWeatherCondition: HKWeatherCondition {
switch (self) {
case .clear:
return .clear
case .partlyCloudy:
return .partlyCloudy
case .mostlyCloudy:
return .mostlyCloudy