@kingstinct/react-native-healthkit 9.0.7 → 9.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ios/CategoryTypeModule.swift +18 -21
- package/ios/CorrelationTypeModule.swift +18 -18
- package/ios/HeartbeatSeriesModule.swift +32 -32
- package/ios/QuantityTypeModule.swift +56 -57
- package/ios/Serializers.swift +12 -16
- package/ios/StateOfMindModule.swift +17 -17
- package/ios/WorkoutsModule.swift +59 -110
- package/lib/typescript/specs/WorkoutsModule.nitro.d.ts +3 -0
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.cpp +3 -44
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.hpp +24 -124
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Umbrella.hpp +0 -14
- package/package.json +2 -2
- package/src/specs/WorkoutsModule.nitro.ts +3 -0
- package/ios/WorkoutSessionModule.swift +0 -182
- package/lib/commonjs/specs/WorkoutSessionModule.nitro.js +0 -19
- package/lib/module/specs/WorkoutSessionModule.nitro.js +0 -16
- package/lib/typescript/specs/WorkoutSessionModule.nitro.d.ts +0 -47
- package/nitrogen/generated/ios/c++/HybridWorkoutSessionModuleSpecSwift.cpp +0 -11
- package/nitrogen/generated/ios/c++/HybridWorkoutSessionModuleSpecSwift.hpp +0 -107
- package/nitrogen/generated/ios/swift/Func_void_WorkoutEventType.swift +0 -46
- package/nitrogen/generated/ios/swift/Func_void_WorkoutSessionState_WorkoutSessionState_std__chrono__system_clock__time_point.swift +0 -46
- package/nitrogen/generated/ios/swift/Func_void_std__vector_RemoteSessionSharableData_.swift +0 -46
- package/nitrogen/generated/ios/swift/HybridWorkoutSessionModuleSpec.swift +0 -49
- package/nitrogen/generated/ios/swift/HybridWorkoutSessionModuleSpec_cxx.swift +0 -133
- package/nitrogen/generated/ios/swift/RemoteSessionSharableData.swift +0 -46
- package/nitrogen/generated/ios/swift/WorkoutSessionMirroringStartHandlerOptions.swift +0 -118
- package/nitrogen/generated/ios/swift/WorkoutSessionState.swift +0 -56
- package/nitrogen/generated/shared/c++/HybridWorkoutSessionModuleSpec.cpp +0 -22
- package/nitrogen/generated/shared/c++/HybridWorkoutSessionModuleSpec.hpp +0 -68
- package/nitrogen/generated/shared/c++/RemoteSessionSharableData.hpp +0 -75
- package/nitrogen/generated/shared/c++/WorkoutSessionMirroringStartHandlerOptions.hpp +0 -92
- package/nitrogen/generated/shared/c++/WorkoutSessionState.hpp +0 -68
- package/src/specs/WorkoutSessionModule.nitro.ts +0 -71
package/ios/WorkoutsModule.swift
CHANGED
|
@@ -6,55 +6,6 @@ import NitroModules
|
|
|
6
6
|
import WorkoutKit
|
|
7
7
|
#endif
|
|
8
8
|
|
|
9
|
-
/*func tryParseWeatherCondition(_ weatherCondition: Int?) -> WeatherCondition? {
|
|
10
|
-
if let weatherCondition = weatherCondition {
|
|
11
|
-
return WeatherCondition.init(rawValue: Int32(weatherCondition))
|
|
12
|
-
}
|
|
13
|
-
return nil
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
func deserializeWorkoutMetadata(_ metadata: WorkoutMetadata?) -> [String: Any]? {
|
|
17
|
-
if let metadata = metadata {
|
|
18
|
-
var dict = metadata.allMetadata != nil
|
|
19
|
-
? anyMapToDictionary(metadata.allMetadata!)
|
|
20
|
-
: Dictionary<String, Any>()
|
|
21
|
-
// todo (important): hmm, not sure about the typed props here
|
|
22
|
-
// dict[""]
|
|
23
|
-
return dict
|
|
24
|
-
}
|
|
25
|
-
return nil
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
func serializeWorkoutMetadata(_ metadata: [String: Any]?) -> WorkoutMetadata? {
|
|
29
|
-
if let metadata = metadata {
|
|
30
|
-
return WorkoutMetadata(
|
|
31
|
-
// todo: figure out conversions here
|
|
32
|
-
HKWeatherCondition: tryParseWeatherCondition(metadata["HKWeatherCondition"] as? Int),
|
|
33
|
-
HKWeatherHumidity: serializeUnknownQuantityTyped(quantity: metadata["HKWeatherHumidity"] as? HKQuantity),
|
|
34
|
-
HKWeatherTemperature: serializeUnknownQuantityTyped(quantity: metadata["HKWeatherTemperature"] as? HKQuantity),
|
|
35
|
-
HKAverageMETs: serializeUnknownQuantityTyped(quantity: metadata["HKAverageMETs"] as? HKQuantity),
|
|
36
|
-
HKElevationAscended: serializeUnknownQuantityTyped(quantity: metadata["HKElevationAscended"] as? HKQuantity),
|
|
37
|
-
HKIndoorWorkout: metadata["HKIndoorWorkout"] as? Bool,
|
|
38
|
-
HKExternalUUID: metadata["HKExternalUUID"] as? String,
|
|
39
|
-
HKTimeZone: metadata["HKTimeZone"] as? String,
|
|
40
|
-
HKWasUserEntered: metadata["HKWasUserEntered"] as? Bool,
|
|
41
|
-
HKDeviceSerialNumber: metadata["HKDeviceSerialNumber"] as? String,
|
|
42
|
-
HKUDIDeviceIdentifier: metadata["HKUDIDeviceIdentifier"] as? String,
|
|
43
|
-
HKUDIProductionIdentifier: metadata["HKUDIProductionIdentifier"] as? String,
|
|
44
|
-
HKDigitalSignature: metadata["HKDigitalSignature"] as? String,
|
|
45
|
-
HKDeviceName: metadata["HKDeviceName"] as? String,
|
|
46
|
-
HKDeviceManufacturerName: metadata["HKDeviceManufacturerName"] as? String,
|
|
47
|
-
HKSyncIdentifier: metadata["HKSyncIdentifier"] as? String,
|
|
48
|
-
HKSyncVersion: metadata["HKSyncVersion"] as? Double,
|
|
49
|
-
HKWasTakenInLab: metadata["HKWasTakenInLab"] as? Bool,
|
|
50
|
-
HKReferenceRangeLowerLimit: metadata["HKReferenceRangeLowerLimit"] as? Double,
|
|
51
|
-
HKReferenceRangeUpperLimit: metadata["HKReferenceRangeUpperLimit"] as? Double,
|
|
52
|
-
allMetadata: serializeAllMetadata(metadata)
|
|
53
|
-
)
|
|
54
|
-
}
|
|
55
|
-
return nil
|
|
56
|
-
}*/
|
|
57
|
-
|
|
58
9
|
func mapLocations(from locations: [LocationForSaving]) -> [CLLocation] {
|
|
59
10
|
return locations.compactMap { location in
|
|
60
11
|
let latitude = location.latitude
|
|
@@ -65,7 +16,7 @@ func mapLocations(from locations: [LocationForSaving]) -> [CLLocation] {
|
|
|
65
16
|
let course = location.course
|
|
66
17
|
let speed = location.speed
|
|
67
18
|
let timestamp = location.date
|
|
68
|
-
|
|
19
|
+
|
|
69
20
|
let clLocation = CLLocation(
|
|
70
21
|
coordinate: CLLocationCoordinate2D(
|
|
71
22
|
latitude: latitude,
|
|
@@ -76,24 +27,40 @@ func mapLocations(from locations: [LocationForSaving]) -> [CLLocation] {
|
|
|
76
27
|
verticalAccuracy: verticalAccuracy,
|
|
77
28
|
course: course,
|
|
78
29
|
speed: speed,
|
|
79
|
-
timestamp: timestamp
|
|
30
|
+
timestamp: timestamp
|
|
80
31
|
)
|
|
81
|
-
|
|
32
|
+
|
|
82
33
|
return clLocation
|
|
83
34
|
}
|
|
84
35
|
}
|
|
85
36
|
|
|
86
|
-
class WorkoutsModule
|
|
37
|
+
class WorkoutsModule: HybridWorkoutsModuleSpec {
|
|
38
|
+
func startWatchAppWithWorkoutConfiguration(workoutConfiguration: WorkoutConfiguration) throws -> Promise<Bool> {
|
|
39
|
+
let configuration = parseWorkoutConfiguration(workoutConfiguration)
|
|
40
|
+
|
|
41
|
+
return Promise.async {
|
|
42
|
+
try await withCheckedThrowingContinuation { continuation in
|
|
43
|
+
store.startWatchApp(with: configuration) { success, error in
|
|
44
|
+
if let error {
|
|
45
|
+
continuation.resume(throwing: RuntimeError.error(withMessage: error.localizedDescription))
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
continuation.resume(returning: success)
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
87
54
|
func queryWorkoutSamples(options: WorkoutQueryOptions) throws -> Promise<[HybridWorkoutProxySpec]> {
|
|
88
55
|
let predicate = try createPredicateForWorkout(filter: options.filter)
|
|
89
|
-
|
|
56
|
+
|
|
90
57
|
let limit = getQueryLimit(options.limit)
|
|
91
|
-
|
|
58
|
+
|
|
92
59
|
return Promise.async {
|
|
93
60
|
let energyUnit = try await getUnitToUse(unitOverride: options.energyUnit, quantityType: HKQuantityType(.activeEnergyBurned))
|
|
94
|
-
|
|
61
|
+
|
|
95
62
|
let distanceUnit = try await getUnitToUse(unitOverride: options.distanceUnit, quantityType: HKQuantityType(.distanceWalkingRunning))
|
|
96
|
-
|
|
63
|
+
|
|
97
64
|
return try await withCheckedThrowingContinuation { continuation in
|
|
98
65
|
let q = HKSampleQuery(
|
|
99
66
|
sampleType: .workoutType(),
|
|
@@ -104,11 +71,11 @@ class WorkoutsModule : HybridWorkoutsModuleSpec {
|
|
|
104
71
|
if let error = error {
|
|
105
72
|
return continuation.resume(throwing: error)
|
|
106
73
|
}
|
|
107
|
-
|
|
74
|
+
|
|
108
75
|
guard let samples = samples else {
|
|
109
76
|
return continuation.resume(throwing: RuntimeError.error(withMessage: "Empty response"))
|
|
110
77
|
}
|
|
111
|
-
|
|
78
|
+
|
|
112
79
|
let workoutProxies = samples.compactMap { s in
|
|
113
80
|
if let workout = s as? HKWorkout {
|
|
114
81
|
return WorkoutProxy.init(
|
|
@@ -119,15 +86,15 @@ class WorkoutsModule : HybridWorkoutsModuleSpec {
|
|
|
119
86
|
}
|
|
120
87
|
return nil
|
|
121
88
|
}
|
|
122
|
-
|
|
89
|
+
|
|
123
90
|
return continuation.resume(returning: workoutProxies)
|
|
124
91
|
}
|
|
125
|
-
|
|
92
|
+
|
|
126
93
|
store.execute(q)
|
|
127
94
|
}
|
|
128
95
|
}
|
|
129
96
|
}
|
|
130
|
-
|
|
97
|
+
|
|
131
98
|
func saveWorkoutSample(
|
|
132
99
|
workoutActivityType: WorkoutActivityType,
|
|
133
100
|
quantities: [QuantitySampleForSaving],
|
|
@@ -136,18 +103,18 @@ class WorkoutsModule : HybridWorkoutsModuleSpec {
|
|
|
136
103
|
totals: WorkoutTotals,
|
|
137
104
|
metadata: AnyMapHolder
|
|
138
105
|
) throws -> Promise<String> {
|
|
139
|
-
|
|
106
|
+
|
|
140
107
|
let type = try initializeWorkoutActivityType(UInt(workoutActivityType.rawValue))
|
|
141
|
-
|
|
108
|
+
|
|
142
109
|
// if start and end both exist, ensure that start date is before end date
|
|
143
110
|
if let startDate = startDate as Date?, let endDate = endDate as Date? {
|
|
144
111
|
if startDate > endDate {
|
|
145
112
|
throw RuntimeError.error(withMessage: "endDate must not be less than startDate")
|
|
146
113
|
}
|
|
147
114
|
}
|
|
148
|
-
|
|
115
|
+
|
|
149
116
|
let metadataDeserialized = anyMapToDictionary(metadata)
|
|
150
|
-
|
|
117
|
+
|
|
151
118
|
var totalEnergyBurned: HKQuantity?
|
|
152
119
|
var totalDistance: HKQuantity?
|
|
153
120
|
var totalSwimmingStrokeCount: HKQuantity?
|
|
@@ -161,23 +128,23 @@ class WorkoutsModule : HybridWorkoutsModuleSpec {
|
|
|
161
128
|
let quantityEnd = quantity.endDate
|
|
162
129
|
let unit = HKUnit.init(from: unitStr)
|
|
163
130
|
let quantity = HKQuantity.init(unit: unit, doubleValue: quantityVal)
|
|
164
|
-
|
|
131
|
+
|
|
165
132
|
if quantity.is(compatibleWith: HKUnit.kilocalorie()) {
|
|
166
133
|
totalEnergyBurned = quantity
|
|
167
134
|
}
|
|
168
|
-
|
|
135
|
+
|
|
169
136
|
if quantity.is(compatibleWith: HKUnit.meter()) {
|
|
170
137
|
totalDistance = quantity
|
|
171
138
|
}
|
|
172
|
-
|
|
139
|
+
|
|
173
140
|
if type.identifier == HKWorkoutSortIdentifierTotalSwimmingStrokeCount {
|
|
174
141
|
totalSwimmingStrokeCount = quantity
|
|
175
142
|
}
|
|
176
|
-
|
|
143
|
+
|
|
177
144
|
if type.identifier == HKWorkoutSortIdentifierTotalFlightsClimbed {
|
|
178
145
|
totalFlightsClimbed = quantity
|
|
179
146
|
}
|
|
180
|
-
|
|
147
|
+
|
|
181
148
|
return HKQuantitySample.init(
|
|
182
149
|
type: type,
|
|
183
150
|
quantity: quantity,
|
|
@@ -186,21 +153,21 @@ class WorkoutsModule : HybridWorkoutsModuleSpec {
|
|
|
186
153
|
metadata: metadataDeserialized
|
|
187
154
|
)
|
|
188
155
|
}
|
|
189
|
-
|
|
156
|
+
|
|
190
157
|
// if totals are provided override samples
|
|
191
158
|
let rawTotalDistance = totals.distance ?? 0.0
|
|
192
159
|
let rawTotalEnergy = totals.energyBurned ?? 0.0
|
|
193
|
-
|
|
160
|
+
|
|
194
161
|
if rawTotalDistance != 0.0 {
|
|
195
162
|
totalDistance = HKQuantity(unit: .meter(), doubleValue: rawTotalDistance)
|
|
196
163
|
}
|
|
197
164
|
if rawTotalEnergy != 0.0 {
|
|
198
165
|
totalEnergyBurned = HKQuantity(unit: .kilocalorie(), doubleValue: rawTotalEnergy)
|
|
199
166
|
}
|
|
200
|
-
|
|
167
|
+
|
|
201
168
|
// creating workout
|
|
202
169
|
var workout: HKWorkout?
|
|
203
|
-
|
|
170
|
+
|
|
204
171
|
if totalSwimmingStrokeCount != nil {
|
|
205
172
|
workout = HKWorkout.init(
|
|
206
173
|
activityType: type,
|
|
@@ -230,7 +197,7 @@ class WorkoutsModule : HybridWorkoutsModuleSpec {
|
|
|
230
197
|
}
|
|
231
198
|
}
|
|
232
199
|
}
|
|
233
|
-
|
|
200
|
+
|
|
234
201
|
if workout == nil {
|
|
235
202
|
workout = HKWorkout.init(
|
|
236
203
|
activityType: type,
|
|
@@ -242,11 +209,11 @@ class WorkoutsModule : HybridWorkoutsModuleSpec {
|
|
|
242
209
|
metadata: metadataDeserialized
|
|
243
210
|
)
|
|
244
211
|
}
|
|
245
|
-
|
|
212
|
+
|
|
246
213
|
guard let workout = workout else {
|
|
247
214
|
throw RuntimeError.error(withMessage: "Could not create workout")
|
|
248
215
|
}
|
|
249
|
-
|
|
216
|
+
|
|
250
217
|
return Promise.async {
|
|
251
218
|
try await withCheckedThrowingContinuation { continuation in
|
|
252
219
|
// saving workout, samples and route
|
|
@@ -254,11 +221,11 @@ class WorkoutsModule : HybridWorkoutsModuleSpec {
|
|
|
254
221
|
if let error = error {
|
|
255
222
|
return continuation.resume(throwing: error)
|
|
256
223
|
}
|
|
257
|
-
|
|
224
|
+
|
|
258
225
|
if initializedSamples.isEmpty {
|
|
259
226
|
return continuation.resume(returning: workout.uuid.uuidString)
|
|
260
227
|
}
|
|
261
|
-
|
|
228
|
+
|
|
262
229
|
store.add(initializedSamples, to: workout) { (_, error: Error?) in
|
|
263
230
|
if let error = error {
|
|
264
231
|
return continuation.resume(throwing: error)
|
|
@@ -269,37 +236,19 @@ class WorkoutsModule : HybridWorkoutsModuleSpec {
|
|
|
269
236
|
}
|
|
270
237
|
}
|
|
271
238
|
}
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
func startWatchAppWithWorkoutConfiguration(workoutConfiguration: WorkoutConfiguration) -> Promise<Bool>
|
|
275
|
-
{
|
|
276
|
-
let configuration = parseWorkoutConfiguration(workoutConfiguration)
|
|
277
|
-
|
|
278
|
-
return Promise.async {
|
|
279
|
-
try await withCheckedThrowingContinuation { continuation in
|
|
280
|
-
store.startWatchApp(with: configuration) { success, error in
|
|
281
|
-
if let error {
|
|
282
|
-
continuation.resume(throwing: error)
|
|
283
|
-
} else {
|
|
284
|
-
continuation.resume(returning: success)
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
|
|
239
|
+
|
|
291
240
|
func queryWorkoutSamplesWithAnchor(options: WorkoutQueryOptionsWithAnchor) throws -> Promise<QueryWorkoutSamplesWithAnchorResponse> {
|
|
292
241
|
let predicate = try createPredicateForWorkout(filter: options.filter)
|
|
293
|
-
|
|
242
|
+
|
|
294
243
|
let limit = getQueryLimit(options.limit)
|
|
295
|
-
|
|
244
|
+
|
|
296
245
|
let actualAnchor = try deserializeHKQueryAnchor(base64String: options.anchor)
|
|
297
|
-
|
|
246
|
+
|
|
298
247
|
return Promise.async {
|
|
299
248
|
let energyUnit = try await getUnitToUse(unitOverride: options.energyUnit, quantityType: HKQuantityType(.activeEnergyBurned))
|
|
300
|
-
|
|
249
|
+
|
|
301
250
|
let distanceUnit = try await getUnitToUse(unitOverride: options.energyUnit, quantityType: HKQuantityType(.distanceWalkingRunning))
|
|
302
|
-
|
|
251
|
+
|
|
303
252
|
return try await withCheckedThrowingContinuation { continuation in
|
|
304
253
|
let q = HKAnchoredObjectQuery(
|
|
305
254
|
type: .workoutType(),
|
|
@@ -317,7 +266,7 @@ class WorkoutsModule : HybridWorkoutsModuleSpec {
|
|
|
317
266
|
if let error = error {
|
|
318
267
|
return continuation.resume(throwing: error)
|
|
319
268
|
}
|
|
320
|
-
|
|
269
|
+
|
|
321
270
|
guard let samples = s, let newAnchor = newAnchor else {
|
|
322
271
|
return continuation.resume(
|
|
323
272
|
throwing: RuntimeError.error(
|
|
@@ -325,7 +274,7 @@ class WorkoutsModule : HybridWorkoutsModuleSpec {
|
|
|
325
274
|
)
|
|
326
275
|
)
|
|
327
276
|
}
|
|
328
|
-
|
|
277
|
+
|
|
329
278
|
let workoutProxies = samples.compactMap { s in
|
|
330
279
|
if let workout = s as? HKWorkout {
|
|
331
280
|
return WorkoutProxy.init(
|
|
@@ -336,20 +285,20 @@ class WorkoutsModule : HybridWorkoutsModuleSpec {
|
|
|
336
285
|
}
|
|
337
286
|
return nil
|
|
338
287
|
}
|
|
339
|
-
|
|
288
|
+
|
|
340
289
|
let deletedSamples = deletedSamples?.map({ sample in
|
|
341
290
|
return serializeDeletedSample(sample: sample)
|
|
342
291
|
}) ?? []
|
|
343
|
-
|
|
292
|
+
|
|
344
293
|
let returnValue = QueryWorkoutSamplesWithAnchorResponse(
|
|
345
294
|
workouts: workoutProxies,
|
|
346
295
|
deletedSamples: deletedSamples,
|
|
347
296
|
newAnchor: serializeAnchor(anchor: newAnchor)!
|
|
348
297
|
)
|
|
349
|
-
|
|
298
|
+
|
|
350
299
|
return continuation.resume(returning: returnValue)
|
|
351
300
|
}
|
|
352
|
-
|
|
301
|
+
|
|
353
302
|
store.execute(q)
|
|
354
303
|
}
|
|
355
304
|
}
|
|
@@ -9,5 +9,8 @@ export interface WorkoutsModule extends HybridObject<{
|
|
|
9
9
|
saveWorkoutSample(workoutActivityType: WorkoutActivityType, quantities: readonly QuantitySampleForSaving[], startDate: Date, endDate: Date, totals: WorkoutTotals, metadata: AnyMap): Promise<string>;
|
|
10
10
|
queryWorkoutSamplesWithAnchor(options: WorkoutQueryOptionsWithAnchor): Promise<QueryWorkoutSamplesWithAnchorResponse>;
|
|
11
11
|
queryWorkoutSamples(options: WorkoutQueryOptions): Promise<WorkoutProxy[]>;
|
|
12
|
+
/**
|
|
13
|
+
* @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648358-startwatchapp Apple Docs }
|
|
14
|
+
*/
|
|
12
15
|
startWatchAppWithWorkoutConfiguration(workoutConfiguration: WorkoutConfiguration): Promise<boolean>;
|
|
13
16
|
}
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
#include "HybridSourceProxySpecSwift.hpp"
|
|
18
18
|
#include "HybridStateOfMindModuleSpecSwift.hpp"
|
|
19
19
|
#include "HybridWorkoutProxySpecSwift.hpp"
|
|
20
|
-
#include "HybridWorkoutSessionModuleSpecSwift.hpp"
|
|
21
20
|
#include "HybridWorkoutsModuleSpecSwift.hpp"
|
|
22
21
|
#include "ReactNativeHealthkit-Swift-Cxx-Umbrella.hpp"
|
|
23
22
|
|
|
@@ -367,54 +366,14 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
367
366
|
};
|
|
368
367
|
}
|
|
369
368
|
|
|
370
|
-
// pragma MARK: std::function<void(const std::string& /*
|
|
369
|
+
// pragma MARK: std::function<void(const std::string& /* result */)>
|
|
371
370
|
Func_void_std__string create_Func_void_std__string(void* _Nonnull swiftClosureWrapper) {
|
|
372
371
|
auto swiftClosure = ReactNativeHealthkit::Func_void_std__string::fromUnsafe(swiftClosureWrapper);
|
|
373
|
-
return [swiftClosure = std::move(swiftClosure)](const std::string&
|
|
374
|
-
swiftClosure.call(
|
|
375
|
-
};
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
// pragma MARK: std::function<void(WorkoutSessionState /* toState */, WorkoutSessionState /* fromState */, std::chrono::system_clock::time_point /* date */)>
|
|
379
|
-
Func_void_WorkoutSessionState_WorkoutSessionState_std__chrono__system_clock__time_point create_Func_void_WorkoutSessionState_WorkoutSessionState_std__chrono__system_clock__time_point(void* _Nonnull swiftClosureWrapper) {
|
|
380
|
-
auto swiftClosure = ReactNativeHealthkit::Func_void_WorkoutSessionState_WorkoutSessionState_std__chrono__system_clock__time_point::fromUnsafe(swiftClosureWrapper);
|
|
381
|
-
return [swiftClosure = std::move(swiftClosure)](WorkoutSessionState toState, WorkoutSessionState fromState, std::chrono::system_clock::time_point date) mutable -> void {
|
|
382
|
-
swiftClosure.call(static_cast<int>(toState), static_cast<int>(fromState), date);
|
|
383
|
-
};
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
// pragma MARK: std::function<void(const std::vector<RemoteSessionSharableData>& /* data */)>
|
|
387
|
-
Func_void_std__vector_RemoteSessionSharableData_ create_Func_void_std__vector_RemoteSessionSharableData_(void* _Nonnull swiftClosureWrapper) {
|
|
388
|
-
auto swiftClosure = ReactNativeHealthkit::Func_void_std__vector_RemoteSessionSharableData_::fromUnsafe(swiftClosureWrapper);
|
|
389
|
-
return [swiftClosure = std::move(swiftClosure)](const std::vector<RemoteSessionSharableData>& data) mutable -> void {
|
|
390
|
-
swiftClosure.call(data);
|
|
391
|
-
};
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
// pragma MARK: std::function<void(WorkoutEventType /* type */)>
|
|
395
|
-
Func_void_WorkoutEventType create_Func_void_WorkoutEventType(void* _Nonnull swiftClosureWrapper) {
|
|
396
|
-
auto swiftClosure = ReactNativeHealthkit::Func_void_WorkoutEventType::fromUnsafe(swiftClosureWrapper);
|
|
397
|
-
return [swiftClosure = std::move(swiftClosure)](WorkoutEventType type) mutable -> void {
|
|
398
|
-
swiftClosure.call(static_cast<int>(type));
|
|
372
|
+
return [swiftClosure = std::move(swiftClosure)](const std::string& result) mutable -> void {
|
|
373
|
+
swiftClosure.call(result);
|
|
399
374
|
};
|
|
400
375
|
}
|
|
401
376
|
|
|
402
|
-
// pragma MARK: std::shared_ptr<margelo::nitro::healthkit::HybridWorkoutSessionModuleSpec>
|
|
403
|
-
std::shared_ptr<margelo::nitro::healthkit::HybridWorkoutSessionModuleSpec> create_std__shared_ptr_margelo__nitro__healthkit__HybridWorkoutSessionModuleSpec_(void* _Nonnull swiftUnsafePointer) {
|
|
404
|
-
ReactNativeHealthkit::HybridWorkoutSessionModuleSpec_cxx swiftPart = ReactNativeHealthkit::HybridWorkoutSessionModuleSpec_cxx::fromUnsafe(swiftUnsafePointer);
|
|
405
|
-
return std::make_shared<margelo::nitro::healthkit::HybridWorkoutSessionModuleSpecSwift>(swiftPart);
|
|
406
|
-
}
|
|
407
|
-
void* _Nonnull get_std__shared_ptr_margelo__nitro__healthkit__HybridWorkoutSessionModuleSpec_(std__shared_ptr_margelo__nitro__healthkit__HybridWorkoutSessionModuleSpec_ cppType) {
|
|
408
|
-
std::shared_ptr<margelo::nitro::healthkit::HybridWorkoutSessionModuleSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::healthkit::HybridWorkoutSessionModuleSpecSwift>(cppType);
|
|
409
|
-
#ifdef NITRO_DEBUG
|
|
410
|
-
if (swiftWrapper == nullptr) [[unlikely]] {
|
|
411
|
-
throw std::runtime_error("Class \"HybridWorkoutSessionModuleSpec\" is not implemented in Swift!");
|
|
412
|
-
}
|
|
413
|
-
#endif
|
|
414
|
-
ReactNativeHealthkit::HybridWorkoutSessionModuleSpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
|
|
415
|
-
return swiftPart.toUnsafe();
|
|
416
|
-
}
|
|
417
|
-
|
|
418
377
|
// pragma MARK: std::function<void(const QueryWorkoutSamplesWithAnchorResponse& /* result */)>
|
|
419
378
|
Func_void_QueryWorkoutSamplesWithAnchorResponse create_Func_void_QueryWorkoutSamplesWithAnchorResponse(void* _Nonnull swiftClosureWrapper) {
|
|
420
379
|
auto swiftClosure = ReactNativeHealthkit::Func_void_QueryWorkoutSamplesWithAnchorResponse::fromUnsafe(swiftClosureWrapper);
|
|
@@ -66,8 +66,6 @@ namespace margelo::nitro::healthkit { class HybridSourceProxySpec; }
|
|
|
66
66
|
namespace margelo::nitro::healthkit { class HybridStateOfMindModuleSpec; }
|
|
67
67
|
// Forward declaration of `HybridWorkoutProxySpec` to properly resolve imports.
|
|
68
68
|
namespace margelo::nitro::healthkit { class HybridWorkoutProxySpec; }
|
|
69
|
-
// Forward declaration of `HybridWorkoutSessionModuleSpec` to properly resolve imports.
|
|
70
|
-
namespace margelo::nitro::healthkit { class HybridWorkoutSessionModuleSpec; }
|
|
71
69
|
// Forward declaration of `HybridWorkoutsModuleSpec` to properly resolve imports.
|
|
72
70
|
namespace margelo::nitro::healthkit { class HybridWorkoutsModuleSpec; }
|
|
73
71
|
// Forward declaration of `IdentifierWithUnit` to properly resolve imports.
|
|
@@ -112,8 +110,6 @@ namespace margelo::nitro::healthkit { struct QueryOptionsWithSortOrder; }
|
|
|
112
110
|
namespace margelo::nitro::healthkit { struct QueryStatisticsResponse; }
|
|
113
111
|
// Forward declaration of `QueryWorkoutSamplesWithAnchorResponse` to properly resolve imports.
|
|
114
112
|
namespace margelo::nitro::healthkit { struct QueryWorkoutSamplesWithAnchorResponse; }
|
|
115
|
-
// Forward declaration of `RemoteSessionSharableData` to properly resolve imports.
|
|
116
|
-
namespace margelo::nitro::healthkit { struct RemoteSessionSharableData; }
|
|
117
113
|
// Forward declaration of `SampleTypeIdentifierWriteable` to properly resolve imports.
|
|
118
114
|
namespace margelo::nitro::healthkit { enum class SampleTypeIdentifierWriteable; }
|
|
119
115
|
// Forward declaration of `SampleTypeIdentifier` to properly resolve imports.
|
|
@@ -160,8 +156,6 @@ namespace margelo::nitro::healthkit { struct WorkoutRoute; }
|
|
|
160
156
|
namespace margelo::nitro::healthkit { struct WorkoutSample; }
|
|
161
157
|
// Forward declaration of `WorkoutSessionLocationType` to properly resolve imports.
|
|
162
158
|
namespace margelo::nitro::healthkit { enum class WorkoutSessionLocationType; }
|
|
163
|
-
// Forward declaration of `WorkoutSessionState` to properly resolve imports.
|
|
164
|
-
namespace margelo::nitro::healthkit { enum class WorkoutSessionState; }
|
|
165
159
|
|
|
166
160
|
// Forward declarations of Swift defined types
|
|
167
161
|
// Forward declaration of `HybridCategoryTypeModuleSpec_cxx` to properly resolve imports.
|
|
@@ -182,8 +176,6 @@ namespace ReactNativeHealthkit { class HybridSourceProxySpec_cxx; }
|
|
|
182
176
|
namespace ReactNativeHealthkit { class HybridStateOfMindModuleSpec_cxx; }
|
|
183
177
|
// Forward declaration of `HybridWorkoutProxySpec_cxx` to properly resolve imports.
|
|
184
178
|
namespace ReactNativeHealthkit { class HybridWorkoutProxySpec_cxx; }
|
|
185
|
-
// Forward declaration of `HybridWorkoutSessionModuleSpec_cxx` to properly resolve imports.
|
|
186
|
-
namespace ReactNativeHealthkit { class HybridWorkoutSessionModuleSpec_cxx; }
|
|
187
179
|
// Forward declaration of `HybridWorkoutsModuleSpec_cxx` to properly resolve imports.
|
|
188
180
|
namespace ReactNativeHealthkit { class HybridWorkoutsModuleSpec_cxx; }
|
|
189
181
|
|
|
@@ -216,7 +208,6 @@ namespace ReactNativeHealthkit { class HybridWorkoutsModuleSpec_cxx; }
|
|
|
216
208
|
#include "HybridSourceProxySpec.hpp"
|
|
217
209
|
#include "HybridStateOfMindModuleSpec.hpp"
|
|
218
210
|
#include "HybridWorkoutProxySpec.hpp"
|
|
219
|
-
#include "HybridWorkoutSessionModuleSpec.hpp"
|
|
220
211
|
#include "HybridWorkoutsModuleSpec.hpp"
|
|
221
212
|
#include "IdentifierWithUnit.hpp"
|
|
222
213
|
#include "LocationForSaving.hpp"
|
|
@@ -239,7 +230,6 @@ namespace ReactNativeHealthkit { class HybridWorkoutsModuleSpec_cxx; }
|
|
|
239
230
|
#include "QueryOptionsWithSortOrderAndUnit.hpp"
|
|
240
231
|
#include "QueryStatisticsResponse.hpp"
|
|
241
232
|
#include "QueryWorkoutSamplesWithAnchorResponse.hpp"
|
|
242
|
-
#include "RemoteSessionSharableData.hpp"
|
|
243
233
|
#include "SampleTypeIdentifier.hpp"
|
|
244
234
|
#include "SampleTypeIdentifierWriteable.hpp"
|
|
245
235
|
#include "Source.hpp"
|
|
@@ -263,7 +253,6 @@ namespace ReactNativeHealthkit { class HybridWorkoutsModuleSpec_cxx; }
|
|
|
263
253
|
#include "WorkoutRouteLocation.hpp"
|
|
264
254
|
#include "WorkoutSample.hpp"
|
|
265
255
|
#include "WorkoutSessionLocationType.hpp"
|
|
266
|
-
#include "WorkoutSessionState.hpp"
|
|
267
256
|
#include <NitroModules/AnyMap.hpp>
|
|
268
257
|
#include <NitroModules/Promise.hpp>
|
|
269
258
|
#include <NitroModules/PromiseHolder.hpp>
|
|
@@ -2147,138 +2136,40 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
2147
2136
|
return Result<std::shared_ptr<Promise<std::vector<WorkoutRoute>>>>::withError(error);
|
|
2148
2137
|
}
|
|
2149
2138
|
|
|
2150
|
-
// pragma MARK: std::
|
|
2139
|
+
// pragma MARK: std::shared_ptr<Promise<std::string>>
|
|
2151
2140
|
/**
|
|
2152
|
-
* Specialized version of `std::
|
|
2141
|
+
* Specialized version of `std::shared_ptr<Promise<std::string>>`.
|
|
2153
2142
|
*/
|
|
2154
|
-
using
|
|
2155
|
-
inline std::
|
|
2156
|
-
return std::
|
|
2143
|
+
using std__shared_ptr_Promise_std__string__ = std::shared_ptr<Promise<std::string>>;
|
|
2144
|
+
inline std::shared_ptr<Promise<std::string>> create_std__shared_ptr_Promise_std__string__() {
|
|
2145
|
+
return Promise<std::string>::create();
|
|
2146
|
+
}
|
|
2147
|
+
inline PromiseHolder<std::string> wrap_std__shared_ptr_Promise_std__string__(std::shared_ptr<Promise<std::string>> promise) {
|
|
2148
|
+
return PromiseHolder<std::string>(std::move(promise));
|
|
2157
2149
|
}
|
|
2158
2150
|
|
|
2159
|
-
// pragma MARK: std::function<void(const std::string& /*
|
|
2151
|
+
// pragma MARK: std::function<void(const std::string& /* result */)>
|
|
2160
2152
|
/**
|
|
2161
2153
|
* Specialized version of `std::function<void(const std::string&)>`.
|
|
2162
2154
|
*/
|
|
2163
|
-
using Func_void_std__string = std::function<void(const std::string& /*
|
|
2155
|
+
using Func_void_std__string = std::function<void(const std::string& /* result */)>;
|
|
2164
2156
|
/**
|
|
2165
|
-
* Wrapper class for a `std::function<void(const std::string& / *
|
|
2157
|
+
* Wrapper class for a `std::function<void(const std::string& / * result * /)>`, this can be used from Swift.
|
|
2166
2158
|
*/
|
|
2167
2159
|
class Func_void_std__string_Wrapper final {
|
|
2168
2160
|
public:
|
|
2169
|
-
explicit Func_void_std__string_Wrapper(std::function<void(const std::string& /*
|
|
2170
|
-
inline void call(std::string
|
|
2171
|
-
_function->operator()(
|
|
2161
|
+
explicit Func_void_std__string_Wrapper(std::function<void(const std::string& /* result */)>&& func): _function(std::make_shared<std::function<void(const std::string& /* result */)>>(std::move(func))) {}
|
|
2162
|
+
inline void call(std::string result) const {
|
|
2163
|
+
_function->operator()(result);
|
|
2172
2164
|
}
|
|
2173
2165
|
private:
|
|
2174
|
-
std::shared_ptr<std::function<void(const std::string& /*
|
|
2166
|
+
std::shared_ptr<std::function<void(const std::string& /* result */)>> _function;
|
|
2175
2167
|
};
|
|
2176
2168
|
Func_void_std__string create_Func_void_std__string(void* _Nonnull swiftClosureWrapper);
|
|
2177
2169
|
inline Func_void_std__string_Wrapper wrap_Func_void_std__string(Func_void_std__string value) {
|
|
2178
2170
|
return Func_void_std__string_Wrapper(std::move(value));
|
|
2179
2171
|
}
|
|
2180
2172
|
|
|
2181
|
-
// pragma MARK: std::function<void(WorkoutSessionState /* toState */, WorkoutSessionState /* fromState */, std::chrono::system_clock::time_point /* date */)>
|
|
2182
|
-
/**
|
|
2183
|
-
* Specialized version of `std::function<void(WorkoutSessionState, WorkoutSessionState, std::chrono::system_clock::time_point)>`.
|
|
2184
|
-
*/
|
|
2185
|
-
using Func_void_WorkoutSessionState_WorkoutSessionState_std__chrono__system_clock__time_point = std::function<void(WorkoutSessionState /* toState */, WorkoutSessionState /* fromState */, std::chrono::system_clock::time_point /* date */)>;
|
|
2186
|
-
/**
|
|
2187
|
-
* Wrapper class for a `std::function<void(WorkoutSessionState / * toState * /, WorkoutSessionState / * fromState * /, std::chrono::system_clock::time_point / * date * /)>`, this can be used from Swift.
|
|
2188
|
-
*/
|
|
2189
|
-
class Func_void_WorkoutSessionState_WorkoutSessionState_std__chrono__system_clock__time_point_Wrapper final {
|
|
2190
|
-
public:
|
|
2191
|
-
explicit Func_void_WorkoutSessionState_WorkoutSessionState_std__chrono__system_clock__time_point_Wrapper(std::function<void(WorkoutSessionState /* toState */, WorkoutSessionState /* fromState */, std::chrono::system_clock::time_point /* date */)>&& func): _function(std::make_shared<std::function<void(WorkoutSessionState /* toState */, WorkoutSessionState /* fromState */, std::chrono::system_clock::time_point /* date */)>>(std::move(func))) {}
|
|
2192
|
-
inline void call(int toState, int fromState, std::chrono::system_clock::time_point date) const {
|
|
2193
|
-
_function->operator()(static_cast<WorkoutSessionState>(toState), static_cast<WorkoutSessionState>(fromState), date);
|
|
2194
|
-
}
|
|
2195
|
-
private:
|
|
2196
|
-
std::shared_ptr<std::function<void(WorkoutSessionState /* toState */, WorkoutSessionState /* fromState */, std::chrono::system_clock::time_point /* date */)>> _function;
|
|
2197
|
-
};
|
|
2198
|
-
Func_void_WorkoutSessionState_WorkoutSessionState_std__chrono__system_clock__time_point create_Func_void_WorkoutSessionState_WorkoutSessionState_std__chrono__system_clock__time_point(void* _Nonnull swiftClosureWrapper);
|
|
2199
|
-
inline Func_void_WorkoutSessionState_WorkoutSessionState_std__chrono__system_clock__time_point_Wrapper wrap_Func_void_WorkoutSessionState_WorkoutSessionState_std__chrono__system_clock__time_point(Func_void_WorkoutSessionState_WorkoutSessionState_std__chrono__system_clock__time_point value) {
|
|
2200
|
-
return Func_void_WorkoutSessionState_WorkoutSessionState_std__chrono__system_clock__time_point_Wrapper(std::move(value));
|
|
2201
|
-
}
|
|
2202
|
-
|
|
2203
|
-
// pragma MARK: std::vector<RemoteSessionSharableData>
|
|
2204
|
-
/**
|
|
2205
|
-
* Specialized version of `std::vector<RemoteSessionSharableData>`.
|
|
2206
|
-
*/
|
|
2207
|
-
using std__vector_RemoteSessionSharableData_ = std::vector<RemoteSessionSharableData>;
|
|
2208
|
-
inline std::vector<RemoteSessionSharableData> create_std__vector_RemoteSessionSharableData_(size_t size) {
|
|
2209
|
-
std::vector<RemoteSessionSharableData> vector;
|
|
2210
|
-
vector.reserve(size);
|
|
2211
|
-
return vector;
|
|
2212
|
-
}
|
|
2213
|
-
|
|
2214
|
-
// pragma MARK: std::function<void(const std::vector<RemoteSessionSharableData>& /* data */)>
|
|
2215
|
-
/**
|
|
2216
|
-
* Specialized version of `std::function<void(const std::vector<RemoteSessionSharableData>&)>`.
|
|
2217
|
-
*/
|
|
2218
|
-
using Func_void_std__vector_RemoteSessionSharableData_ = std::function<void(const std::vector<RemoteSessionSharableData>& /* data */)>;
|
|
2219
|
-
/**
|
|
2220
|
-
* Wrapper class for a `std::function<void(const std::vector<RemoteSessionSharableData>& / * data * /)>`, this can be used from Swift.
|
|
2221
|
-
*/
|
|
2222
|
-
class Func_void_std__vector_RemoteSessionSharableData__Wrapper final {
|
|
2223
|
-
public:
|
|
2224
|
-
explicit Func_void_std__vector_RemoteSessionSharableData__Wrapper(std::function<void(const std::vector<RemoteSessionSharableData>& /* data */)>&& func): _function(std::make_shared<std::function<void(const std::vector<RemoteSessionSharableData>& /* data */)>>(std::move(func))) {}
|
|
2225
|
-
inline void call(std::vector<RemoteSessionSharableData> data) const {
|
|
2226
|
-
_function->operator()(data);
|
|
2227
|
-
}
|
|
2228
|
-
private:
|
|
2229
|
-
std::shared_ptr<std::function<void(const std::vector<RemoteSessionSharableData>& /* data */)>> _function;
|
|
2230
|
-
};
|
|
2231
|
-
Func_void_std__vector_RemoteSessionSharableData_ create_Func_void_std__vector_RemoteSessionSharableData_(void* _Nonnull swiftClosureWrapper);
|
|
2232
|
-
inline Func_void_std__vector_RemoteSessionSharableData__Wrapper wrap_Func_void_std__vector_RemoteSessionSharableData_(Func_void_std__vector_RemoteSessionSharableData_ value) {
|
|
2233
|
-
return Func_void_std__vector_RemoteSessionSharableData__Wrapper(std::move(value));
|
|
2234
|
-
}
|
|
2235
|
-
|
|
2236
|
-
// pragma MARK: std::function<void(WorkoutEventType /* type */)>
|
|
2237
|
-
/**
|
|
2238
|
-
* Specialized version of `std::function<void(WorkoutEventType)>`.
|
|
2239
|
-
*/
|
|
2240
|
-
using Func_void_WorkoutEventType = std::function<void(WorkoutEventType /* type */)>;
|
|
2241
|
-
/**
|
|
2242
|
-
* Wrapper class for a `std::function<void(WorkoutEventType / * type * /)>`, this can be used from Swift.
|
|
2243
|
-
*/
|
|
2244
|
-
class Func_void_WorkoutEventType_Wrapper final {
|
|
2245
|
-
public:
|
|
2246
|
-
explicit Func_void_WorkoutEventType_Wrapper(std::function<void(WorkoutEventType /* type */)>&& func): _function(std::make_shared<std::function<void(WorkoutEventType /* type */)>>(std::move(func))) {}
|
|
2247
|
-
inline void call(int type) const {
|
|
2248
|
-
_function->operator()(static_cast<WorkoutEventType>(type));
|
|
2249
|
-
}
|
|
2250
|
-
private:
|
|
2251
|
-
std::shared_ptr<std::function<void(WorkoutEventType /* type */)>> _function;
|
|
2252
|
-
};
|
|
2253
|
-
Func_void_WorkoutEventType create_Func_void_WorkoutEventType(void* _Nonnull swiftClosureWrapper);
|
|
2254
|
-
inline Func_void_WorkoutEventType_Wrapper wrap_Func_void_WorkoutEventType(Func_void_WorkoutEventType value) {
|
|
2255
|
-
return Func_void_WorkoutEventType_Wrapper(std::move(value));
|
|
2256
|
-
}
|
|
2257
|
-
|
|
2258
|
-
// pragma MARK: std::shared_ptr<margelo::nitro::healthkit::HybridWorkoutSessionModuleSpec>
|
|
2259
|
-
/**
|
|
2260
|
-
* Specialized version of `std::shared_ptr<margelo::nitro::healthkit::HybridWorkoutSessionModuleSpec>`.
|
|
2261
|
-
*/
|
|
2262
|
-
using std__shared_ptr_margelo__nitro__healthkit__HybridWorkoutSessionModuleSpec_ = std::shared_ptr<margelo::nitro::healthkit::HybridWorkoutSessionModuleSpec>;
|
|
2263
|
-
std::shared_ptr<margelo::nitro::healthkit::HybridWorkoutSessionModuleSpec> create_std__shared_ptr_margelo__nitro__healthkit__HybridWorkoutSessionModuleSpec_(void* _Nonnull swiftUnsafePointer);
|
|
2264
|
-
void* _Nonnull get_std__shared_ptr_margelo__nitro__healthkit__HybridWorkoutSessionModuleSpec_(std__shared_ptr_margelo__nitro__healthkit__HybridWorkoutSessionModuleSpec_ cppType);
|
|
2265
|
-
|
|
2266
|
-
// pragma MARK: std::weak_ptr<margelo::nitro::healthkit::HybridWorkoutSessionModuleSpec>
|
|
2267
|
-
using std__weak_ptr_margelo__nitro__healthkit__HybridWorkoutSessionModuleSpec_ = std::weak_ptr<margelo::nitro::healthkit::HybridWorkoutSessionModuleSpec>;
|
|
2268
|
-
inline std__weak_ptr_margelo__nitro__healthkit__HybridWorkoutSessionModuleSpec_ weakify_std__shared_ptr_margelo__nitro__healthkit__HybridWorkoutSessionModuleSpec_(const std::shared_ptr<margelo::nitro::healthkit::HybridWorkoutSessionModuleSpec>& strong) { return strong; }
|
|
2269
|
-
|
|
2270
|
-
// pragma MARK: std::shared_ptr<Promise<std::string>>
|
|
2271
|
-
/**
|
|
2272
|
-
* Specialized version of `std::shared_ptr<Promise<std::string>>`.
|
|
2273
|
-
*/
|
|
2274
|
-
using std__shared_ptr_Promise_std__string__ = std::shared_ptr<Promise<std::string>>;
|
|
2275
|
-
inline std::shared_ptr<Promise<std::string>> create_std__shared_ptr_Promise_std__string__() {
|
|
2276
|
-
return Promise<std::string>::create();
|
|
2277
|
-
}
|
|
2278
|
-
inline PromiseHolder<std::string> wrap_std__shared_ptr_Promise_std__string__(std::shared_ptr<Promise<std::string>> promise) {
|
|
2279
|
-
return PromiseHolder<std::string>(std::move(promise));
|
|
2280
|
-
}
|
|
2281
|
-
|
|
2282
2173
|
// pragma MARK: std::vector<QuantitySampleForSaving>
|
|
2283
2174
|
/**
|
|
2284
2175
|
* Specialized version of `std::vector<QuantitySampleForSaving>`.
|
|
@@ -2519,6 +2410,15 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
2519
2410
|
return Func_void_std__vector_std__shared_ptr_margelo__nitro__healthkit__HybridWorkoutProxySpec___Wrapper(std::move(value));
|
|
2520
2411
|
}
|
|
2521
2412
|
|
|
2413
|
+
// pragma MARK: std::optional<WorkoutSessionLocationType>
|
|
2414
|
+
/**
|
|
2415
|
+
* Specialized version of `std::optional<WorkoutSessionLocationType>`.
|
|
2416
|
+
*/
|
|
2417
|
+
using std__optional_WorkoutSessionLocationType_ = std::optional<WorkoutSessionLocationType>;
|
|
2418
|
+
inline std::optional<WorkoutSessionLocationType> create_std__optional_WorkoutSessionLocationType_(const WorkoutSessionLocationType& value) {
|
|
2419
|
+
return std::optional<WorkoutSessionLocationType>(value);
|
|
2420
|
+
}
|
|
2421
|
+
|
|
2522
2422
|
// pragma MARK: std::shared_ptr<margelo::nitro::healthkit::HybridWorkoutsModuleSpec>
|
|
2523
2423
|
/**
|
|
2524
2424
|
* Specialized version of `std::shared_ptr<margelo::nitro::healthkit::HybridWorkoutsModuleSpec>`.
|