-
Notifications
You must be signed in to change notification settings - Fork 0
/
HKWorkoutActivityType.swift
227 lines (195 loc) · 5.74 KB
/
HKWorkoutActivityType.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
//
// HKWorkoutActivityType.swift
// WorkoutShoes
//
// Created by Daniel Kasaj on 18.08.2022..
//
import HealthKit
extension HKWorkoutActivityType {
var displayName: String {
// https://developer.apple.com/documentation/healthkit/hkworkoutactivitytype
switch self {
// MARK: - Individual Sports
case .archery:
return "Archery"
case .bowling:
return "Bowling"
case .fencing:
return "Fencing"
case .gymnastics:
return "Gymnastics"
case .trackAndField:
return "Track and Field"
// MARK: - Team Sports
case .americanFootball:
return "American Football"
case .australianFootball:
return "Australian Football"
case .baseball:
return "Baseball"
case .basketball:
return "Basketball"
case .cricket:
return "Cricket"
case .discSports:
return "Disc Sports"
case .handball:
return "Handball"
case .hockey:
return "Hockey"
case .lacrosse:
return "Lacrosse"
case .rugby:
return "Rugby"
case .soccer:
return "Soccer"
case .softball:
return "Softball"
case .volleyball:
return "Volleyball"
// MARK: - Exercise and Fitness
case .preparationAndRecovery:
return "Preparation and Recovery"
case .flexibility:
return "Flexibility"
case .cooldown:
return "Cooldown"
case .walking:
return "Walking"
case .running:
return "Running"
case .wheelchairWalkPace:
return "Wheelchair Walk Pace"
case .wheelchairRunPace:
return "Wheelchair Run Pace"
case .cycling:
return "Cycling"
case .handCycling:
return "Hand Cycling"
case .coreTraining:
return "Core Training"
case .elliptical:
return "Elliptical"
case .functionalStrengthTraining:
return "Functional Strength Training"
case .traditionalStrengthTraining:
return "Traditional Strength Training"
case .crossTraining:
return "Cross Training"
case .mixedCardio:
return "Mixed Cardio"
case .highIntensityIntervalTraining:
return "HIIT"
case .jumpRope:
return "Jump Rope"
case .stairClimbing:
return "Stair Climbing"
case .stairs:
return "Stairs"
case .stepTraining:
return "Step Training"
case .fitnessGaming:
return "Fitness Gaming"
// MARK: - Studio Activities
case .barre:
return "Barre"
case .cardioDance:
return "Cardio Dance"
case .socialDance:
return "Social Dance"
case .yoga:
return "Yoga"
case .mindAndBody:
return "Mind and Body"
case .pilates:
return "Pilates"
// MARK: - Racket Sports
case .badminton:
return "Badminton"
case .pickleball:
return "Pickleball"
case .racquetball:
return "Racquetball"
case .squash:
return "Squash"
case .tableTennis:
return "Table Tennis"
case .tennis:
return "Tennis"
// MARK: - Outdoor Activities
case .climbing:
return "Climbing"
case .equestrianSports:
return "Equestrian Sports"
case .fishing:
return "Fishing"
case .golf:
return "Golf"
case .hiking:
return "Hiking"
case .hunting:
return "Hunting"
case .play:
return "Play"
// MARK: - Snow and Ice Sports
case .crossCountrySkiing:
return "Cross Country Skiing"
case .curling:
return "Curling"
case .downhillSkiing:
return "Downhill Skiing"
case .snowSports:
return "Snow Sports"
case .snowboarding:
return "Snowboarding"
case .skatingSports:
return "Skating Sports"
// MARK: - Water Activities
case .paddleSports:
return "Paddle Sports"
case .rowing:
return "Rowing"
case .sailing:
return "Sailing"
case .surfingSports:
return "Surfing Sports"
case .swimming:
return "Swimming"
case .waterFitness:
return "Water Fitness"
case .waterPolo:
return "Water Polo"
case .waterSports:
return "Water Sports"
// MARK: - Martial Arts
case .boxing:
return "Boxing"
case .kickboxing:
return "Kickboxing"
case .martialArts:
return "Martial Arts"
case .taiChi:
return "Tai Chi"
case .wrestling:
return "Wrestling"
// MARK: - Other Activities
case .other:
return "Other"
// MARK: - DEPRECATED ACTIVITY TYPES
case .dance:
return "Dance"
case .danceInspiredTraining:
return "Dance Inspired Training"
case .mixedMetabolicCardioTraining:
return "Mixed Metabolic Cardio Training"
// MARK: - Enumeration Cases
case .swimBikeRun:
return "Swim - Bike - Run"
case .transition:
return "Transition"
// MARK: - Unknown future cases
@unknown default:
return "Unknown default"
}
}
}