@kingstinct/react-native-healthkit 11.1.0 → 11.1.2
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/Constants.swift +1 -0
- package/ios/CoreModule.swift +16 -5
- package/ios/ElectrocardiogramModule.swift +3 -1
- package/ios/Helpers.swift +6 -0
- package/lib/commonjs/healthkit.js +1 -2
- package/lib/commonjs/types/Constants.js +7 -2
- package/lib/module/healthkit.js +1 -2
- package/lib/module/types/Constants.js +6 -1
- package/lib/typescript/types/Constants.d.ts +6 -1
- package/lib/typescript/types/Shared.d.ts +2 -2
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.cpp +54 -54
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.hpp +85 -78
- package/nitrogen/generated/ios/c++/HybridCategoryTypeModuleSpecSwift.hpp +1 -1
- package/nitrogen/generated/ios/c++/HybridElectrocardiogramModuleSpecSwift.hpp +1 -1
- package/nitrogen/generated/ios/c++/HybridHeartbeatSeriesModuleSpecSwift.hpp +1 -1
- package/nitrogen/generated/ios/c++/HybridQuantityTypeModuleSpecSwift.hpp +2 -2
- package/nitrogen/generated/ios/c++/HybridWorkoutProxySpecSwift.hpp +1 -2
- package/nitrogen/generated/ios/c++/HybridWorkoutsModuleSpecSwift.hpp +4 -4
- package/nitrogen/generated/ios/swift/CategorySample.swift +2 -16
- package/nitrogen/generated/ios/swift/CategorySampleForSaving.swift +1 -8
- package/nitrogen/generated/ios/swift/ElectrocardiogramSample.swift +2 -16
- package/nitrogen/generated/ios/swift/Func_void_std__optional_QueryStatisticsResponse_.swift +1 -8
- package/nitrogen/generated/ios/swift/Func_void_std__optional_WorkoutPlan_.swift +1 -8
- package/nitrogen/generated/ios/swift/HeartbeatSeriesSample.swift +2 -16
- package/nitrogen/generated/ios/swift/HybridCategoryTypeModuleSpec_cxx.swift +1 -8
- package/nitrogen/generated/ios/swift/HybridCoreModuleSpec_cxx.swift +33 -5
- package/nitrogen/generated/ios/swift/HybridElectrocardiogramModuleSpec_cxx.swift +1 -8
- package/nitrogen/generated/ios/swift/HybridHeartbeatSeriesModuleSpec_cxx.swift +1 -8
- package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec_cxx.swift +11 -24
- package/nitrogen/generated/ios/swift/HybridStateOfMindModuleSpec_cxx.swift +10 -9
- package/nitrogen/generated/ios/swift/ObjectTypeIdentifier.swift +4 -0
- package/nitrogen/generated/ios/swift/QuantitySample.swift +2 -16
- package/nitrogen/generated/ios/swift/QuantitySampleForSaving.swift +1 -8
- package/nitrogen/generated/ios/swift/QueryStatisticsResponse.swift +7 -56
- package/nitrogen/generated/ios/swift/SampleTypeIdentifier.swift +4 -0
- package/nitrogen/generated/ios/swift/StateOfMindSample.swift +23 -45
- package/nitrogen/generated/ios/swift/WorkoutSample.swift +2 -16
- package/nitrogen/generated/shared/c++/CategorySample.hpp +8 -0
- package/nitrogen/generated/shared/c++/CategorySampleForSaving.hpp +8 -0
- package/nitrogen/generated/shared/c++/CategorySamplesWithAnchorResponse.hpp +8 -0
- package/nitrogen/generated/shared/c++/CorrelationSample.hpp +8 -0
- package/nitrogen/generated/shared/c++/DeletedSample.hpp +8 -0
- package/nitrogen/generated/shared/c++/Device.hpp +8 -0
- package/nitrogen/generated/shared/c++/ECGQueryOptionsWithAnchor.hpp +8 -0
- package/nitrogen/generated/shared/c++/ECGQueryOptionsWithSortOrder.hpp +8 -0
- package/nitrogen/generated/shared/c++/ElectrocardiogramSample.hpp +8 -0
- package/nitrogen/generated/shared/c++/ElectrocardiogramSamplesWithAnchorResponse.hpp +8 -0
- package/nitrogen/generated/shared/c++/ElectrocardiogramVoltage.hpp +8 -0
- package/nitrogen/generated/shared/c++/FilterForSamplesAnd.hpp +8 -0
- package/nitrogen/generated/shared/c++/FilterForSamplesOr.hpp +8 -0
- package/nitrogen/generated/shared/c++/Heartbeat.hpp +8 -0
- package/nitrogen/generated/shared/c++/HeartbeatSeriesSample.hpp +8 -0
- package/nitrogen/generated/shared/c++/HeartbeatSeriesSamplesWithAnchorResponse.hpp +8 -0
- package/nitrogen/generated/shared/c++/IdentifierWithUnit.hpp +8 -0
- package/nitrogen/generated/shared/c++/IntervalComponents.hpp +8 -0
- package/nitrogen/generated/shared/c++/LocationForSaving.hpp +8 -0
- package/nitrogen/generated/shared/c++/ObjectTypeIdentifier.hpp +5 -1
- package/nitrogen/generated/shared/c++/OnChangeCallbackArgs.hpp +8 -0
- package/nitrogen/generated/shared/c++/PredicateForWorkoutsAnd.hpp +8 -0
- package/nitrogen/generated/shared/c++/PredicateForWorkoutsOr.hpp +8 -0
- package/nitrogen/generated/shared/c++/PredicateFromWorkout.hpp +8 -0
- package/nitrogen/generated/shared/c++/PredicateWithMetadataKey.hpp +8 -0
- package/nitrogen/generated/shared/c++/PredicateWithStartAndEnd.hpp +8 -0
- package/nitrogen/generated/shared/c++/PredicateWithUUID.hpp +8 -0
- package/nitrogen/generated/shared/c++/PredicateWithUUIDs.hpp +8 -0
- package/nitrogen/generated/shared/c++/Quantity.hpp +8 -0
- package/nitrogen/generated/shared/c++/QuantityDateInterval.hpp +8 -0
- package/nitrogen/generated/shared/c++/QuantitySample.hpp +8 -0
- package/nitrogen/generated/shared/c++/QuantitySampleForSaving.hpp +8 -0
- package/nitrogen/generated/shared/c++/QuantitySamplesWithAnchorResponse.hpp +8 -0
- package/nitrogen/generated/shared/c++/QueryOptionsWithAnchor.hpp +8 -0
- package/nitrogen/generated/shared/c++/QueryOptionsWithAnchorAndUnit.hpp +8 -0
- package/nitrogen/generated/shared/c++/QueryOptionsWithSortOrder.hpp +8 -0
- package/nitrogen/generated/shared/c++/QueryOptionsWithSortOrderAndUnit.hpp +8 -0
- package/nitrogen/generated/shared/c++/QueryStatisticsResponse.hpp +8 -0
- package/nitrogen/generated/shared/c++/QueryWorkoutSamplesWithAnchorResponse.hpp +8 -0
- package/nitrogen/generated/shared/c++/SampleTypeIdentifier.hpp +4 -0
- package/nitrogen/generated/shared/c++/Source.hpp +8 -0
- package/nitrogen/generated/shared/c++/SourceRevision.hpp +8 -0
- package/nitrogen/generated/shared/c++/StateOfMindSample.hpp +8 -0
- package/nitrogen/generated/shared/c++/StatisticsQueryOptions.hpp +8 -0
- package/nitrogen/generated/shared/c++/WorkoutActivity.hpp +8 -0
- package/nitrogen/generated/shared/c++/WorkoutActivityTypePredicate.hpp +8 -0
- package/nitrogen/generated/shared/c++/WorkoutConfiguration.hpp +8 -0
- package/nitrogen/generated/shared/c++/WorkoutDurationPredicate.hpp +8 -0
- package/nitrogen/generated/shared/c++/WorkoutEvent.hpp +8 -0
- package/nitrogen/generated/shared/c++/WorkoutPlan.hpp +8 -0
- package/nitrogen/generated/shared/c++/WorkoutQueryOptions.hpp +8 -0
- package/nitrogen/generated/shared/c++/WorkoutQueryOptionsWithAnchor.hpp +8 -0
- package/nitrogen/generated/shared/c++/WorkoutRoute.hpp +8 -0
- package/nitrogen/generated/shared/c++/WorkoutRouteLocation.hpp +8 -0
- package/nitrogen/generated/shared/c++/WorkoutSample.hpp +8 -0
- package/nitrogen/generated/shared/c++/WorkoutTotals.hpp +8 -0
- package/package.json +5 -5
- package/src/healthkit.ts +2 -4
- package/src/types/Constants.ts +8 -1
- package/src/types/Shared.ts +2 -0
package/ios/Constants.swift
CHANGED
|
@@ -24,6 +24,7 @@ let HKWorkoutTypeIdentifier = "HKWorkoutTypeIdentifier"
|
|
|
24
24
|
let HKWorkoutRouteTypeIdentifier = "HKWorkoutRouteTypeIdentifier"
|
|
25
25
|
let HKDataTypeIdentifierHeartbeatSeries = "HKDataTypeIdentifierHeartbeatSeries"
|
|
26
26
|
let HKStateOfMindTypeIdentifier = "HKStateOfMindTypeIdentifier"
|
|
27
|
+
let HKElectrocardiogramType = "HKElectrocardiogramType"
|
|
27
28
|
|
|
28
29
|
let HKWorkoutActivityTypePropertyName = "activityType"
|
|
29
30
|
let HKWorkoutSessionLocationTypePropertyName = "locationType"
|
package/ios/CoreModule.swift
CHANGED
|
@@ -9,7 +9,12 @@ import NitroModules
|
|
|
9
9
|
|
|
10
10
|
var store = HKHealthStore.init()
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
// Thread-safe cache with concurrent read/exclusive write access
|
|
13
|
+
private let quantityTypeCacheQueue = DispatchQueue(
|
|
14
|
+
label: "com.kingstinct.healthkit.cache",
|
|
15
|
+
attributes: .concurrent
|
|
16
|
+
)
|
|
17
|
+
private var quantityTypeUnitCache = [HKQuantityType: HKUnit]()
|
|
13
18
|
|
|
14
19
|
func getUnitToUse(unitOverride: String?, quantityType: HKQuantityType) async throws -> HKUnit {
|
|
15
20
|
if let unitOverride = unitOverride {
|
|
@@ -32,8 +37,11 @@ func getUnitToUse(unitOverride: String?, quantityType: HKQuantityType) async thr
|
|
|
32
37
|
func getPreferredUnitsInternal(quantityTypes: [HKQuantityType], forceUpdate: Bool? = false) async throws -> [HKQuantityType: HKUnit] {
|
|
33
38
|
|
|
34
39
|
if forceUpdate != true {
|
|
35
|
-
|
|
36
|
-
|
|
40
|
+
// Thread-safe read: concurrent reads are allowed
|
|
41
|
+
let itemsInCache = quantityTypeCacheQueue.sync {
|
|
42
|
+
return quantityTypeUnitCache.filter {
|
|
43
|
+
quantityTypes.contains($0.key)
|
|
44
|
+
}
|
|
37
45
|
}
|
|
38
46
|
if itemsInCache.count == quantityTypes.count {
|
|
39
47
|
return itemsInCache
|
|
@@ -47,8 +55,11 @@ func getPreferredUnitsInternal(quantityTypes: [HKQuantityType], forceUpdate: Boo
|
|
|
47
55
|
return continuation.resume(throwing: error)
|
|
48
56
|
}
|
|
49
57
|
|
|
50
|
-
|
|
51
|
-
|
|
58
|
+
// Thread-safe write: barrier ensures exclusive access
|
|
59
|
+
quantityTypeCacheQueue.sync(flags: .barrier) {
|
|
60
|
+
typePerUnits.forEach { (type: HKQuantityType, unit: HKUnit) in
|
|
61
|
+
quantityTypeUnitCache.updateValue(unit, forKey: type)
|
|
62
|
+
}
|
|
52
63
|
}
|
|
53
64
|
|
|
54
65
|
return continuation.resume(returning: typePerUnits)
|
|
@@ -146,7 +146,7 @@ class ElectrocardiogramModule: HybridElectrocardiogramModuleSpec {
|
|
|
146
146
|
symptomsStatus: serializeSymptomsStatus(sample.symptomsStatus),
|
|
147
147
|
averageHeartRateBpm: avgHR,
|
|
148
148
|
samplingFrequencyHz: freqHz,
|
|
149
|
-
numberOfVoltageMeasurements: sample.numberOfVoltageMeasurements,
|
|
149
|
+
numberOfVoltageMeasurements: Double(sample.numberOfVoltageMeasurements),
|
|
150
150
|
algorithmVersion: algorithmVersion,
|
|
151
151
|
voltages: voltages,
|
|
152
152
|
metadata: serializeMetadata(sample.metadata),
|
|
@@ -178,6 +178,8 @@ class ElectrocardiogramModule: HybridElectrocardiogramModuleSpec {
|
|
|
178
178
|
|
|
179
179
|
case .done:
|
|
180
180
|
continuation.resume(returning: all)
|
|
181
|
+
@unknown default:
|
|
182
|
+
continuation.resume(throwing: RuntimeError.error(withMessage: "HKElectrocardiogramQuery received unknown result type"))
|
|
181
183
|
}
|
|
182
184
|
}
|
|
183
185
|
store.execute(q)
|
package/ios/Helpers.swift
CHANGED
|
@@ -413,6 +413,12 @@ private func sampleTypeFromStringNullable(typeIdentifier: String) throws -> HKSa
|
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
415
|
|
|
416
|
+
if #available(iOS 14, *) {
|
|
417
|
+
if typeIdentifier == HKElectrocardiogramType {
|
|
418
|
+
return HKSampleType.electrocardiogramType()
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
|
|
416
422
|
#if compiler(>=6)
|
|
417
423
|
if #available(iOS 18, *) {
|
|
418
424
|
if typeIdentifier == HKStateOfMindTypeIdentifier {
|
|
@@ -26,9 +26,8 @@ const Characteristics_1 = require("./types/Characteristics");
|
|
|
26
26
|
__exportStar(require("./types"), exports);
|
|
27
27
|
const notAvailableError = `[@kingstinct/react-native-healthkit] Platform "${react_native_1.Platform.OS}" not supported. HealthKit is only available on iOS.`;
|
|
28
28
|
let hasWarned = false;
|
|
29
|
-
// @ts-ignore
|
|
30
29
|
function UnavailableFnFromModule(_fn, defaultValue) {
|
|
31
|
-
// @ts-
|
|
30
|
+
// @ts-expect-error
|
|
32
31
|
return () => {
|
|
33
32
|
if (react_native_1.Platform.OS !== 'ios' && !hasWarned) {
|
|
34
33
|
console.warn(notAvailableError);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HeartbeatSeriesTypeIdentifier = exports.StateOfMindTypeIdentifier = exports.WorkoutRouteTypeIdentifier = exports.WorkoutTypeIdentifier = void 0;
|
|
3
|
+
exports.ElectrocardiogramTypeIdentifier = exports.HeartbeatSeriesTypeIdentifier = exports.StateOfMindTypeIdentifier = exports.WorkoutRouteTypeIdentifier = exports.WorkoutTypeIdentifier = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Represents a workout type identifier.
|
|
6
6
|
* @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier}
|
|
@@ -17,7 +17,12 @@ exports.WorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier';
|
|
|
17
17
|
*/
|
|
18
18
|
exports.StateOfMindTypeIdentifier = 'HKStateOfMindTypeIdentifier';
|
|
19
19
|
/**
|
|
20
|
-
* Represents a series sample containing heartbeat data
|
|
20
|
+
* Represents a series sample containing heartbeat data.
|
|
21
21
|
* @see {@link https://developer.apple.com/documentation/healthkit/HKDataTypeIdentifierHeartbeatSeries Apple Docs DataTypeIdentifierHeartbeatSeries}
|
|
22
22
|
*/
|
|
23
23
|
exports.HeartbeatSeriesTypeIdentifier = 'HKDataTypeIdentifierHeartbeatSeries';
|
|
24
|
+
/**
|
|
25
|
+
* A type that identifies samples containing electrocardiogram data.
|
|
26
|
+
* @see {@link https://developer.apple.com/documentation/healthkit/hkelectrocardiogramtype Apple Docs HKElectrocardiogramType}
|
|
27
|
+
*/
|
|
28
|
+
exports.ElectrocardiogramTypeIdentifier = 'HKElectrocardiogramType';
|
package/lib/module/healthkit.js
CHANGED
|
@@ -4,9 +4,8 @@ import { BiologicalSex, BloodType, FitzpatrickSkinType, WheelchairUse, } from '.
|
|
|
4
4
|
export * from './types';
|
|
5
5
|
const notAvailableError = `[@kingstinct/react-native-healthkit] Platform "${Platform.OS}" not supported. HealthKit is only available on iOS.`;
|
|
6
6
|
let hasWarned = false;
|
|
7
|
-
// @ts-ignore
|
|
8
7
|
function UnavailableFnFromModule(_fn, defaultValue) {
|
|
9
|
-
// @ts-
|
|
8
|
+
// @ts-expect-error
|
|
10
9
|
return () => {
|
|
11
10
|
if (Platform.OS !== 'ios' && !hasWarned) {
|
|
12
11
|
console.warn(notAvailableError);
|
|
@@ -14,7 +14,12 @@ export const WorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier';
|
|
|
14
14
|
*/
|
|
15
15
|
export const StateOfMindTypeIdentifier = 'HKStateOfMindTypeIdentifier';
|
|
16
16
|
/**
|
|
17
|
-
* Represents a series sample containing heartbeat data
|
|
17
|
+
* Represents a series sample containing heartbeat data.
|
|
18
18
|
* @see {@link https://developer.apple.com/documentation/healthkit/HKDataTypeIdentifierHeartbeatSeries Apple Docs DataTypeIdentifierHeartbeatSeries}
|
|
19
19
|
*/
|
|
20
20
|
export const HeartbeatSeriesTypeIdentifier = 'HKDataTypeIdentifierHeartbeatSeries';
|
|
21
|
+
/**
|
|
22
|
+
* A type that identifies samples containing electrocardiogram data.
|
|
23
|
+
* @see {@link https://developer.apple.com/documentation/healthkit/hkelectrocardiogramtype Apple Docs HKElectrocardiogramType}
|
|
24
|
+
*/
|
|
25
|
+
export const ElectrocardiogramTypeIdentifier = 'HKElectrocardiogramType';
|
|
@@ -14,7 +14,12 @@ export declare const WorkoutRouteTypeIdentifier: "HKWorkoutRouteTypeIdentifier";
|
|
|
14
14
|
*/
|
|
15
15
|
export declare const StateOfMindTypeIdentifier: "HKStateOfMindTypeIdentifier";
|
|
16
16
|
/**
|
|
17
|
-
* Represents a series sample containing heartbeat data
|
|
17
|
+
* Represents a series sample containing heartbeat data.
|
|
18
18
|
* @see {@link https://developer.apple.com/documentation/healthkit/HKDataTypeIdentifierHeartbeatSeries Apple Docs DataTypeIdentifierHeartbeatSeries}
|
|
19
19
|
*/
|
|
20
20
|
export declare const HeartbeatSeriesTypeIdentifier: "HKDataTypeIdentifierHeartbeatSeries";
|
|
21
|
+
/**
|
|
22
|
+
* A type that identifies samples containing electrocardiogram data.
|
|
23
|
+
* @see {@link https://developer.apple.com/documentation/healthkit/hkelectrocardiogramtype Apple Docs HKElectrocardiogramType}
|
|
24
|
+
*/
|
|
25
|
+
export declare const ElectrocardiogramTypeIdentifier: "HKElectrocardiogramType";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AnyMap } from 'react-native-nitro-modules';
|
|
2
2
|
import type { CategoryTypeIdentifier, CategoryTypeIdentifierWriteable } from './CategoryTypeIdentifier';
|
|
3
3
|
import type { CharacteristicTypeIdentifier } from './Characteristics';
|
|
4
|
-
import type { HeartbeatSeriesTypeIdentifier, StateOfMindTypeIdentifier, WorkoutRouteTypeIdentifier, WorkoutTypeIdentifier } from './Constants';
|
|
4
|
+
import type { ElectrocardiogramTypeIdentifier, HeartbeatSeriesTypeIdentifier, StateOfMindTypeIdentifier, WorkoutRouteTypeIdentifier, WorkoutTypeIdentifier } from './Constants';
|
|
5
5
|
import type { CorrelationTypeIdentifier } from './CorrelationType';
|
|
6
6
|
import type { QuantityTypeIdentifier, QuantityTypeIdentifierWriteable } from './QuantityTypeIdentifier';
|
|
7
7
|
export interface GenericMetadata {
|
|
@@ -25,7 +25,7 @@ export interface DeletedSample {
|
|
|
25
25
|
readonly metadata?: AnyMap;
|
|
26
26
|
}
|
|
27
27
|
export type ObjectTypeIdentifier = CharacteristicTypeIdentifier | SampleTypeIdentifier | typeof ActivitySummaryTypeIdentifier;
|
|
28
|
-
export type SampleTypeIdentifier = CategoryTypeIdentifier | CorrelationTypeIdentifier | QuantityTypeIdentifier | typeof StateOfMindTypeIdentifier | typeof AudiogramTypeIdentifier | typeof HeartbeatSeriesTypeIdentifier | typeof WorkoutRouteTypeIdentifier | typeof WorkoutTypeIdentifier;
|
|
28
|
+
export type SampleTypeIdentifier = CategoryTypeIdentifier | CorrelationTypeIdentifier | QuantityTypeIdentifier | typeof StateOfMindTypeIdentifier | typeof AudiogramTypeIdentifier | typeof HeartbeatSeriesTypeIdentifier | typeof WorkoutRouteTypeIdentifier | typeof WorkoutTypeIdentifier | typeof ElectrocardiogramTypeIdentifier;
|
|
29
29
|
export type SampleTypeIdentifierWriteable = CategoryTypeIdentifierWriteable | CorrelationTypeIdentifier | QuantityTypeIdentifierWriteable | typeof StateOfMindTypeIdentifier | typeof AudiogramTypeIdentifier | typeof HeartbeatSeriesTypeIdentifier | typeof WorkoutRouteTypeIdentifier | typeof WorkoutTypeIdentifier;
|
|
30
30
|
/**
|
|
31
31
|
* Represents a type that identifies activity summary objects.
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
namespace margelo::nitro::healthkit::bridge::swift {
|
|
25
25
|
|
|
26
26
|
// pragma MARK: std::function<void(bool /* result */)>
|
|
27
|
-
Func_void_bool create_Func_void_bool(void*
|
|
27
|
+
Func_void_bool create_Func_void_bool(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
28
28
|
auto swiftClosure = ReactNativeHealthkit::Func_void_bool::fromUnsafe(swiftClosureWrapper);
|
|
29
29
|
return [swiftClosure = std::move(swiftClosure)](bool result) mutable -> void {
|
|
30
30
|
swiftClosure.call(result);
|
|
@@ -32,7 +32,7 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
// pragma MARK: std::function<void(const std::exception_ptr& /* error */)>
|
|
35
|
-
Func_void_std__exception_ptr create_Func_void_std__exception_ptr(void*
|
|
35
|
+
Func_void_std__exception_ptr create_Func_void_std__exception_ptr(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
36
36
|
auto swiftClosure = ReactNativeHealthkit::Func_void_std__exception_ptr::fromUnsafe(swiftClosureWrapper);
|
|
37
37
|
return [swiftClosure = std::move(swiftClosure)](const std::exception_ptr& error) mutable -> void {
|
|
38
38
|
swiftClosure.call(error);
|
|
@@ -40,11 +40,11 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
// pragma MARK: std::shared_ptr<HybridSourceProxySpec>
|
|
43
|
-
std::shared_ptr<HybridSourceProxySpec> create_std__shared_ptr_HybridSourceProxySpec_(void*
|
|
43
|
+
std::shared_ptr<HybridSourceProxySpec> create_std__shared_ptr_HybridSourceProxySpec_(void* NON_NULL swiftUnsafePointer) noexcept {
|
|
44
44
|
ReactNativeHealthkit::HybridSourceProxySpec_cxx swiftPart = ReactNativeHealthkit::HybridSourceProxySpec_cxx::fromUnsafe(swiftUnsafePointer);
|
|
45
45
|
return std::make_shared<margelo::nitro::healthkit::HybridSourceProxySpecSwift>(swiftPart);
|
|
46
46
|
}
|
|
47
|
-
void*
|
|
47
|
+
void* NON_NULL get_std__shared_ptr_HybridSourceProxySpec_(std__shared_ptr_HybridSourceProxySpec_ cppType) {
|
|
48
48
|
std::shared_ptr<margelo::nitro::healthkit::HybridSourceProxySpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::healthkit::HybridSourceProxySpecSwift>(cppType);
|
|
49
49
|
#ifdef NITRO_DEBUG
|
|
50
50
|
if (swiftWrapper == nullptr) [[unlikely]] {
|
|
@@ -56,7 +56,7 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
// pragma MARK: std::function<void(const std::vector<CategorySample>& /* result */)>
|
|
59
|
-
Func_void_std__vector_CategorySample_ create_Func_void_std__vector_CategorySample_(void*
|
|
59
|
+
Func_void_std__vector_CategorySample_ create_Func_void_std__vector_CategorySample_(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
60
60
|
auto swiftClosure = ReactNativeHealthkit::Func_void_std__vector_CategorySample_::fromUnsafe(swiftClosureWrapper);
|
|
61
61
|
return [swiftClosure = std::move(swiftClosure)](const std::vector<CategorySample>& result) mutable -> void {
|
|
62
62
|
swiftClosure.call(result);
|
|
@@ -64,11 +64,11 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
// pragma MARK: std::shared_ptr<HybridWorkoutProxySpec>
|
|
67
|
-
std::shared_ptr<HybridWorkoutProxySpec> create_std__shared_ptr_HybridWorkoutProxySpec_(void*
|
|
67
|
+
std::shared_ptr<HybridWorkoutProxySpec> create_std__shared_ptr_HybridWorkoutProxySpec_(void* NON_NULL swiftUnsafePointer) noexcept {
|
|
68
68
|
ReactNativeHealthkit::HybridWorkoutProxySpec_cxx swiftPart = ReactNativeHealthkit::HybridWorkoutProxySpec_cxx::fromUnsafe(swiftUnsafePointer);
|
|
69
69
|
return std::make_shared<margelo::nitro::healthkit::HybridWorkoutProxySpecSwift>(swiftPart);
|
|
70
70
|
}
|
|
71
|
-
void*
|
|
71
|
+
void* NON_NULL get_std__shared_ptr_HybridWorkoutProxySpec_(std__shared_ptr_HybridWorkoutProxySpec_ cppType) {
|
|
72
72
|
std::shared_ptr<margelo::nitro::healthkit::HybridWorkoutProxySpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::healthkit::HybridWorkoutProxySpecSwift>(cppType);
|
|
73
73
|
#ifdef NITRO_DEBUG
|
|
74
74
|
if (swiftWrapper == nullptr) [[unlikely]] {
|
|
@@ -80,7 +80,7 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
// pragma MARK: std::function<void(const CategorySamplesWithAnchorResponse& /* result */)>
|
|
83
|
-
Func_void_CategorySamplesWithAnchorResponse create_Func_void_CategorySamplesWithAnchorResponse(void*
|
|
83
|
+
Func_void_CategorySamplesWithAnchorResponse create_Func_void_CategorySamplesWithAnchorResponse(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
84
84
|
auto swiftClosure = ReactNativeHealthkit::Func_void_CategorySamplesWithAnchorResponse::fromUnsafe(swiftClosureWrapper);
|
|
85
85
|
return [swiftClosure = std::move(swiftClosure)](const CategorySamplesWithAnchorResponse& result) mutable -> void {
|
|
86
86
|
swiftClosure.call(result);
|
|
@@ -88,11 +88,11 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
// pragma MARK: std::shared_ptr<HybridCategoryTypeModuleSpec>
|
|
91
|
-
std::shared_ptr<HybridCategoryTypeModuleSpec> create_std__shared_ptr_HybridCategoryTypeModuleSpec_(void*
|
|
91
|
+
std::shared_ptr<HybridCategoryTypeModuleSpec> create_std__shared_ptr_HybridCategoryTypeModuleSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
|
|
92
92
|
ReactNativeHealthkit::HybridCategoryTypeModuleSpec_cxx swiftPart = ReactNativeHealthkit::HybridCategoryTypeModuleSpec_cxx::fromUnsafe(swiftUnsafePointer);
|
|
93
93
|
return std::make_shared<margelo::nitro::healthkit::HybridCategoryTypeModuleSpecSwift>(swiftPart);
|
|
94
94
|
}
|
|
95
|
-
void*
|
|
95
|
+
void* NON_NULL get_std__shared_ptr_HybridCategoryTypeModuleSpec_(std__shared_ptr_HybridCategoryTypeModuleSpec_ cppType) {
|
|
96
96
|
std::shared_ptr<margelo::nitro::healthkit::HybridCategoryTypeModuleSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::healthkit::HybridCategoryTypeModuleSpecSwift>(cppType);
|
|
97
97
|
#ifdef NITRO_DEBUG
|
|
98
98
|
if (swiftWrapper == nullptr) [[unlikely]] {
|
|
@@ -104,7 +104,7 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
// pragma MARK: std::function<void(BloodType /* result */)>
|
|
107
|
-
Func_void_BloodType create_Func_void_BloodType(void*
|
|
107
|
+
Func_void_BloodType create_Func_void_BloodType(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
108
108
|
auto swiftClosure = ReactNativeHealthkit::Func_void_BloodType::fromUnsafe(swiftClosureWrapper);
|
|
109
109
|
return [swiftClosure = std::move(swiftClosure)](BloodType result) mutable -> void {
|
|
110
110
|
swiftClosure.call(static_cast<int>(result));
|
|
@@ -112,7 +112,7 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
// pragma MARK: std::function<void(std::optional<std::chrono::system_clock::time_point> /* result */)>
|
|
115
|
-
Func_void_std__optional_std__chrono__system_clock__time_point_ create_Func_void_std__optional_std__chrono__system_clock__time_point_(void*
|
|
115
|
+
Func_void_std__optional_std__chrono__system_clock__time_point_ create_Func_void_std__optional_std__chrono__system_clock__time_point_(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
116
116
|
auto swiftClosure = ReactNativeHealthkit::Func_void_std__optional_std__chrono__system_clock__time_point_::fromUnsafe(swiftClosureWrapper);
|
|
117
117
|
return [swiftClosure = std::move(swiftClosure)](std::optional<std::chrono::system_clock::time_point> result) mutable -> void {
|
|
118
118
|
swiftClosure.call(result);
|
|
@@ -120,7 +120,7 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
// pragma MARK: std::function<void(BiologicalSex /* result */)>
|
|
123
|
-
Func_void_BiologicalSex create_Func_void_BiologicalSex(void*
|
|
123
|
+
Func_void_BiologicalSex create_Func_void_BiologicalSex(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
124
124
|
auto swiftClosure = ReactNativeHealthkit::Func_void_BiologicalSex::fromUnsafe(swiftClosureWrapper);
|
|
125
125
|
return [swiftClosure = std::move(swiftClosure)](BiologicalSex result) mutable -> void {
|
|
126
126
|
swiftClosure.call(static_cast<int>(result));
|
|
@@ -128,7 +128,7 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
// pragma MARK: std::function<void(FitzpatrickSkinType /* result */)>
|
|
131
|
-
Func_void_FitzpatrickSkinType create_Func_void_FitzpatrickSkinType(void*
|
|
131
|
+
Func_void_FitzpatrickSkinType create_Func_void_FitzpatrickSkinType(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
132
132
|
auto swiftClosure = ReactNativeHealthkit::Func_void_FitzpatrickSkinType::fromUnsafe(swiftClosureWrapper);
|
|
133
133
|
return [swiftClosure = std::move(swiftClosure)](FitzpatrickSkinType result) mutable -> void {
|
|
134
134
|
swiftClosure.call(static_cast<int>(result));
|
|
@@ -136,7 +136,7 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
// pragma MARK: std::function<void(WheelchairUse /* result */)>
|
|
139
|
-
Func_void_WheelchairUse create_Func_void_WheelchairUse(void*
|
|
139
|
+
Func_void_WheelchairUse create_Func_void_WheelchairUse(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
140
140
|
auto swiftClosure = ReactNativeHealthkit::Func_void_WheelchairUse::fromUnsafe(swiftClosureWrapper);
|
|
141
141
|
return [swiftClosure = std::move(swiftClosure)](WheelchairUse result) mutable -> void {
|
|
142
142
|
swiftClosure.call(static_cast<int>(result));
|
|
@@ -144,11 +144,11 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
// pragma MARK: std::shared_ptr<HybridCharacteristicTypeModuleSpec>
|
|
147
|
-
std::shared_ptr<HybridCharacteristicTypeModuleSpec> create_std__shared_ptr_HybridCharacteristicTypeModuleSpec_(void*
|
|
147
|
+
std::shared_ptr<HybridCharacteristicTypeModuleSpec> create_std__shared_ptr_HybridCharacteristicTypeModuleSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
|
|
148
148
|
ReactNativeHealthkit::HybridCharacteristicTypeModuleSpec_cxx swiftPart = ReactNativeHealthkit::HybridCharacteristicTypeModuleSpec_cxx::fromUnsafe(swiftUnsafePointer);
|
|
149
149
|
return std::make_shared<margelo::nitro::healthkit::HybridCharacteristicTypeModuleSpecSwift>(swiftPart);
|
|
150
150
|
}
|
|
151
|
-
void*
|
|
151
|
+
void* NON_NULL get_std__shared_ptr_HybridCharacteristicTypeModuleSpec_(std__shared_ptr_HybridCharacteristicTypeModuleSpec_ cppType) {
|
|
152
152
|
std::shared_ptr<margelo::nitro::healthkit::HybridCharacteristicTypeModuleSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::healthkit::HybridCharacteristicTypeModuleSpecSwift>(cppType);
|
|
153
153
|
#ifdef NITRO_DEBUG
|
|
154
154
|
if (swiftWrapper == nullptr) [[unlikely]] {
|
|
@@ -160,7 +160,7 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
// pragma MARK: std::function<void(const std::vector<IdentifierWithUnit>& /* result */)>
|
|
163
|
-
Func_void_std__vector_IdentifierWithUnit_ create_Func_void_std__vector_IdentifierWithUnit_(void*
|
|
163
|
+
Func_void_std__vector_IdentifierWithUnit_ create_Func_void_std__vector_IdentifierWithUnit_(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
164
164
|
auto swiftClosure = ReactNativeHealthkit::Func_void_std__vector_IdentifierWithUnit_::fromUnsafe(swiftClosureWrapper);
|
|
165
165
|
return [swiftClosure = std::move(swiftClosure)](const std::vector<IdentifierWithUnit>& result) mutable -> void {
|
|
166
166
|
swiftClosure.call(result);
|
|
@@ -168,7 +168,7 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
// pragma MARK: std::function<void(const std::vector<std::shared_ptr<HybridSourceProxySpec>>& /* result */)>
|
|
171
|
-
Func_void_std__vector_std__shared_ptr_HybridSourceProxySpec__ create_Func_void_std__vector_std__shared_ptr_HybridSourceProxySpec__(void*
|
|
171
|
+
Func_void_std__vector_std__shared_ptr_HybridSourceProxySpec__ create_Func_void_std__vector_std__shared_ptr_HybridSourceProxySpec__(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
172
172
|
auto swiftClosure = ReactNativeHealthkit::Func_void_std__vector_std__shared_ptr_HybridSourceProxySpec__::fromUnsafe(swiftClosureWrapper);
|
|
173
173
|
return [swiftClosure = std::move(swiftClosure)](const std::vector<std::shared_ptr<HybridSourceProxySpec>>& result) mutable -> void {
|
|
174
174
|
swiftClosure.call(result);
|
|
@@ -176,7 +176,7 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
// pragma MARK: std::function<void(const OnChangeCallbackArgs& /* args */)>
|
|
179
|
-
Func_void_OnChangeCallbackArgs create_Func_void_OnChangeCallbackArgs(void*
|
|
179
|
+
Func_void_OnChangeCallbackArgs create_Func_void_OnChangeCallbackArgs(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
180
180
|
auto swiftClosure = ReactNativeHealthkit::Func_void_OnChangeCallbackArgs::fromUnsafe(swiftClosureWrapper);
|
|
181
181
|
return [swiftClosure = std::move(swiftClosure)](const OnChangeCallbackArgs& args) mutable -> void {
|
|
182
182
|
swiftClosure.call(args);
|
|
@@ -184,7 +184,7 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
184
184
|
}
|
|
185
185
|
|
|
186
186
|
// pragma MARK: std::function<void(double /* result */)>
|
|
187
|
-
Func_void_double create_Func_void_double(void*
|
|
187
|
+
Func_void_double create_Func_void_double(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
188
188
|
auto swiftClosure = ReactNativeHealthkit::Func_void_double::fromUnsafe(swiftClosureWrapper);
|
|
189
189
|
return [swiftClosure = std::move(swiftClosure)](double result) mutable -> void {
|
|
190
190
|
swiftClosure.call(result);
|
|
@@ -192,7 +192,7 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
// pragma MARK: std::function<void(AuthorizationRequestStatus /* result */)>
|
|
195
|
-
Func_void_AuthorizationRequestStatus create_Func_void_AuthorizationRequestStatus(void*
|
|
195
|
+
Func_void_AuthorizationRequestStatus create_Func_void_AuthorizationRequestStatus(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
196
196
|
auto swiftClosure = ReactNativeHealthkit::Func_void_AuthorizationRequestStatus::fromUnsafe(swiftClosureWrapper);
|
|
197
197
|
return [swiftClosure = std::move(swiftClosure)](AuthorizationRequestStatus result) mutable -> void {
|
|
198
198
|
swiftClosure.call(static_cast<int>(result));
|
|
@@ -200,7 +200,7 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
200
200
|
}
|
|
201
201
|
|
|
202
202
|
// pragma MARK: std::function<void(const std::unordered_map<std::string, bool>& /* result */)>
|
|
203
|
-
Func_void_std__unordered_map_std__string__bool_ create_Func_void_std__unordered_map_std__string__bool_(void*
|
|
203
|
+
Func_void_std__unordered_map_std__string__bool_ create_Func_void_std__unordered_map_std__string__bool_(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
204
204
|
auto swiftClosure = ReactNativeHealthkit::Func_void_std__unordered_map_std__string__bool_::fromUnsafe(swiftClosureWrapper);
|
|
205
205
|
return [swiftClosure = std::move(swiftClosure)](const std::unordered_map<std::string, bool>& result) mutable -> void {
|
|
206
206
|
swiftClosure.call(result);
|
|
@@ -208,11 +208,11 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
208
208
|
}
|
|
209
209
|
|
|
210
210
|
// pragma MARK: std::shared_ptr<HybridCoreModuleSpec>
|
|
211
|
-
std::shared_ptr<HybridCoreModuleSpec> create_std__shared_ptr_HybridCoreModuleSpec_(void*
|
|
211
|
+
std::shared_ptr<HybridCoreModuleSpec> create_std__shared_ptr_HybridCoreModuleSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
|
|
212
212
|
ReactNativeHealthkit::HybridCoreModuleSpec_cxx swiftPart = ReactNativeHealthkit::HybridCoreModuleSpec_cxx::fromUnsafe(swiftUnsafePointer);
|
|
213
213
|
return std::make_shared<margelo::nitro::healthkit::HybridCoreModuleSpecSwift>(swiftPart);
|
|
214
214
|
}
|
|
215
|
-
void*
|
|
215
|
+
void* NON_NULL get_std__shared_ptr_HybridCoreModuleSpec_(std__shared_ptr_HybridCoreModuleSpec_ cppType) {
|
|
216
216
|
std::shared_ptr<margelo::nitro::healthkit::HybridCoreModuleSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::healthkit::HybridCoreModuleSpecSwift>(cppType);
|
|
217
217
|
#ifdef NITRO_DEBUG
|
|
218
218
|
if (swiftWrapper == nullptr) [[unlikely]] {
|
|
@@ -224,7 +224,7 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
224
224
|
}
|
|
225
225
|
|
|
226
226
|
// pragma MARK: std::function<void(const std::vector<CorrelationSample>& /* result */)>
|
|
227
|
-
Func_void_std__vector_CorrelationSample_ create_Func_void_std__vector_CorrelationSample_(void*
|
|
227
|
+
Func_void_std__vector_CorrelationSample_ create_Func_void_std__vector_CorrelationSample_(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
228
228
|
auto swiftClosure = ReactNativeHealthkit::Func_void_std__vector_CorrelationSample_::fromUnsafe(swiftClosureWrapper);
|
|
229
229
|
return [swiftClosure = std::move(swiftClosure)](const std::vector<CorrelationSample>& result) mutable -> void {
|
|
230
230
|
swiftClosure.call(result);
|
|
@@ -232,11 +232,11 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
232
232
|
}
|
|
233
233
|
|
|
234
234
|
// pragma MARK: std::shared_ptr<HybridCorrelationTypeModuleSpec>
|
|
235
|
-
std::shared_ptr<HybridCorrelationTypeModuleSpec> create_std__shared_ptr_HybridCorrelationTypeModuleSpec_(void*
|
|
235
|
+
std::shared_ptr<HybridCorrelationTypeModuleSpec> create_std__shared_ptr_HybridCorrelationTypeModuleSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
|
|
236
236
|
ReactNativeHealthkit::HybridCorrelationTypeModuleSpec_cxx swiftPart = ReactNativeHealthkit::HybridCorrelationTypeModuleSpec_cxx::fromUnsafe(swiftUnsafePointer);
|
|
237
237
|
return std::make_shared<margelo::nitro::healthkit::HybridCorrelationTypeModuleSpecSwift>(swiftPart);
|
|
238
238
|
}
|
|
239
|
-
void*
|
|
239
|
+
void* NON_NULL get_std__shared_ptr_HybridCorrelationTypeModuleSpec_(std__shared_ptr_HybridCorrelationTypeModuleSpec_ cppType) {
|
|
240
240
|
std::shared_ptr<margelo::nitro::healthkit::HybridCorrelationTypeModuleSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::healthkit::HybridCorrelationTypeModuleSpecSwift>(cppType);
|
|
241
241
|
#ifdef NITRO_DEBUG
|
|
242
242
|
if (swiftWrapper == nullptr) [[unlikely]] {
|
|
@@ -248,7 +248,7 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
248
248
|
}
|
|
249
249
|
|
|
250
250
|
// pragma MARK: std::function<void(const std::vector<ElectrocardiogramSample>& /* result */)>
|
|
251
|
-
Func_void_std__vector_ElectrocardiogramSample_ create_Func_void_std__vector_ElectrocardiogramSample_(void*
|
|
251
|
+
Func_void_std__vector_ElectrocardiogramSample_ create_Func_void_std__vector_ElectrocardiogramSample_(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
252
252
|
auto swiftClosure = ReactNativeHealthkit::Func_void_std__vector_ElectrocardiogramSample_::fromUnsafe(swiftClosureWrapper);
|
|
253
253
|
return [swiftClosure = std::move(swiftClosure)](const std::vector<ElectrocardiogramSample>& result) mutable -> void {
|
|
254
254
|
swiftClosure.call(result);
|
|
@@ -256,7 +256,7 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
256
256
|
}
|
|
257
257
|
|
|
258
258
|
// pragma MARK: std::function<void(const ElectrocardiogramSamplesWithAnchorResponse& /* result */)>
|
|
259
|
-
Func_void_ElectrocardiogramSamplesWithAnchorResponse create_Func_void_ElectrocardiogramSamplesWithAnchorResponse(void*
|
|
259
|
+
Func_void_ElectrocardiogramSamplesWithAnchorResponse create_Func_void_ElectrocardiogramSamplesWithAnchorResponse(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
260
260
|
auto swiftClosure = ReactNativeHealthkit::Func_void_ElectrocardiogramSamplesWithAnchorResponse::fromUnsafe(swiftClosureWrapper);
|
|
261
261
|
return [swiftClosure = std::move(swiftClosure)](const ElectrocardiogramSamplesWithAnchorResponse& result) mutable -> void {
|
|
262
262
|
swiftClosure.call(result);
|
|
@@ -264,11 +264,11 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
264
264
|
}
|
|
265
265
|
|
|
266
266
|
// pragma MARK: std::shared_ptr<HybridElectrocardiogramModuleSpec>
|
|
267
|
-
std::shared_ptr<HybridElectrocardiogramModuleSpec> create_std__shared_ptr_HybridElectrocardiogramModuleSpec_(void*
|
|
267
|
+
std::shared_ptr<HybridElectrocardiogramModuleSpec> create_std__shared_ptr_HybridElectrocardiogramModuleSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
|
|
268
268
|
ReactNativeHealthkit::HybridElectrocardiogramModuleSpec_cxx swiftPart = ReactNativeHealthkit::HybridElectrocardiogramModuleSpec_cxx::fromUnsafe(swiftUnsafePointer);
|
|
269
269
|
return std::make_shared<margelo::nitro::healthkit::HybridElectrocardiogramModuleSpecSwift>(swiftPart);
|
|
270
270
|
}
|
|
271
|
-
void*
|
|
271
|
+
void* NON_NULL get_std__shared_ptr_HybridElectrocardiogramModuleSpec_(std__shared_ptr_HybridElectrocardiogramModuleSpec_ cppType) {
|
|
272
272
|
std::shared_ptr<margelo::nitro::healthkit::HybridElectrocardiogramModuleSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::healthkit::HybridElectrocardiogramModuleSpecSwift>(cppType);
|
|
273
273
|
#ifdef NITRO_DEBUG
|
|
274
274
|
if (swiftWrapper == nullptr) [[unlikely]] {
|
|
@@ -280,7 +280,7 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
280
280
|
}
|
|
281
281
|
|
|
282
282
|
// pragma MARK: std::function<void(const std::vector<HeartbeatSeriesSample>& /* result */)>
|
|
283
|
-
Func_void_std__vector_HeartbeatSeriesSample_ create_Func_void_std__vector_HeartbeatSeriesSample_(void*
|
|
283
|
+
Func_void_std__vector_HeartbeatSeriesSample_ create_Func_void_std__vector_HeartbeatSeriesSample_(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
284
284
|
auto swiftClosure = ReactNativeHealthkit::Func_void_std__vector_HeartbeatSeriesSample_::fromUnsafe(swiftClosureWrapper);
|
|
285
285
|
return [swiftClosure = std::move(swiftClosure)](const std::vector<HeartbeatSeriesSample>& result) mutable -> void {
|
|
286
286
|
swiftClosure.call(result);
|
|
@@ -288,7 +288,7 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
288
288
|
}
|
|
289
289
|
|
|
290
290
|
// pragma MARK: std::function<void(const HeartbeatSeriesSamplesWithAnchorResponse& /* result */)>
|
|
291
|
-
Func_void_HeartbeatSeriesSamplesWithAnchorResponse create_Func_void_HeartbeatSeriesSamplesWithAnchorResponse(void*
|
|
291
|
+
Func_void_HeartbeatSeriesSamplesWithAnchorResponse create_Func_void_HeartbeatSeriesSamplesWithAnchorResponse(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
292
292
|
auto swiftClosure = ReactNativeHealthkit::Func_void_HeartbeatSeriesSamplesWithAnchorResponse::fromUnsafe(swiftClosureWrapper);
|
|
293
293
|
return [swiftClosure = std::move(swiftClosure)](const HeartbeatSeriesSamplesWithAnchorResponse& result) mutable -> void {
|
|
294
294
|
swiftClosure.call(result);
|
|
@@ -296,11 +296,11 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
296
296
|
}
|
|
297
297
|
|
|
298
298
|
// pragma MARK: std::shared_ptr<HybridHeartbeatSeriesModuleSpec>
|
|
299
|
-
std::shared_ptr<HybridHeartbeatSeriesModuleSpec> create_std__shared_ptr_HybridHeartbeatSeriesModuleSpec_(void*
|
|
299
|
+
std::shared_ptr<HybridHeartbeatSeriesModuleSpec> create_std__shared_ptr_HybridHeartbeatSeriesModuleSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
|
|
300
300
|
ReactNativeHealthkit::HybridHeartbeatSeriesModuleSpec_cxx swiftPart = ReactNativeHealthkit::HybridHeartbeatSeriesModuleSpec_cxx::fromUnsafe(swiftUnsafePointer);
|
|
301
301
|
return std::make_shared<margelo::nitro::healthkit::HybridHeartbeatSeriesModuleSpecSwift>(swiftPart);
|
|
302
302
|
}
|
|
303
|
-
void*
|
|
303
|
+
void* NON_NULL get_std__shared_ptr_HybridHeartbeatSeriesModuleSpec_(std__shared_ptr_HybridHeartbeatSeriesModuleSpec_ cppType) {
|
|
304
304
|
std::shared_ptr<margelo::nitro::healthkit::HybridHeartbeatSeriesModuleSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::healthkit::HybridHeartbeatSeriesModuleSpecSwift>(cppType);
|
|
305
305
|
#ifdef NITRO_DEBUG
|
|
306
306
|
if (swiftWrapper == nullptr) [[unlikely]] {
|
|
@@ -312,7 +312,7 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
312
312
|
}
|
|
313
313
|
|
|
314
314
|
// pragma MARK: std::function<void(const std::vector<QuantitySample>& /* result */)>
|
|
315
|
-
Func_void_std__vector_QuantitySample_ create_Func_void_std__vector_QuantitySample_(void*
|
|
315
|
+
Func_void_std__vector_QuantitySample_ create_Func_void_std__vector_QuantitySample_(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
316
316
|
auto swiftClosure = ReactNativeHealthkit::Func_void_std__vector_QuantitySample_::fromUnsafe(swiftClosureWrapper);
|
|
317
317
|
return [swiftClosure = std::move(swiftClosure)](const std::vector<QuantitySample>& result) mutable -> void {
|
|
318
318
|
swiftClosure.call(result);
|
|
@@ -320,7 +320,7 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
320
320
|
}
|
|
321
321
|
|
|
322
322
|
// pragma MARK: std::function<void(const QueryStatisticsResponse& /* result */)>
|
|
323
|
-
Func_void_QueryStatisticsResponse create_Func_void_QueryStatisticsResponse(void*
|
|
323
|
+
Func_void_QueryStatisticsResponse create_Func_void_QueryStatisticsResponse(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
324
324
|
auto swiftClosure = ReactNativeHealthkit::Func_void_QueryStatisticsResponse::fromUnsafe(swiftClosureWrapper);
|
|
325
325
|
return [swiftClosure = std::move(swiftClosure)](const QueryStatisticsResponse& result) mutable -> void {
|
|
326
326
|
swiftClosure.call(result);
|
|
@@ -328,7 +328,7 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
328
328
|
}
|
|
329
329
|
|
|
330
330
|
// pragma MARK: std::function<void(const std::vector<QueryStatisticsResponse>& /* result */)>
|
|
331
|
-
Func_void_std__vector_QueryStatisticsResponse_ create_Func_void_std__vector_QueryStatisticsResponse_(void*
|
|
331
|
+
Func_void_std__vector_QueryStatisticsResponse_ create_Func_void_std__vector_QueryStatisticsResponse_(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
332
332
|
auto swiftClosure = ReactNativeHealthkit::Func_void_std__vector_QueryStatisticsResponse_::fromUnsafe(swiftClosureWrapper);
|
|
333
333
|
return [swiftClosure = std::move(swiftClosure)](const std::vector<QueryStatisticsResponse>& result) mutable -> void {
|
|
334
334
|
swiftClosure.call(result);
|
|
@@ -336,7 +336,7 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
336
336
|
}
|
|
337
337
|
|
|
338
338
|
// pragma MARK: std::function<void(const QuantitySamplesWithAnchorResponse& /* result */)>
|
|
339
|
-
Func_void_QuantitySamplesWithAnchorResponse create_Func_void_QuantitySamplesWithAnchorResponse(void*
|
|
339
|
+
Func_void_QuantitySamplesWithAnchorResponse create_Func_void_QuantitySamplesWithAnchorResponse(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
340
340
|
auto swiftClosure = ReactNativeHealthkit::Func_void_QuantitySamplesWithAnchorResponse::fromUnsafe(swiftClosureWrapper);
|
|
341
341
|
return [swiftClosure = std::move(swiftClosure)](const QuantitySamplesWithAnchorResponse& result) mutable -> void {
|
|
342
342
|
swiftClosure.call(result);
|
|
@@ -344,11 +344,11 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
344
344
|
}
|
|
345
345
|
|
|
346
346
|
// pragma MARK: std::shared_ptr<HybridQuantityTypeModuleSpec>
|
|
347
|
-
std::shared_ptr<HybridQuantityTypeModuleSpec> create_std__shared_ptr_HybridQuantityTypeModuleSpec_(void*
|
|
347
|
+
std::shared_ptr<HybridQuantityTypeModuleSpec> create_std__shared_ptr_HybridQuantityTypeModuleSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
|
|
348
348
|
ReactNativeHealthkit::HybridQuantityTypeModuleSpec_cxx swiftPart = ReactNativeHealthkit::HybridQuantityTypeModuleSpec_cxx::fromUnsafe(swiftUnsafePointer);
|
|
349
349
|
return std::make_shared<margelo::nitro::healthkit::HybridQuantityTypeModuleSpecSwift>(swiftPart);
|
|
350
350
|
}
|
|
351
|
-
void*
|
|
351
|
+
void* NON_NULL get_std__shared_ptr_HybridQuantityTypeModuleSpec_(std__shared_ptr_HybridQuantityTypeModuleSpec_ cppType) {
|
|
352
352
|
std::shared_ptr<margelo::nitro::healthkit::HybridQuantityTypeModuleSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::healthkit::HybridQuantityTypeModuleSpecSwift>(cppType);
|
|
353
353
|
#ifdef NITRO_DEBUG
|
|
354
354
|
if (swiftWrapper == nullptr) [[unlikely]] {
|
|
@@ -360,7 +360,7 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
360
360
|
}
|
|
361
361
|
|
|
362
362
|
// pragma MARK: std::function<void(const std::vector<StateOfMindSample>& /* result */)>
|
|
363
|
-
Func_void_std__vector_StateOfMindSample_ create_Func_void_std__vector_StateOfMindSample_(void*
|
|
363
|
+
Func_void_std__vector_StateOfMindSample_ create_Func_void_std__vector_StateOfMindSample_(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
364
364
|
auto swiftClosure = ReactNativeHealthkit::Func_void_std__vector_StateOfMindSample_::fromUnsafe(swiftClosureWrapper);
|
|
365
365
|
return [swiftClosure = std::move(swiftClosure)](const std::vector<StateOfMindSample>& result) mutable -> void {
|
|
366
366
|
swiftClosure.call(result);
|
|
@@ -368,11 +368,11 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
368
368
|
}
|
|
369
369
|
|
|
370
370
|
// pragma MARK: std::shared_ptr<HybridStateOfMindModuleSpec>
|
|
371
|
-
std::shared_ptr<HybridStateOfMindModuleSpec> create_std__shared_ptr_HybridStateOfMindModuleSpec_(void*
|
|
371
|
+
std::shared_ptr<HybridStateOfMindModuleSpec> create_std__shared_ptr_HybridStateOfMindModuleSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
|
|
372
372
|
ReactNativeHealthkit::HybridStateOfMindModuleSpec_cxx swiftPart = ReactNativeHealthkit::HybridStateOfMindModuleSpec_cxx::fromUnsafe(swiftUnsafePointer);
|
|
373
373
|
return std::make_shared<margelo::nitro::healthkit::HybridStateOfMindModuleSpecSwift>(swiftPart);
|
|
374
374
|
}
|
|
375
|
-
void*
|
|
375
|
+
void* NON_NULL get_std__shared_ptr_HybridStateOfMindModuleSpec_(std__shared_ptr_HybridStateOfMindModuleSpec_ cppType) {
|
|
376
376
|
std::shared_ptr<margelo::nitro::healthkit::HybridStateOfMindModuleSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::healthkit::HybridStateOfMindModuleSpecSwift>(cppType);
|
|
377
377
|
#ifdef NITRO_DEBUG
|
|
378
378
|
if (swiftWrapper == nullptr) [[unlikely]] {
|
|
@@ -384,7 +384,7 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
384
384
|
}
|
|
385
385
|
|
|
386
386
|
// pragma MARK: std::function<void(const std::optional<WorkoutPlan>& /* result */)>
|
|
387
|
-
Func_void_std__optional_WorkoutPlan_ create_Func_void_std__optional_WorkoutPlan_(void*
|
|
387
|
+
Func_void_std__optional_WorkoutPlan_ create_Func_void_std__optional_WorkoutPlan_(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
388
388
|
auto swiftClosure = ReactNativeHealthkit::Func_void_std__optional_WorkoutPlan_::fromUnsafe(swiftClosureWrapper);
|
|
389
389
|
return [swiftClosure = std::move(swiftClosure)](const std::optional<WorkoutPlan>& result) mutable -> void {
|
|
390
390
|
swiftClosure.call(result);
|
|
@@ -392,7 +392,7 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
392
392
|
}
|
|
393
393
|
|
|
394
394
|
// pragma MARK: std::function<void(const std::vector<WorkoutRoute>& /* result */)>
|
|
395
|
-
Func_void_std__vector_WorkoutRoute_ create_Func_void_std__vector_WorkoutRoute_(void*
|
|
395
|
+
Func_void_std__vector_WorkoutRoute_ create_Func_void_std__vector_WorkoutRoute_(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
396
396
|
auto swiftClosure = ReactNativeHealthkit::Func_void_std__vector_WorkoutRoute_::fromUnsafe(swiftClosureWrapper);
|
|
397
397
|
return [swiftClosure = std::move(swiftClosure)](const std::vector<WorkoutRoute>& result) mutable -> void {
|
|
398
398
|
swiftClosure.call(result);
|
|
@@ -400,7 +400,7 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
400
400
|
}
|
|
401
401
|
|
|
402
402
|
// pragma MARK: std::function<void(const std::optional<QueryStatisticsResponse>& /* result */)>
|
|
403
|
-
Func_void_std__optional_QueryStatisticsResponse_ create_Func_void_std__optional_QueryStatisticsResponse_(void*
|
|
403
|
+
Func_void_std__optional_QueryStatisticsResponse_ create_Func_void_std__optional_QueryStatisticsResponse_(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
404
404
|
auto swiftClosure = ReactNativeHealthkit::Func_void_std__optional_QueryStatisticsResponse_::fromUnsafe(swiftClosureWrapper);
|
|
405
405
|
return [swiftClosure = std::move(swiftClosure)](const std::optional<QueryStatisticsResponse>& result) mutable -> void {
|
|
406
406
|
swiftClosure.call(result);
|
|
@@ -408,7 +408,7 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
408
408
|
}
|
|
409
409
|
|
|
410
410
|
// pragma MARK: std::function<void(const std::unordered_map<std::string, QueryStatisticsResponse>& /* result */)>
|
|
411
|
-
Func_void_std__unordered_map_std__string__QueryStatisticsResponse_ create_Func_void_std__unordered_map_std__string__QueryStatisticsResponse_(void*
|
|
411
|
+
Func_void_std__unordered_map_std__string__QueryStatisticsResponse_ create_Func_void_std__unordered_map_std__string__QueryStatisticsResponse_(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
412
412
|
auto swiftClosure = ReactNativeHealthkit::Func_void_std__unordered_map_std__string__QueryStatisticsResponse_::fromUnsafe(swiftClosureWrapper);
|
|
413
413
|
return [swiftClosure = std::move(swiftClosure)](const std::unordered_map<std::string, QueryStatisticsResponse>& result) mutable -> void {
|
|
414
414
|
swiftClosure.call(result);
|
|
@@ -416,7 +416,7 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
416
416
|
}
|
|
417
417
|
|
|
418
418
|
// pragma MARK: std::function<void(const std::shared_ptr<HybridWorkoutProxySpec>& /* result */)>
|
|
419
|
-
Func_void_std__shared_ptr_HybridWorkoutProxySpec_ create_Func_void_std__shared_ptr_HybridWorkoutProxySpec_(void*
|
|
419
|
+
Func_void_std__shared_ptr_HybridWorkoutProxySpec_ create_Func_void_std__shared_ptr_HybridWorkoutProxySpec_(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
420
420
|
auto swiftClosure = ReactNativeHealthkit::Func_void_std__shared_ptr_HybridWorkoutProxySpec_::fromUnsafe(swiftClosureWrapper);
|
|
421
421
|
return [swiftClosure = std::move(swiftClosure)](const std::shared_ptr<HybridWorkoutProxySpec>& result) mutable -> void {
|
|
422
422
|
swiftClosure.call(result);
|
|
@@ -424,7 +424,7 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
424
424
|
}
|
|
425
425
|
|
|
426
426
|
// pragma MARK: std::function<void(const QueryWorkoutSamplesWithAnchorResponse& /* result */)>
|
|
427
|
-
Func_void_QueryWorkoutSamplesWithAnchorResponse create_Func_void_QueryWorkoutSamplesWithAnchorResponse(void*
|
|
427
|
+
Func_void_QueryWorkoutSamplesWithAnchorResponse create_Func_void_QueryWorkoutSamplesWithAnchorResponse(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
428
428
|
auto swiftClosure = ReactNativeHealthkit::Func_void_QueryWorkoutSamplesWithAnchorResponse::fromUnsafe(swiftClosureWrapper);
|
|
429
429
|
return [swiftClosure = std::move(swiftClosure)](const QueryWorkoutSamplesWithAnchorResponse& result) mutable -> void {
|
|
430
430
|
swiftClosure.call(result);
|
|
@@ -432,7 +432,7 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
432
432
|
}
|
|
433
433
|
|
|
434
434
|
// pragma MARK: std::function<void(const std::vector<std::shared_ptr<HybridWorkoutProxySpec>>& /* result */)>
|
|
435
|
-
Func_void_std__vector_std__shared_ptr_HybridWorkoutProxySpec__ create_Func_void_std__vector_std__shared_ptr_HybridWorkoutProxySpec__(void*
|
|
435
|
+
Func_void_std__vector_std__shared_ptr_HybridWorkoutProxySpec__ create_Func_void_std__vector_std__shared_ptr_HybridWorkoutProxySpec__(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
436
436
|
auto swiftClosure = ReactNativeHealthkit::Func_void_std__vector_std__shared_ptr_HybridWorkoutProxySpec__::fromUnsafe(swiftClosureWrapper);
|
|
437
437
|
return [swiftClosure = std::move(swiftClosure)](const std::vector<std::shared_ptr<HybridWorkoutProxySpec>>& result) mutable -> void {
|
|
438
438
|
swiftClosure.call(result);
|
|
@@ -440,11 +440,11 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
440
440
|
}
|
|
441
441
|
|
|
442
442
|
// pragma MARK: std::shared_ptr<HybridWorkoutsModuleSpec>
|
|
443
|
-
std::shared_ptr<HybridWorkoutsModuleSpec> create_std__shared_ptr_HybridWorkoutsModuleSpec_(void*
|
|
443
|
+
std::shared_ptr<HybridWorkoutsModuleSpec> create_std__shared_ptr_HybridWorkoutsModuleSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
|
|
444
444
|
ReactNativeHealthkit::HybridWorkoutsModuleSpec_cxx swiftPart = ReactNativeHealthkit::HybridWorkoutsModuleSpec_cxx::fromUnsafe(swiftUnsafePointer);
|
|
445
445
|
return std::make_shared<margelo::nitro::healthkit::HybridWorkoutsModuleSpecSwift>(swiftPart);
|
|
446
446
|
}
|
|
447
|
-
void*
|
|
447
|
+
void* NON_NULL get_std__shared_ptr_HybridWorkoutsModuleSpec_(std__shared_ptr_HybridWorkoutsModuleSpec_ cppType) {
|
|
448
448
|
std::shared_ptr<margelo::nitro::healthkit::HybridWorkoutsModuleSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::healthkit::HybridWorkoutsModuleSpecSwift>(cppType);
|
|
449
449
|
#ifdef NITRO_DEBUG
|
|
450
450
|
if (swiftWrapper == nullptr) [[unlikely]] {
|