@kingstinct/react-native-healthkit 9.0.6 → 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.
Files changed (67) hide show
  1. package/ios/CategoryTypeModule.swift +18 -21
  2. package/ios/CharacteristicTypeModule.swift +36 -21
  3. package/ios/CorrelationTypeModule.swift +18 -18
  4. package/ios/HeartbeatSeriesModule.swift +32 -32
  5. package/ios/QuantityTypeModule.swift +56 -57
  6. package/ios/Serializers.swift +12 -16
  7. package/ios/StateOfMindModule.swift +17 -17
  8. package/ios/WorkoutsModule.swift +59 -110
  9. package/lib/commonjs/healthkit.js +225 -0
  10. package/lib/commonjs/hooks/useStatisticsForQuantity.js +1 -1
  11. package/lib/commonjs/index.js +6 -209
  12. package/lib/module/healthkit.js +203 -0
  13. package/lib/module/hooks/useStatisticsForQuantity.js +1 -1
  14. package/lib/module/index.js +3 -203
  15. package/lib/typescript/healthkit.d.ts +69 -0
  16. package/lib/typescript/{index.ios.d.ts → healthkit.ios.d.ts} +11 -11
  17. package/lib/typescript/hooks/useHealthkitAuthorization.d.ts +1 -1
  18. package/lib/typescript/index.d.ts +3 -69
  19. package/lib/typescript/specs/CategoryTypeModule.nitro.d.ts +1 -1
  20. package/lib/typescript/specs/CharacteristicTypeModule.nitro.d.ts +2 -2
  21. package/lib/typescript/specs/CoreModule.nitro.d.ts +3 -3
  22. package/lib/typescript/specs/WorkoutsModule.nitro.d.ts +3 -0
  23. package/lib/typescript/types/Shared.d.ts +3 -3
  24. package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.cpp +7 -48
  25. package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.hpp +54 -154
  26. package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Umbrella.hpp +0 -14
  27. package/nitrogen/generated/ios/c++/HybridCharacteristicTypeModuleSpecSwift.hpp +3 -2
  28. package/nitrogen/generated/ios/swift/Func_void_std__optional_std__chrono__system_clock__time_point_.swift +52 -0
  29. package/nitrogen/generated/ios/swift/HybridCharacteristicTypeModuleSpec.swift +2 -2
  30. package/nitrogen/generated/ios/swift/HybridCharacteristicTypeModuleSpec_cxx.swift +23 -11
  31. package/nitrogen/generated/shared/c++/HybridCharacteristicTypeModuleSpec.hpp +3 -2
  32. package/package.json +2 -2
  33. package/src/healthkit.ts +422 -0
  34. package/src/hooks/useHealthkitAuthorization.ts +2 -2
  35. package/src/hooks/useStatisticsForQuantity.ts +1 -3
  36. package/src/index.ts +3 -419
  37. package/src/specs/CategoryTypeModule.nitro.ts +1 -1
  38. package/src/specs/CharacteristicTypeModule.nitro.ts +2 -2
  39. package/src/specs/CoreModule.nitro.ts +5 -5
  40. package/src/specs/WorkoutsModule.nitro.ts +3 -0
  41. package/src/test-setup.ts +0 -1
  42. package/src/types/QueryOptions.ts +3 -3
  43. package/src/types/Shared.ts +6 -8
  44. package/ios/WorkoutSessionModule.swift +0 -182
  45. package/lib/commonjs/specs/WorkoutSessionModule.nitro.js +0 -19
  46. package/lib/module/specs/WorkoutSessionModule.nitro.js +0 -16
  47. package/lib/typescript/specs/WorkoutSessionModule.nitro.d.ts +0 -47
  48. package/nitrogen/generated/ios/c++/HybridWorkoutSessionModuleSpecSwift.cpp +0 -11
  49. package/nitrogen/generated/ios/c++/HybridWorkoutSessionModuleSpecSwift.hpp +0 -107
  50. package/nitrogen/generated/ios/swift/Func_void_WorkoutEventType.swift +0 -46
  51. package/nitrogen/generated/ios/swift/Func_void_WorkoutSessionState_WorkoutSessionState_std__chrono__system_clock__time_point.swift +0 -46
  52. package/nitrogen/generated/ios/swift/Func_void_std__chrono__system_clock__time_point.swift +0 -46
  53. package/nitrogen/generated/ios/swift/Func_void_std__vector_RemoteSessionSharableData_.swift +0 -46
  54. package/nitrogen/generated/ios/swift/HybridWorkoutSessionModuleSpec.swift +0 -49
  55. package/nitrogen/generated/ios/swift/HybridWorkoutSessionModuleSpec_cxx.swift +0 -133
  56. package/nitrogen/generated/ios/swift/RemoteSessionSharableData.swift +0 -46
  57. package/nitrogen/generated/ios/swift/WorkoutSessionMirroringStartHandlerOptions.swift +0 -118
  58. package/nitrogen/generated/ios/swift/WorkoutSessionState.swift +0 -56
  59. package/nitrogen/generated/shared/c++/HybridWorkoutSessionModuleSpec.cpp +0 -22
  60. package/nitrogen/generated/shared/c++/HybridWorkoutSessionModuleSpec.hpp +0 -68
  61. package/nitrogen/generated/shared/c++/RemoteSessionSharableData.hpp +0 -75
  62. package/nitrogen/generated/shared/c++/WorkoutSessionMirroringStartHandlerOptions.hpp +0 -92
  63. package/nitrogen/generated/shared/c++/WorkoutSessionState.hpp +0 -68
  64. package/src/specs/WorkoutSessionModule.nitro.ts +0 -71
  65. /package/lib/commonjs/{index.ios.js → healthkit.ios.js} +0 -0
  66. /package/lib/module/{index.ios.js → healthkit.ios.js} +0 -0
  67. /package/src/{index.ios.ts → healthkit.ios.ts} +0 -0
@@ -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>
@@ -745,38 +734,38 @@ namespace margelo::nitro::healthkit::bridge::swift {
745
734
  return Func_void_BloodType_Wrapper(std::move(value));
746
735
  }
747
736
 
748
- // pragma MARK: std::shared_ptr<Promise<std::chrono::system_clock::time_point>>
737
+ // pragma MARK: std::shared_ptr<Promise<std::optional<std::chrono::system_clock::time_point>>>
749
738
  /**
750
- * Specialized version of `std::shared_ptr<Promise<std::chrono::system_clock::time_point>>`.
739
+ * Specialized version of `std::shared_ptr<Promise<std::optional<std::chrono::system_clock::time_point>>>`.
751
740
  */
752
- using std__shared_ptr_Promise_std__chrono__system_clock__time_point__ = std::shared_ptr<Promise<std::chrono::system_clock::time_point>>;
753
- inline std::shared_ptr<Promise<std::chrono::system_clock::time_point>> create_std__shared_ptr_Promise_std__chrono__system_clock__time_point__() {
754
- return Promise<std::chrono::system_clock::time_point>::create();
741
+ using std__shared_ptr_Promise_std__optional_std__chrono__system_clock__time_point___ = std::shared_ptr<Promise<std::optional<std::chrono::system_clock::time_point>>>;
742
+ inline std::shared_ptr<Promise<std::optional<std::chrono::system_clock::time_point>>> create_std__shared_ptr_Promise_std__optional_std__chrono__system_clock__time_point___() {
743
+ return Promise<std::optional<std::chrono::system_clock::time_point>>::create();
755
744
  }
756
- inline PromiseHolder<std::chrono::system_clock::time_point> wrap_std__shared_ptr_Promise_std__chrono__system_clock__time_point__(std::shared_ptr<Promise<std::chrono::system_clock::time_point>> promise) {
757
- return PromiseHolder<std::chrono::system_clock::time_point>(std::move(promise));
745
+ inline PromiseHolder<std::optional<std::chrono::system_clock::time_point>> wrap_std__shared_ptr_Promise_std__optional_std__chrono__system_clock__time_point___(std::shared_ptr<Promise<std::optional<std::chrono::system_clock::time_point>>> promise) {
746
+ return PromiseHolder<std::optional<std::chrono::system_clock::time_point>>(std::move(promise));
758
747
  }
759
748
 
760
- // pragma MARK: std::function<void(std::chrono::system_clock::time_point /* result */)>
749
+ // pragma MARK: std::function<void(std::optional<std::chrono::system_clock::time_point> /* result */)>
761
750
  /**
762
- * Specialized version of `std::function<void(std::chrono::system_clock::time_point)>`.
751
+ * Specialized version of `std::function<void(std::optional<std::chrono::system_clock::time_point>)>`.
763
752
  */
764
- using Func_void_std__chrono__system_clock__time_point = std::function<void(std::chrono::system_clock::time_point /* result */)>;
753
+ using Func_void_std__optional_std__chrono__system_clock__time_point_ = std::function<void(std::optional<std::chrono::system_clock::time_point> /* result */)>;
765
754
  /**
766
- * Wrapper class for a `std::function<void(std::chrono::system_clock::time_point / * result * /)>`, this can be used from Swift.
755
+ * Wrapper class for a `std::function<void(std::optional<std::chrono::system_clock::time_point> / * result * /)>`, this can be used from Swift.
767
756
  */
768
- class Func_void_std__chrono__system_clock__time_point_Wrapper final {
757
+ class Func_void_std__optional_std__chrono__system_clock__time_point__Wrapper final {
769
758
  public:
770
- explicit Func_void_std__chrono__system_clock__time_point_Wrapper(std::function<void(std::chrono::system_clock::time_point /* result */)>&& func): _function(std::make_shared<std::function<void(std::chrono::system_clock::time_point /* result */)>>(std::move(func))) {}
771
- inline void call(std::chrono::system_clock::time_point result) const {
759
+ explicit Func_void_std__optional_std__chrono__system_clock__time_point__Wrapper(std::function<void(std::optional<std::chrono::system_clock::time_point> /* result */)>&& func): _function(std::make_shared<std::function<void(std::optional<std::chrono::system_clock::time_point> /* result */)>>(std::move(func))) {}
760
+ inline void call(std::optional<std::chrono::system_clock::time_point> result) const {
772
761
  _function->operator()(result);
773
762
  }
774
763
  private:
775
- std::shared_ptr<std::function<void(std::chrono::system_clock::time_point /* result */)>> _function;
764
+ std::shared_ptr<std::function<void(std::optional<std::chrono::system_clock::time_point> /* result */)>> _function;
776
765
  };
777
- Func_void_std__chrono__system_clock__time_point create_Func_void_std__chrono__system_clock__time_point(void* _Nonnull swiftClosureWrapper);
778
- inline Func_void_std__chrono__system_clock__time_point_Wrapper wrap_Func_void_std__chrono__system_clock__time_point(Func_void_std__chrono__system_clock__time_point value) {
779
- return Func_void_std__chrono__system_clock__time_point_Wrapper(std::move(value));
766
+ Func_void_std__optional_std__chrono__system_clock__time_point_ create_Func_void_std__optional_std__chrono__system_clock__time_point_(void* _Nonnull swiftClosureWrapper);
767
+ inline Func_void_std__optional_std__chrono__system_clock__time_point__Wrapper wrap_Func_void_std__optional_std__chrono__system_clock__time_point_(Func_void_std__optional_std__chrono__system_clock__time_point_ value) {
768
+ return Func_void_std__optional_std__chrono__system_clock__time_point__Wrapper(std::move(value));
780
769
  }
781
770
 
782
771
  // pragma MARK: std::shared_ptr<Promise<BiologicalSex>>
@@ -902,13 +891,13 @@ namespace margelo::nitro::healthkit::bridge::swift {
902
891
  return Result<BloodType>::withError(error);
903
892
  }
904
893
 
905
- // pragma MARK: Result<std::chrono::system_clock::time_point>
906
- using Result_std__chrono__system_clock__time_point_ = Result<std::chrono::system_clock::time_point>;
907
- inline Result_std__chrono__system_clock__time_point_ create_Result_std__chrono__system_clock__time_point_(std::chrono::system_clock::time_point value) {
908
- return Result<std::chrono::system_clock::time_point>::withValue(std::move(value));
894
+ // pragma MARK: Result<std::optional<std::chrono::system_clock::time_point>>
895
+ using Result_std__optional_std__chrono__system_clock__time_point__ = Result<std::optional<std::chrono::system_clock::time_point>>;
896
+ inline Result_std__optional_std__chrono__system_clock__time_point__ create_Result_std__optional_std__chrono__system_clock__time_point__(std::optional<std::chrono::system_clock::time_point> value) {
897
+ return Result<std::optional<std::chrono::system_clock::time_point>>::withValue(std::move(value));
909
898
  }
910
- inline Result_std__chrono__system_clock__time_point_ create_Result_std__chrono__system_clock__time_point_(const std::exception_ptr& error) {
911
- return Result<std::chrono::system_clock::time_point>::withError(error);
899
+ inline Result_std__optional_std__chrono__system_clock__time_point__ create_Result_std__optional_std__chrono__system_clock__time_point__(const std::exception_ptr& error) {
900
+ return Result<std::optional<std::chrono::system_clock::time_point>>::withError(error);
912
901
  }
913
902
 
914
903
  // pragma MARK: Result<BiologicalSex>
@@ -947,13 +936,13 @@ namespace margelo::nitro::healthkit::bridge::swift {
947
936
  return Result<std::shared_ptr<Promise<BloodType>>>::withError(error);
948
937
  }
949
938
 
950
- // pragma MARK: Result<std::shared_ptr<Promise<std::chrono::system_clock::time_point>>>
951
- using Result_std__shared_ptr_Promise_std__chrono__system_clock__time_point___ = Result<std::shared_ptr<Promise<std::chrono::system_clock::time_point>>>;
952
- inline Result_std__shared_ptr_Promise_std__chrono__system_clock__time_point___ create_Result_std__shared_ptr_Promise_std__chrono__system_clock__time_point___(const std::shared_ptr<Promise<std::chrono::system_clock::time_point>>& value) {
953
- return Result<std::shared_ptr<Promise<std::chrono::system_clock::time_point>>>::withValue(value);
939
+ // pragma MARK: Result<std::shared_ptr<Promise<std::optional<std::chrono::system_clock::time_point>>>>
940
+ using Result_std__shared_ptr_Promise_std__optional_std__chrono__system_clock__time_point____ = Result<std::shared_ptr<Promise<std::optional<std::chrono::system_clock::time_point>>>>;
941
+ inline Result_std__shared_ptr_Promise_std__optional_std__chrono__system_clock__time_point____ create_Result_std__shared_ptr_Promise_std__optional_std__chrono__system_clock__time_point____(const std::shared_ptr<Promise<std::optional<std::chrono::system_clock::time_point>>>& value) {
942
+ return Result<std::shared_ptr<Promise<std::optional<std::chrono::system_clock::time_point>>>>::withValue(value);
954
943
  }
955
- inline Result_std__shared_ptr_Promise_std__chrono__system_clock__time_point___ create_Result_std__shared_ptr_Promise_std__chrono__system_clock__time_point___(const std::exception_ptr& error) {
956
- return Result<std::shared_ptr<Promise<std::chrono::system_clock::time_point>>>::withError(error);
944
+ inline Result_std__shared_ptr_Promise_std__optional_std__chrono__system_clock__time_point____ create_Result_std__shared_ptr_Promise_std__optional_std__chrono__system_clock__time_point____(const std::exception_ptr& error) {
945
+ return Result<std::shared_ptr<Promise<std::optional<std::chrono::system_clock::time_point>>>>::withError(error);
957
946
  }
958
947
 
959
948
  // pragma MARK: Result<std::shared_ptr<Promise<BiologicalSex>>>
@@ -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::optional<WorkoutSessionLocationType>
2139
+ // pragma MARK: std::shared_ptr<Promise<std::string>>
2151
2140
  /**
2152
- * Specialized version of `std::optional<WorkoutSessionLocationType>`.
2141
+ * Specialized version of `std::shared_ptr<Promise<std::string>>`.
2153
2142
  */
2154
- using std__optional_WorkoutSessionLocationType_ = std::optional<WorkoutSessionLocationType>;
2155
- inline std::optional<WorkoutSessionLocationType> create_std__optional_WorkoutSessionLocationType_(const WorkoutSessionLocationType& value) {
2156
- return std::optional<WorkoutSessionLocationType>(value);
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& /* errorMessage */)>
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& /* errorMessage */)>;
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& / * errorMessage * /)>`, this can be used from Swift.
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& /* errorMessage */)>&& func): _function(std::make_shared<std::function<void(const std::string& /* errorMessage */)>>(std::move(func))) {}
2170
- inline void call(std::string errorMessage) const {
2171
- _function->operator()(errorMessage);
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& /* errorMessage */)>> _function;
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>`.
@@ -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.
@@ -118,8 +116,6 @@ namespace margelo::nitro::healthkit { struct QueryOptionsWithSortOrder; }
118
116
  namespace margelo::nitro::healthkit { struct QueryStatisticsResponse; }
119
117
  // Forward declaration of `QueryWorkoutSamplesWithAnchorResponse` to properly resolve imports.
120
118
  namespace margelo::nitro::healthkit { struct QueryWorkoutSamplesWithAnchorResponse; }
121
- // Forward declaration of `RemoteSessionSharableData` to properly resolve imports.
122
- namespace margelo::nitro::healthkit { struct RemoteSessionSharableData; }
123
119
  // Forward declaration of `SampleTypeIdentifierWriteable` to properly resolve imports.
124
120
  namespace margelo::nitro::healthkit { enum class SampleTypeIdentifierWriteable; }
125
121
  // Forward declaration of `SampleTypeIdentifier` to properly resolve imports.
@@ -174,10 +170,6 @@ namespace margelo::nitro::healthkit { struct WorkoutRoute; }
174
170
  namespace margelo::nitro::healthkit { struct WorkoutSample; }
175
171
  // Forward declaration of `WorkoutSessionLocationType` to properly resolve imports.
176
172
  namespace margelo::nitro::healthkit { enum class WorkoutSessionLocationType; }
177
- // Forward declaration of `WorkoutSessionMirroringStartHandlerOptions` to properly resolve imports.
178
- namespace margelo::nitro::healthkit { struct WorkoutSessionMirroringStartHandlerOptions; }
179
- // Forward declaration of `WorkoutSessionState` to properly resolve imports.
180
- namespace margelo::nitro::healthkit { enum class WorkoutSessionState; }
181
173
  // Forward declaration of `WorkoutTotals` to properly resolve imports.
182
174
  namespace margelo::nitro::healthkit { struct WorkoutTotals; }
183
175
 
@@ -210,7 +202,6 @@ namespace margelo::nitro::healthkit { struct WorkoutTotals; }
210
202
  #include "HybridSourceProxySpec.hpp"
211
203
  #include "HybridStateOfMindModuleSpec.hpp"
212
204
  #include "HybridWorkoutProxySpec.hpp"
213
- #include "HybridWorkoutSessionModuleSpec.hpp"
214
205
  #include "HybridWorkoutsModuleSpec.hpp"
215
206
  #include "IdentifierWithUnit.hpp"
216
207
  #include "IntervalComponents.hpp"
@@ -236,7 +227,6 @@ namespace margelo::nitro::healthkit { struct WorkoutTotals; }
236
227
  #include "QueryOptionsWithSortOrderAndUnit.hpp"
237
228
  #include "QueryStatisticsResponse.hpp"
238
229
  #include "QueryWorkoutSamplesWithAnchorResponse.hpp"
239
- #include "RemoteSessionSharableData.hpp"
240
230
  #include "SampleTypeIdentifier.hpp"
241
231
  #include "SampleTypeIdentifierWriteable.hpp"
242
232
  #include "Source.hpp"
@@ -264,8 +254,6 @@ namespace margelo::nitro::healthkit { struct WorkoutTotals; }
264
254
  #include "WorkoutRouteLocation.hpp"
265
255
  #include "WorkoutSample.hpp"
266
256
  #include "WorkoutSessionLocationType.hpp"
267
- #include "WorkoutSessionMirroringStartHandlerOptions.hpp"
268
- #include "WorkoutSessionState.hpp"
269
257
  #include "WorkoutTotals.hpp"
270
258
  #include <NitroModules/AnyMap.hpp>
271
259
  #include <NitroModules/Promise.hpp>
@@ -308,8 +296,6 @@ namespace ReactNativeHealthkit { class HybridSourceProxySpec_cxx; }
308
296
  namespace ReactNativeHealthkit { class HybridStateOfMindModuleSpec_cxx; }
309
297
  // Forward declaration of `HybridWorkoutProxySpec_cxx` to properly resolve imports.
310
298
  namespace ReactNativeHealthkit { class HybridWorkoutProxySpec_cxx; }
311
- // Forward declaration of `HybridWorkoutSessionModuleSpec_cxx` to properly resolve imports.
312
- namespace ReactNativeHealthkit { class HybridWorkoutSessionModuleSpec_cxx; }
313
299
  // Forward declaration of `HybridWorkoutsModuleSpec_cxx` to properly resolve imports.
314
300
  namespace ReactNativeHealthkit { class HybridWorkoutsModuleSpec_cxx; }
315
301
 
@@ -22,6 +22,7 @@ namespace margelo::nitro::healthkit { enum class FitzpatrickSkinType; }
22
22
  namespace margelo::nitro::healthkit { enum class WheelchairUse; }
23
23
 
24
24
  #include "BloodType.hpp"
25
+ #include <optional>
25
26
  #include <chrono>
26
27
  #include "BiologicalSex.hpp"
27
28
  #include "FitzpatrickSkinType.hpp"
@@ -75,7 +76,7 @@ namespace margelo::nitro::healthkit {
75
76
  auto __value = std::move(__result.value());
76
77
  return __value;
77
78
  }
78
- inline std::chrono::system_clock::time_point getDateOfBirth() override {
79
+ inline std::optional<std::chrono::system_clock::time_point> getDateOfBirth() override {
79
80
  auto __result = _swiftPart.getDateOfBirth();
80
81
  if (__result.hasError()) [[unlikely]] {
81
82
  std::rethrow_exception(__result.error());
@@ -115,7 +116,7 @@ namespace margelo::nitro::healthkit {
115
116
  auto __value = std::move(__result.value());
116
117
  return __value;
117
118
  }
118
- inline std::shared_ptr<Promise<std::chrono::system_clock::time_point>> getDateOfBirthAsync() override {
119
+ inline std::shared_ptr<Promise<std::optional<std::chrono::system_clock::time_point>>> getDateOfBirthAsync() override {
119
120
  auto __result = _swiftPart.getDateOfBirthAsync();
120
121
  if (__result.hasError()) [[unlikely]] {
121
122
  std::rethrow_exception(__result.error());
@@ -0,0 +1,52 @@
1
+ ///
2
+ /// Func_void_std__optional_std__chrono__system_clock__time_point_.swift
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ import NitroModules
9
+
10
+ /**
11
+ * Wraps a Swift `(_ value: Date?) -> Void` as a class.
12
+ * This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
13
+ */
14
+ public final class Func_void_std__optional_std__chrono__system_clock__time_point_ {
15
+ public typealias bridge = margelo.nitro.healthkit.bridge.swift
16
+
17
+ private let closure: (_ value: Date?) -> Void
18
+
19
+ public init(_ closure: @escaping (_ value: Date?) -> Void) {
20
+ self.closure = closure
21
+ }
22
+
23
+ @inline(__always)
24
+ public func call(value: bridge.std__optional_std__chrono__system_clock__time_point_) -> Void {
25
+ self.closure({ () -> Date? in
26
+ if let __unwrapped = value.value {
27
+ return Date(fromChrono: __unwrapped)
28
+ } else {
29
+ return nil
30
+ }
31
+ }())
32
+ }
33
+
34
+ /**
35
+ * Casts this instance to a retained unsafe raw pointer.
36
+ * This acquires one additional strong reference on the object!
37
+ */
38
+ @inline(__always)
39
+ public func toUnsafe() -> UnsafeMutableRawPointer {
40
+ return Unmanaged.passRetained(self).toOpaque()
41
+ }
42
+
43
+ /**
44
+ * Casts an unsafe pointer to a `Func_void_std__optional_std__chrono__system_clock__time_point_`.
45
+ * The pointer has to be a retained opaque `Unmanaged<Func_void_std__optional_std__chrono__system_clock__time_point_>`.
46
+ * This removes one strong reference from the object!
47
+ */
48
+ @inline(__always)
49
+ public static func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> Func_void_std__optional_std__chrono__system_clock__time_point_ {
50
+ return Unmanaged<Func_void_std__optional_std__chrono__system_clock__time_point_>.fromOpaque(pointer).takeRetainedValue()
51
+ }
52
+ }
@@ -15,12 +15,12 @@ public protocol HybridCharacteristicTypeModuleSpec_protocol: HybridObject {
15
15
 
16
16
  // Methods
17
17
  func getBloodType() throws -> BloodType
18
- func getDateOfBirth() throws -> Date
18
+ func getDateOfBirth() throws -> Date?
19
19
  func getBiologicalSex() throws -> BiologicalSex
20
20
  func getFitzpatrickSkinType() throws -> FitzpatrickSkinType
21
21
  func getWheelchairUse() throws -> WheelchairUse
22
22
  func getBloodTypeAsync() throws -> Promise<BloodType>
23
- func getDateOfBirthAsync() throws -> Promise<Date>
23
+ func getDateOfBirthAsync() throws -> Promise<Date?>
24
24
  func getBiologicalSexAsync() throws -> Promise<BiologicalSex>
25
25
  func getFitzpatrickSkinTypeAsync() throws -> Promise<FitzpatrickSkinType>
26
26
  func getWheelchairUseAsync() throws -> Promise<WheelchairUse>
@@ -113,14 +113,20 @@ public class HybridCharacteristicTypeModuleSpec_cxx {
113
113
  }
114
114
 
115
115
  @inline(__always)
116
- public final func getDateOfBirth() -> bridge.Result_std__chrono__system_clock__time_point_ {
116
+ public final func getDateOfBirth() -> bridge.Result_std__optional_std__chrono__system_clock__time_point__ {
117
117
  do {
118
118
  let __result = try self.__implementation.getDateOfBirth()
119
- let __resultCpp = __result.toCpp()
120
- return bridge.create_Result_std__chrono__system_clock__time_point_(__resultCpp)
119
+ let __resultCpp = { () -> bridge.std__optional_std__chrono__system_clock__time_point_ in
120
+ if let __unwrappedValue = __result {
121
+ return bridge.create_std__optional_std__chrono__system_clock__time_point_(__unwrappedValue.toCpp())
122
+ } else {
123
+ return .init()
124
+ }
125
+ }()
126
+ return bridge.create_Result_std__optional_std__chrono__system_clock__time_point__(__resultCpp)
121
127
  } catch (let __error) {
122
128
  let __exceptionPtr = __error.toCpp()
123
- return bridge.create_Result_std__chrono__system_clock__time_point_(__exceptionPtr)
129
+ return bridge.create_Result_std__optional_std__chrono__system_clock__time_point__(__exceptionPtr)
124
130
  }
125
131
  }
126
132
 
@@ -180,21 +186,27 @@ public class HybridCharacteristicTypeModuleSpec_cxx {
180
186
  }
181
187
 
182
188
  @inline(__always)
183
- public final func getDateOfBirthAsync() -> bridge.Result_std__shared_ptr_Promise_std__chrono__system_clock__time_point___ {
189
+ public final func getDateOfBirthAsync() -> bridge.Result_std__shared_ptr_Promise_std__optional_std__chrono__system_clock__time_point____ {
184
190
  do {
185
191
  let __result = try self.__implementation.getDateOfBirthAsync()
186
- let __resultCpp = { () -> bridge.std__shared_ptr_Promise_std__chrono__system_clock__time_point__ in
187
- let __promise = bridge.create_std__shared_ptr_Promise_std__chrono__system_clock__time_point__()
188
- let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_std__chrono__system_clock__time_point__(__promise)
192
+ let __resultCpp = { () -> bridge.std__shared_ptr_Promise_std__optional_std__chrono__system_clock__time_point___ in
193
+ let __promise = bridge.create_std__shared_ptr_Promise_std__optional_std__chrono__system_clock__time_point___()
194
+ let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_std__optional_std__chrono__system_clock__time_point___(__promise)
189
195
  __result
190
- .then({ __result in __promiseHolder.resolve(__result.toCpp()) })
196
+ .then({ __result in __promiseHolder.resolve({ () -> bridge.std__optional_std__chrono__system_clock__time_point_ in
197
+ if let __unwrappedValue = __result {
198
+ return bridge.create_std__optional_std__chrono__system_clock__time_point_(__unwrappedValue.toCpp())
199
+ } else {
200
+ return .init()
201
+ }
202
+ }()) })
191
203
  .catch({ __error in __promiseHolder.reject(__error.toCpp()) })
192
204
  return __promise
193
205
  }()
194
- return bridge.create_Result_std__shared_ptr_Promise_std__chrono__system_clock__time_point___(__resultCpp)
206
+ return bridge.create_Result_std__shared_ptr_Promise_std__optional_std__chrono__system_clock__time_point____(__resultCpp)
195
207
  } catch (let __error) {
196
208
  let __exceptionPtr = __error.toCpp()
197
- return bridge.create_Result_std__shared_ptr_Promise_std__chrono__system_clock__time_point___(__exceptionPtr)
209
+ return bridge.create_Result_std__shared_ptr_Promise_std__optional_std__chrono__system_clock__time_point____(__exceptionPtr)
198
210
  }
199
211
  }
200
212
 
@@ -23,6 +23,7 @@ namespace margelo::nitro::healthkit { enum class FitzpatrickSkinType; }
23
23
  namespace margelo::nitro::healthkit { enum class WheelchairUse; }
24
24
 
25
25
  #include "BloodType.hpp"
26
+ #include <optional>
26
27
  #include <chrono>
27
28
  #include "BiologicalSex.hpp"
28
29
  #include "FitzpatrickSkinType.hpp"
@@ -61,12 +62,12 @@ namespace margelo::nitro::healthkit {
61
62
  public:
62
63
  // Methods
63
64
  virtual BloodType getBloodType() = 0;
64
- virtual std::chrono::system_clock::time_point getDateOfBirth() = 0;
65
+ virtual std::optional<std::chrono::system_clock::time_point> getDateOfBirth() = 0;
65
66
  virtual BiologicalSex getBiologicalSex() = 0;
66
67
  virtual FitzpatrickSkinType getFitzpatrickSkinType() = 0;
67
68
  virtual WheelchairUse getWheelchairUse() = 0;
68
69
  virtual std::shared_ptr<Promise<BloodType>> getBloodTypeAsync() = 0;
69
- virtual std::shared_ptr<Promise<std::chrono::system_clock::time_point>> getDateOfBirthAsync() = 0;
70
+ virtual std::shared_ptr<Promise<std::optional<std::chrono::system_clock::time_point>>> getDateOfBirthAsync() = 0;
70
71
  virtual std::shared_ptr<Promise<BiologicalSex>> getBiologicalSexAsync() = 0;
71
72
  virtual std::shared_ptr<Promise<FitzpatrickSkinType>> getFitzpatrickSkinTypeAsync() = 0;
72
73
  virtual std::shared_ptr<Promise<WheelchairUse>> getWheelchairUseAsync() = 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kingstinct/react-native-healthkit",
3
- "version": "9.0.6",
3
+ "version": "9.0.8",
4
4
  "description": "React Native bindings for HealthKit",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -92,7 +92,7 @@
92
92
  "@types/react": "~19.0.14",
93
93
  "nitro-codegen": "^0.26.2",
94
94
  "react": "19.0.0",
95
- "react-native": "^0.79.3",
95
+ "react-native": "*",
96
96
  "react-native-nitro-modules": "^0.26.2",
97
97
  "typescript": "~5.8.3"
98
98
  },