Package apple.healthkit
Class HKHealthStore
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.healthkit.HKHealthStore
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Block_accessibilityActivateBlock_ret, NSObject.Block_accessibilityActivationPointBlock_ret, NSObject.Block_accessibilityAttributedHintBlock_ret, NSObject.Block_accessibilityAttributedLabelBlock_ret, NSObject.Block_accessibilityAttributedUserInputLabelsBlock_ret, NSObject.Block_accessibilityAttributedValueBlock_ret, NSObject.Block_accessibilityContainerTypeBlock_ret, NSObject.Block_accessibilityCustomActionsBlock_ret, NSObject.Block_accessibilityCustomRotorsBlock_ret, NSObject.Block_accessibilityDecrementBlock_ret, NSObject.Block_accessibilityElementsBlock_ret, NSObject.Block_accessibilityElementsHiddenBlock_ret, NSObject.Block_accessibilityFrameBlock_ret, NSObject.Block_accessibilityHeaderElementsBlock_ret, NSObject.Block_accessibilityHintBlock_ret, NSObject.Block_accessibilityIdentifierBlock_ret, NSObject.Block_accessibilityIncrementBlock_ret, NSObject.Block_accessibilityLabelBlock_ret, NSObject.Block_accessibilityLanguageBlock_ret, NSObject.Block_accessibilityMagicTapBlock_ret, NSObject.Block_accessibilityNavigationStyleBlock_ret, NSObject.Block_accessibilityPathBlock_ret, NSObject.Block_accessibilityPerformEscapeBlock_ret, NSObject.Block_accessibilityRespondsToUserInteractionBlock_ret, NSObject.Block_accessibilityShouldGroupAccessibilityChildrenBlock_ret, NSObject.Block_accessibilityTextualContextBlock_ret, NSObject.Block_accessibilityTraitsBlock_ret, NSObject.Block_accessibilityUserInputLabelsBlock_ret, NSObject.Block_accessibilityValueBlock_ret, NSObject.Block_accessibilityViewIsModalBlock_ret, NSObject.Block_automationElementsBlock_ret, NSObject.Block_isAccessibilityElementBlock_ret, NSObject.Block_setAccessibilityActivateBlock, NSObject.Block_setAccessibilityActivationPointBlock, NSObject.Block_setAccessibilityAttributedHintBlock, NSObject.Block_setAccessibilityAttributedLabelBlock, NSObject.Block_setAccessibilityAttributedUserInputLabelsBlock, NSObject.Block_setAccessibilityAttributedValueBlock, NSObject.Block_setAccessibilityContainerTypeBlock, NSObject.Block_setAccessibilityCustomActionsBlock, NSObject.Block_setAccessibilityCustomRotorsBlock, NSObject.Block_setAccessibilityDecrementBlock, NSObject.Block_setAccessibilityElementsBlock, NSObject.Block_setAccessibilityElementsHiddenBlock, NSObject.Block_setAccessibilityFrameBlock, NSObject.Block_setAccessibilityHeaderElementsBlock, NSObject.Block_setAccessibilityHintBlock, NSObject.Block_setAccessibilityIdentifierBlock, NSObject.Block_setAccessibilityIncrementBlock, NSObject.Block_setAccessibilityLabelBlock, NSObject.Block_setAccessibilityLanguageBlock, NSObject.Block_setAccessibilityMagicTapBlock, NSObject.Block_setAccessibilityNavigationStyleBlock, NSObject.Block_setAccessibilityPathBlock, NSObject.Block_setAccessibilityPerformEscapeBlock, NSObject.Block_setAccessibilityRespondsToUserInteractionBlock, NSObject.Block_setAccessibilityShouldGroupAccessibilityChildrenBlock, NSObject.Block_setAccessibilityTextualContextBlock, NSObject.Block_setAccessibilityTraitsBlock, NSObject.Block_setAccessibilityUserInputLabelsBlock, NSObject.Block_setAccessibilityValueBlock, NSObject.Block_setAccessibilityViewIsModalBlock, NSObject.Block_setAutomationElementsBlock, NSObject.Block_setIsAccessibilityElementBlock, NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedHKHealthStore(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()@Nullable HKActivityMoveModeObjectactivityMoveModeWithError(@Nullable org.moe.natj.general.ptr.Ptr<NSError> error)activityMoveModeWithError: Returns an object encapsulating the user's activity move mode Before calling this method, the application should request authorization to access objects with the HKCharacteristicType identified by HKCharacteristicTypeIdentifierActivityMoveMode.voidaddSamplesToWorkoutCompletion(@NotNull NSArray<? extends HKSample> samples, @NotNull HKWorkout workout, @NotNull HKHealthStore.Block_addSamplesToWorkoutCompletion completion)Deprecated.static HKHealthStorealloc()static HKHealthStoreallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)longauthorizationStatusForType(@NotNull HKObjectType type)authorizationStatusForType: Returns the application's authorization status for the given object type.@Nullable UIViewControllerauthorizationViewControllerPresenter()[@property] authorizationViewControllerPresenter The view controller from which HealthKit authorization sheets will be presented This property can be set before requesting authorization or running a query like HKDocumentQuery for a better user-experience.static booleanautomaticallyNotifiesObserversForKey(@NotNull java.lang.String key)@Nullable HKBiologicalSexObjectbiologicalSexWithError(@Nullable org.moe.natj.general.ptr.Ptr<NSError> error)biologicalSexWithError: Returns an object encapsulating the user's biological sex.@Nullable HKBloodTypeObjectbloodTypeWithError(@Nullable org.moe.natj.general.ptr.Ptr<NSError> error)bloodTypeWithError: Returns an object encapsulating the user's blood type.static voidcancelPreviousPerformRequestsWithTarget(@NotNull java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(@NotNull java.lang.Object aTarget, @NotNull org.moe.natj.objc.SEL aSelector, @Nullable java.lang.Object anArgument)static @NotNull NSArray<java.lang.String>classFallbacksForKeyedArchiver()static @NotNull org.moe.natj.objc.ClassclassForKeyedUnarchiver()@Nullable NSDateComponentsdateOfBirthComponentsWithError(@Nullable org.moe.natj.general.ptr.Ptr<NSError> error)dateOfBirthComponentsWithError: Returns the user's date of birth in the Gregorian calendar.@Nullable NSDatedateOfBirthWithError(@Nullable org.moe.natj.general.ptr.Ptr<NSError> error)Deprecated.static java.lang.StringdebugDescription_static()voiddeleteObjectsOfTypePredicateWithCompletion(@NotNull HKObjectType objectType, @NotNull NSPredicate predicate, @NotNull HKHealthStore.Block_deleteObjectsOfTypePredicateWithCompletion completion)deleteObjectsOfType:predicate:withCompletion: Deletes all objects matching the given predicate from the HealthKit database.voiddeleteObjectsWithCompletion(@NotNull NSArray<? extends HKObject> objects, @NotNull HKHealthStore.Block_deleteObjectsWithCompletion completion)deleteObjects:withCompletion: Deletes multiple HKObjects from the HealthKit database.voiddeleteObjectWithCompletion(@NotNull HKObject object, @NotNull HKHealthStore.Block_deleteObjectWithCompletion completion)deleteObject:withCompletion: Deletes a single HKObject from the HealthKit database.static java.lang.Stringdescription_static()voiddisableAllBackgroundDeliveryWithCompletion(@NotNull HKHealthStore.Block_disableAllBackgroundDeliveryWithCompletion completion)voiddisableBackgroundDeliveryForTypeWithCompletion(@NotNull HKObjectType type, @NotNull HKHealthStore.Block_disableBackgroundDeliveryForTypeWithCompletion completion)@NotNull NSDateearliestPermittedSampleDate()earliestPermittedSampleDate Samples prior to the earliestPermittedSampleDate cannot be saved or queried.voidenableBackgroundDeliveryForTypeFrequencyWithCompletion(@NotNull HKObjectType type, long frequency, @NotNull HKHealthStore.Block_enableBackgroundDeliveryForTypeFrequencyWithCompletion completion)enableBackgroundDeliveryForType:frequency:withCompletion: This method enables activation of your app when data of the type is recorded at the cadence specified.voidexecuteQuery(@NotNull HKQuery query)executeQuery: Begins executing the given query.@Nullable HKFitzpatrickSkinTypeObjectfitzpatrickSkinTypeWithError(@Nullable org.moe.natj.general.ptr.Ptr<NSError> error)fitzpatrickSkinTypeWithError: Returns an object encapsulating the user's Fitzpatrick skin type.voidgetRequestStatusForAuthorizationToShareTypesReadTypesCompletion(@NotNull NSSet<? extends HKSampleType> typesToShare, @NotNull NSSet<? extends HKObjectType> typesToRead, @NotNull HKHealthStore.Block_getRequestStatusForAuthorizationToShareTypesReadTypesCompletion completion)getRequestStatusForAuthorizationToShareTypes:readTypes:completion: Determines whether requesting authorization for the given types is necessary.voidhandleAuthorizationForExtensionWithCompletion(@NotNull HKHealthStore.Block_handleAuthorizationForExtensionWithCompletion completion)handleAuthorizationForExtensionWithCompletion: Prompts the user to authorize the application for reading and saving objects.static longhash_static()HKHealthStoreinit()static NSObject.Function_instanceMethodForSelector_retinstanceMethodForSelector(org.moe.natj.objc.SEL aSelector)static NSMethodSignatureinstanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)static booleaninstancesRespondToSelector(org.moe.natj.objc.SEL aSelector)static booleanisHealthDataAvailable()isHealthDataAvailable Returns YES if HealthKit is supported on the device.static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static @NotNull NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(@NotNull java.lang.String key)static HKHealthStorenew_objc()voidpreferredUnitsForQuantityTypesCompletion(@NotNull NSSet<? extends HKQuantityType> quantityTypes, @NotNull HKHealthStore.Block_preferredUnitsForQuantityTypesCompletion completion)preferredUnitsForQuantityTypes:completion: Calls the completion with the preferred HKUnits for a given set of HKQuantityTypes.voidrecalibrateEstimatesForSampleTypeAtDateCompletion(@NotNull HKSampleType sampleType, @NotNull NSDate date, @NotNull HKHealthStore.Block_recalibrateEstimatesForSampleTypeAtDateCompletion completion)recalibrateEstimatesForSampleType:atDate:completion: Recalibrates the prediction algorithm used for this sample type.voidrequestAuthorizationToShareTypesReadTypesCompletion(@Nullable NSSet<? extends HKSampleType> typesToShare, @Nullable NSSet<? extends HKObjectType> typesToRead, @NotNull HKHealthStore.Block_requestAuthorizationToShareTypesReadTypesCompletion completion)requestAuthorizationToShareTypes:readTypes:completion: Prompts the user to authorize the application for reading and saving objects of the given types.voidrequestPerObjectReadAuthorizationForTypePredicateCompletion(@NotNull HKObjectType objectType, @Nullable NSPredicate predicate, @NotNull HKHealthStore.Block_requestPerObjectReadAuthorizationForTypePredicateCompletion completion)requestPerObjectReadAuthorizationForType:predicate:completion: For types that support per object authorization (like vision prescriptions), prompts the user to select the objects for which they want to grant your app access.static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)voidsaveObjectsWithCompletion(@NotNull NSArray<? extends HKObject> objects, @NotNull HKHealthStore.Block_saveObjectsWithCompletion completion)saveObjects:withCompletion: Saves an array of HKObjects.voidsaveObjectWithCompletion(@NotNull HKObject object, @NotNull HKHealthStore.Block_saveObjectWithCompletion completion)saveObject:withCompletion: Saves an HKObject.voidsetAuthorizationViewControllerPresenter(@Nullable UIViewController value)[@property] authorizationViewControllerPresenter The view controller from which HealthKit authorization sheets will be presented This property can be set before requesting authorization or running a query like HKDocumentQuery for a better user-experience.voidsetAuthorizationViewControllerPresenter_unsafe(@Nullable UIViewController value)[@property] authorizationViewControllerPresenter The view controller from which HealthKit authorization sheets will be presented This property can be set before requesting authorization or running a query like HKDocumentQuery for a better user-experience.static voidsetVersion_static(long aVersion)voidsetWorkoutSessionMirroringStartHandler(@Nullable HKHealthStore.Block_setWorkoutSessionMirroringStartHandler value)[@property] workoutSessionMirroringStartHandler Called when a session has started mirroring.voidsplitTotalEnergyStartDateEndDateResultsHandler(@NotNull HKQuantity totalEnergy, @NotNull NSDate startDate, @NotNull NSDate endDate, @NotNull HKHealthStore.Block_splitTotalEnergyStartDateEndDateResultsHandler resultsHandler)Deprecated.voidstartWatchAppWithWorkoutConfigurationCompletion(@NotNull HKWorkoutConfiguration workoutConfiguration, @NotNull HKHealthStore.Block_startWatchAppWithWorkoutConfigurationCompletion completion)startWatchAppWithWorkoutConfiguration:completion: Launches or wakes up the WatchKit app on the watch This method will launch the WatchKit app corresponding to the calling iOS application on the currently active Apple Watch.voidstopQuery(@NotNull HKQuery query)stopQuery: Stops a query that is executing from continuing to run.static org.moe.natj.objc.Classsuperclass_static()booleansupportsHealthRecords()supportsHealthRecords Returns YES if the Health Records feature is available.static booleanuseStoredAccessor()Deprecated.static longversion_static()@Nullable HKWheelchairUseObjectwheelchairUseWithError(@Nullable org.moe.natj.general.ptr.Ptr<NSError> error)wheelchairUseWithError: Returns an object encapsulating the user's wheelchair use.@Nullable HKHealthStore.Block_workoutSessionMirroringStartHandler_retworkoutSessionMirroringStartHandler()[@property] workoutSessionMirroringStartHandler Called when a session has started mirroring.-
Methods inherited from class apple.NSObject
accessibilityActivate, accessibilityActivateBlock, accessibilityActivationPoint, accessibilityActivationPointBlock, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedHintBlock, accessibilityAttributedLabel, accessibilityAttributedLabelBlock, accessibilityAttributedUserInputLabels, accessibilityAttributedUserInputLabelsBlock, accessibilityAttributedValue, accessibilityAttributedValueBlock, accessibilityContainerType, accessibilityContainerTypeBlock, accessibilityCustomActions, accessibilityCustomActionsBlock, accessibilityCustomRotors, accessibilityCustomRotorsBlock, accessibilityDecrement, accessibilityDecrementBlock, accessibilityDirectTouchOptions, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsBlock, accessibilityElementsHidden, accessibilityElementsHiddenBlock, accessibilityFrame, accessibilityFrameBlock, accessibilityHeaderElementsBlock, accessibilityHint, accessibilityHintBlock, accessibilityIdentifierBlock, accessibilityIncrement, accessibilityIncrementBlock, accessibilityLabel, accessibilityLabelBlock, accessibilityLanguage, accessibilityLanguageBlock, accessibilityMagicTapBlock, accessibilityNavigationStyle, accessibilityNavigationStyleBlock, accessibilityPath, accessibilityPathBlock, accessibilityPerformEscape, accessibilityPerformEscapeBlock, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityRespondsToUserInteractionBlock, accessibilityScroll, accessibilityShouldGroupAccessibilityChildrenBlock, accessibilityTextualContext, accessibilityTextualContextBlock, accessibilityTraits, accessibilityTraitsBlock, accessibilityUserInputLabels, accessibilityUserInputLabelsBlock, accessibilityValue, accessibilityValueBlock, accessibilityViewIsModal, accessibilityViewIsModalBlock, accessibilityZoomInAtPoint, accessibilityZoomOutAtPoint, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, automationElements, automationElementsBlock, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hash, indexOfAccessibilityElement, isAccessibilityElement, isAccessibilityElementBlock, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivateBlock, setAccessibilityActivationPoint, setAccessibilityActivationPointBlock, setAccessibilityAttributedHint, setAccessibilityAttributedHintBlock, setAccessibilityAttributedLabel, setAccessibilityAttributedLabelBlock, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedUserInputLabelsBlock, setAccessibilityAttributedValue, setAccessibilityAttributedValueBlock, setAccessibilityContainerType, setAccessibilityContainerTypeBlock, setAccessibilityCustomActions, setAccessibilityCustomActionsBlock, setAccessibilityCustomRotors, setAccessibilityCustomRotorsBlock, setAccessibilityDecrementBlock, setAccessibilityDirectTouchOptions, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsBlock, setAccessibilityElementsHidden, setAccessibilityElementsHiddenBlock, setAccessibilityFrame, setAccessibilityFrameBlock, setAccessibilityHeaderElementsBlock, setAccessibilityHint, setAccessibilityHintBlock, setAccessibilityIdentifierBlock, setAccessibilityIncrementBlock, setAccessibilityLabel, setAccessibilityLabelBlock, setAccessibilityLanguage, setAccessibilityLanguageBlock, setAccessibilityMagicTapBlock, setAccessibilityNavigationStyle, setAccessibilityNavigationStyleBlock, setAccessibilityPath, setAccessibilityPathBlock, setAccessibilityPerformEscapeBlock, setAccessibilityRespondsToUserInteraction, setAccessibilityRespondsToUserInteractionBlock, setAccessibilityShouldGroupAccessibilityChildrenBlock, setAccessibilityTextualContext, setAccessibilityTextualContextBlock, setAccessibilityTraits, setAccessibilityTraitsBlock, setAccessibilityUserInputLabels, setAccessibilityUserInputLabelsBlock, setAccessibilityValue, setAccessibilityValueBlock, setAccessibilityViewIsModal, setAccessibilityViewIsModalBlock, setAutomationElements, setAutomationElementsBlock, setIsAccessibilityElement, setIsAccessibilityElementBlock, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, storedValueForKey, superclass, takeStoredValueForKey, takeValueForKey, takeValueForKeyPath, takeValuesFromDictionary, unableToSetNilForKey, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, valuesForKeys, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
alloc
public static HKHealthStore alloc()
-
allocWithZone
public static HKHealthStore allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(@NotNull @NotNull java.lang.String key)
-
cancelPreviousPerformRequestsWithTarget
public static void cancelPreviousPerformRequestsWithTarget(@NotNull @NotNull java.lang.Object aTarget)
-
cancelPreviousPerformRequestsWithTargetSelectorObject
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(@NotNull @NotNull java.lang.Object aTarget, @NotNull @NotNull org.moe.natj.objc.SEL aSelector, @Nullable @Nullable java.lang.Object anArgument)
-
classFallbacksForKeyedArchiver
@NotNull public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
-
classForKeyedUnarchiver
@NotNull public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
-
debugDescription_static
public static java.lang.String debugDescription_static()
-
description_static
public static java.lang.String description_static()
-
hash_static
public static long hash_static()
-
instanceMethodForSelector
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
-
instanceMethodSignatureForSelector
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
-
instancesRespondToSelector
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
-
isHealthDataAvailable
public static boolean isHealthDataAvailable()
isHealthDataAvailable Returns YES if HealthKit is supported on the device. HealthKit is not supported on all iOS devices. Using HKHealthStore APIs on devices which are not supported will result in errors with the HKErrorHealthDataUnavailable code. Call isHealthDataAvailable before attempting to use other parts of the framework.
-
isSubclassOfClass
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
-
keyPathsForValuesAffectingValueForKey
@NotNull public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(@NotNull @NotNull java.lang.String key)
-
new_objc
public static HKHealthStore new_objc()
-
resolveClassMethod
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
-
resolveInstanceMethod
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
-
setVersion_static
public static void setVersion_static(long aVersion)
-
superclass_static
public static org.moe.natj.objc.Class superclass_static()
-
version_static
public static long version_static()
-
addSamplesToWorkoutCompletion
@Deprecated public void addSamplesToWorkoutCompletion(@NotNull @NotNull NSArray<? extends HKSample> samples, @NotNull @NotNull HKWorkout workout, @NotNull @NotNull HKHealthStore.Block_addSamplesToWorkoutCompletion completion)Deprecated.addSamples:toWorkout:completion: Associates samples with a given workout. This will associate the given samples with the given workout. These samples will then be returned by a query that contains this workout as a predicate. If a sample is added that is not saved yet, then it will be saved for you. Note that the sample will be saved without an HKDevice. The workout provided must be one that has already been saved to HealthKit. API-Since: 8.0 Deprecated-Since: 17.0 Deprecated-Message: Use HKWorkoutBuilder
-
authorizationStatusForType
public long authorizationStatusForType(@NotNull @NotNull HKObjectType type)authorizationStatusForType: Returns the application's authorization status for the given object type.
-
biologicalSexWithError
@Nullable public @Nullable HKBiologicalSexObject biologicalSexWithError(@Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
biologicalSexWithError: Returns an object encapsulating the user's biological sex. Before calling this method, the application should request authorization to access objects with the HKCharacteristicType identified by HKCharacteristicTypeIdentifierBiologicalSex.
-
bloodTypeWithError
@Nullable public @Nullable HKBloodTypeObject bloodTypeWithError(@Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
bloodTypeWithError: Returns an object encapsulating the user's blood type. Before calling this method, the application should request authorization to access objects with the HKCharacteristicType identified by HKCharacteristicTypeIdentifierBloodType.
-
dateOfBirthComponentsWithError
@Nullable public @Nullable NSDateComponents dateOfBirthComponentsWithError(@Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
dateOfBirthComponentsWithError: Returns the user's date of birth in the Gregorian calendar. Before calling this method, the application should request authorization to access objects with the HKCharacteristicType identified by HKCharacteristicTypeIdentifierDateOfBirth. API-Since: 10.0
-
dateOfBirthWithError
@Nullable @Deprecated public @Nullable NSDate dateOfBirthWithError(@Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
Deprecated.API-Since: 8.0 Deprecated-Since: 10.0
-
deleteObjectWithCompletion
public void deleteObjectWithCompletion(@NotNull @NotNull HKObject object, @NotNull @NotNull HKHealthStore.Block_deleteObjectWithCompletion completion)deleteObject:withCompletion: Deletes a single HKObject from the HealthKit database. See deleteObjects:withCompletion:.
-
deleteObjectsWithCompletion
public void deleteObjectsWithCompletion(@NotNull @NotNull NSArray<? extends HKObject> objects, @NotNull @NotNull HKHealthStore.Block_deleteObjectsWithCompletion completion)deleteObjects:withCompletion: Deletes multiple HKObjects from the HealthKit database. An application may only delete objects that it previously saved. This operation is performed asynchronously and the completion will be executed on an arbitrary background queue. API-Since: 9.0
-
deleteObjectsOfTypePredicateWithCompletion
public void deleteObjectsOfTypePredicateWithCompletion(@NotNull @NotNull HKObjectType objectType, @NotNull @NotNull NSPredicate predicate, @NotNull @NotNull HKHealthStore.Block_deleteObjectsOfTypePredicateWithCompletion completion)deleteObjectsOfType:predicate:withCompletion: Deletes all objects matching the given predicate from the HealthKit database. An application may only delete objects that it previously saved. This operation is performed asynchronously and the completion will be executed on an arbitrary background queue. API-Since: 9.0
-
disableAllBackgroundDeliveryWithCompletion
public void disableAllBackgroundDeliveryWithCompletion(@NotNull @NotNull HKHealthStore.Block_disableAllBackgroundDeliveryWithCompletion completion)
-
disableBackgroundDeliveryForTypeWithCompletion
public void disableBackgroundDeliveryForTypeWithCompletion(@NotNull @NotNull HKObjectType type, @NotNull @NotNull HKHealthStore.Block_disableBackgroundDeliveryForTypeWithCompletion completion)
-
earliestPermittedSampleDate
@NotNull public @NotNull NSDate earliestPermittedSampleDate()
earliestPermittedSampleDate Samples prior to the earliestPermittedSampleDate cannot be saved or queried. On some platforms, only samples with end dates newer than the value returned by earliestPermittedSampleDate may be saved or retrieved. API-Since: 9.0
-
enableBackgroundDeliveryForTypeFrequencyWithCompletion
public void enableBackgroundDeliveryForTypeFrequencyWithCompletion(@NotNull @NotNull HKObjectType type, long frequency, @NotNull @NotNull HKHealthStore.Block_enableBackgroundDeliveryForTypeFrequencyWithCompletion completion)enableBackgroundDeliveryForType:frequency:withCompletion: This method enables activation of your app when data of the type is recorded at the cadence specified. When an app has subscribed to a certain data type it will get activated at the cadence that is specified with the frequency parameter. The app is still responsible for creating an HKObserverQuery to know which data types have been updated and the corresponding fetch queries. Note that certain data types (such as HKQuantityTypeIdentifierStepCount) have a minimum frequency of HKUpdateFrequencyHourly. This is enforced transparently to the caller.
-
executeQuery
public void executeQuery(@NotNull @NotNull HKQuery query)executeQuery: Begins executing the given query. After executing a query, the completion, update, and/or results handlers of that query will be invoked asynchronously on an arbitrary background queue as results become available. Errors that prevent a query from executing will be delivered to one of the query's handlers. Which handler the error will be delivered to is defined by the HKQuery subclass. Each HKQuery instance may only be executed once and calling this method with a currently executing query or one that was previously executed will result in an exception. If a query would retrieve objects with an HKObjectType property, then the application must request authorization to access objects of that type before executing the query.
-
fitzpatrickSkinTypeWithError
@Nullable public @Nullable HKFitzpatrickSkinTypeObject fitzpatrickSkinTypeWithError(@Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
fitzpatrickSkinTypeWithError: Returns an object encapsulating the user's Fitzpatrick skin type. Before calling this method, the application should request authorization to access objects with the HKCharacteristicType identified by HKCharacteristicTypeIdentifierFitzpatrickSkinType. API-Since: 9.0
-
handleAuthorizationForExtensionWithCompletion
public void handleAuthorizationForExtensionWithCompletion(@NotNull @NotNull HKHealthStore.Block_handleAuthorizationForExtensionWithCompletion completion)handleAuthorizationForExtensionWithCompletion: Prompts the user to authorize the application for reading and saving objects. When an app extension calls requestAuthorizationToShareTypes:readTypes:completion:, the parent application is responsible for calling this method to prompt the user to authorize the app and its extensions for the types that the extension requested access to. The request is performed asynchronously and its completion will be executed on an arbitrary background queue after the user has responded. The success parameter of the completion indicates whether prompting the user, if necessary, completed successfully and was not cancelled by the user. It does NOT indicate whether the application was granted authorization. API-Since: 9.0
-
init
public HKHealthStore init()
-
preferredUnitsForQuantityTypesCompletion
public void preferredUnitsForQuantityTypesCompletion(@NotNull @NotNull NSSet<? extends HKQuantityType> quantityTypes, @NotNull @NotNull HKHealthStore.Block_preferredUnitsForQuantityTypesCompletion completion)preferredUnitsForQuantityTypes:completion: Calls the completion with the preferred HKUnits for a given set of HKQuantityTypes. A preferred unit is either the unit that the user has chosen in Health for displaying samples of the given quantity type or the default unit for that type in the current locale of the device. To access the user's preferences it is necessary to request read or share authorization for the set of HKQuantityTypes provided. If neither read nor share authorization has been granted to the app, then the default unit for the locale is provided. An error will be returned when preferred units are inaccessible because protected health data is unavailable or authorization status is not determined for one or more of the provided types. The returned dictionary will map HKQuantityType to HKUnit. API-Since: 8.2
-
requestAuthorizationToShareTypesReadTypesCompletion
public void requestAuthorizationToShareTypesReadTypesCompletion(@Nullable @Nullable NSSet<? extends HKSampleType> typesToShare, @Nullable @Nullable NSSet<? extends HKObjectType> typesToRead, @NotNull @NotNull HKHealthStore.Block_requestAuthorizationToShareTypesReadTypesCompletion completion)requestAuthorizationToShareTypes:readTypes:completion: Prompts the user to authorize the application for reading and saving objects of the given types. Before attempting to execute queries or save objects, the application should first request authorization from the user to read and share every type of object for which the application may require access. The request is performed asynchronously and its completion will be executed on an arbitrary background queue after the user has responded. If the user has already chosen whether to grant the application access to all of the types provided, then the completion will be called without prompting the user. The success parameter of the completion indicates whether prompting the user, if necessary, completed successfully and was not cancelled by the user. It does NOT indicate whether the application was granted authorization. To customize the messages displayed on the authorization sheet, set the following keys in your app's Info.plist file. Set the NSHealthShareUsageDescription key to customize the message for reading data. Set the NSHealthUpdateUsageDescription key to customize the message for writing data.
-
saveObjectWithCompletion
public void saveObjectWithCompletion(@NotNull @NotNull HKObject object, @NotNull @NotNull HKHealthStore.Block_saveObjectWithCompletion completion)saveObject:withCompletion: Saves an HKObject. After an object is saved, on subsequent retrievals the sourceRevision property of the object will be set to the HKSourceRevision representing the version of the application that saved it. If the object has an HKObjectType property, then in order to save an object successfully the application must first request authorization to share objects with that type. Saving an object with the same unique identifier as another object that has already been saved will fail. When the application attempts to save multiple objects, if any single object cannot be saved then none of the objects will be saved. The operation will fail if the objects array contains samples with endDates that are older than the date returned by earliestPermittedSampleDate. This operation is performed asynchronously and the completion will be executed on an arbitrary background queue.
-
saveObjectsWithCompletion
public void saveObjectsWithCompletion(@NotNull @NotNull NSArray<? extends HKObject> objects, @NotNull @NotNull HKHealthStore.Block_saveObjectsWithCompletion completion)saveObjects:withCompletion: Saves an array of HKObjects. See discussion of saveObject:withCompletion:.
-
splitTotalEnergyStartDateEndDateResultsHandler
@Deprecated public void splitTotalEnergyStartDateEndDateResultsHandler(@NotNull @NotNull HKQuantity totalEnergy, @NotNull @NotNull NSDate startDate, @NotNull @NotNull NSDate endDate, @NotNull @NotNull HKHealthStore.Block_splitTotalEnergyStartDateEndDateResultsHandler resultsHandler)Deprecated.splitTotalEnergy:startDate:endDate:resultsHandler: For the time period specified, this method calculates the resting and active energy parts of the total energy provided. This method uses the user's metrics like age, biological sex, body mass and height to determine their basal metabolic rate. If the application does not have authorization to access these characteristics or if the user has not entered their data then this method uses builtin default values. API-Since: 9.0 Deprecated-Since: 11.0 Deprecated-Message: No longer supported
-
startWatchAppWithWorkoutConfigurationCompletion
public void startWatchAppWithWorkoutConfigurationCompletion(@NotNull @NotNull HKWorkoutConfiguration workoutConfiguration, @NotNull @NotNull HKHealthStore.Block_startWatchAppWithWorkoutConfigurationCompletion completion)startWatchAppWithWorkoutConfiguration:completion: Launches or wakes up the WatchKit app on the watch This method will launch the WatchKit app corresponding to the calling iOS application on the currently active Apple Watch. After launching, the handleWorkoutConfiguration: method on the WKExtensionDelegate protocol will be called with the HKWorkoutConfiguration as a parameter. The receiving Watch app can use this configuration object to create an HKWorkoutSession and start it with -startWorkoutSession:. API-Since: 10.0
-
stopQuery
public void stopQuery(@NotNull @NotNull HKQuery query)stopQuery: Stops a query that is executing from continuing to run. Calling this method will prevent the handlers of the query from being invoked in the future. If the query is already stopped, this method does nothing.
-
wheelchairUseWithError
@Nullable public @Nullable HKWheelchairUseObject wheelchairUseWithError(@Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
wheelchairUseWithError: Returns an object encapsulating the user's wheelchair use. Before calling this method, the application should request authorization to access objects with the HKCharacteristicType identified by HKCharacteristicTypeIdentifierWheelchairUse. API-Since: 10.0
-
getRequestStatusForAuthorizationToShareTypesReadTypesCompletion
public void getRequestStatusForAuthorizationToShareTypesReadTypesCompletion(@NotNull @NotNull NSSet<? extends HKSampleType> typesToShare, @NotNull @NotNull NSSet<? extends HKObjectType> typesToRead, @NotNull @NotNull HKHealthStore.Block_getRequestStatusForAuthorizationToShareTypesReadTypesCompletion completion)getRequestStatusForAuthorizationToShareTypes:readTypes:completion: Determines whether requesting authorization for the given types is necessary. Applications may call this method to determine whether the user would be prompted for authorization if the same collections of types are passed to requestAuthorizationToShareTypes:readTypes:completion:. This determination is performed asynchronously and its completion will be executed on an arbitrary background queue. API-Since: 12.0
-
supportsHealthRecords
public boolean supportsHealthRecords()
supportsHealthRecords Returns YES if the Health Records feature is available. The Health Records feature is not available in all regions but may be present in unsupported regions if accounts have already been configured. This can change as accounts are modified during device restore or synchronization. Call supportsHealthRecords before attempting to request authorization for any clinical types. API-Since: 12.0
-
activityMoveModeWithError
@Nullable public @Nullable HKActivityMoveModeObject activityMoveModeWithError(@Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
activityMoveModeWithError: Returns an object encapsulating the user's activity move mode Before calling this method, the application should request authorization to access objects with the HKCharacteristicType identified by HKCharacteristicTypeIdentifierActivityMoveMode. API-Since: 14.0
-
recalibrateEstimatesForSampleTypeAtDateCompletion
public void recalibrateEstimatesForSampleTypeAtDateCompletion(@NotNull @NotNull HKSampleType sampleType, @NotNull @NotNull NSDate date, @NotNull @NotNull HKHealthStore.Block_recalibrateEstimatesForSampleTypeAtDateCompletion completion)recalibrateEstimatesForSampleType:atDate:completion: Recalibrates the prediction algorithm used for this sample type. Check -[HKSampleType allowsRecalibrationForEstimates] to see if a given sample type is supported. Calling this method results in first-party estimation algorithms to recalibrate what data is used when generating values for HKSamples of this sampleType. API-Since: 15.0
-
requestPerObjectReadAuthorizationForTypePredicateCompletion
public void requestPerObjectReadAuthorizationForTypePredicateCompletion(@NotNull @NotNull HKObjectType objectType, @Nullable @Nullable NSPredicate predicate, @NotNull @NotNull HKHealthStore.Block_requestPerObjectReadAuthorizationForTypePredicateCompletion completion)requestPerObjectReadAuthorizationForType:predicate:completion: For types that support per object authorization (like vision prescriptions), prompts the user to select the objects for which they want to grant your app access. Before attempting to execute queries, the application should first request authorization from the user to read objects for which the application may require access. The request is performed asynchronously, and its completion will be executed on an arbitrary background queue after the user has responded. The user will always be prompted to provide access to objects regardless of whether access had been previously provided. The user can choose to toggle each object's access with each prompt. The success parameter of the completion indicates whether prompting the user completed successfully and was not cancelled. It does NOT indicate whether the application was granted authorization. API-Since: 16.0
-
authorizationViewControllerPresenter
@Nullable public @Nullable UIViewController authorizationViewControllerPresenter()
[@property] authorizationViewControllerPresenter The view controller from which HealthKit authorization sheets will be presented This property can be set before requesting authorization or running a query like HKDocumentQuery for a better user-experience. Since this property will ensure to infer the correct hosting view controller to show the authorization sheet. API-Since: 17.0
-
setAuthorizationViewControllerPresenter_unsafe
public void setAuthorizationViewControllerPresenter_unsafe(@Nullable @Nullable UIViewController value)[@property] authorizationViewControllerPresenter The view controller from which HealthKit authorization sheets will be presented This property can be set before requesting authorization or running a query like HKDocumentQuery for a better user-experience. Since this property will ensure to infer the correct hosting view controller to show the authorization sheet. API-Since: 17.0
-
setAuthorizationViewControllerPresenter
public void setAuthorizationViewControllerPresenter(@Nullable @Nullable UIViewController value)[@property] authorizationViewControllerPresenter The view controller from which HealthKit authorization sheets will be presented This property can be set before requesting authorization or running a query like HKDocumentQuery for a better user-experience. Since this property will ensure to infer the correct hosting view controller to show the authorization sheet. API-Since: 17.0
-
setWorkoutSessionMirroringStartHandler
public void setWorkoutSessionMirroringStartHandler(@Nullable @Nullable HKHealthStore.Block_setWorkoutSessionMirroringStartHandler value)[@property] workoutSessionMirroringStartHandler Called when a session has started mirroring. This property should always be assigned a value promptly after your app is launched, to ensure it is always observing for incoming mirrored workout sessions. If your app is not active when a mirrored session starts, it will be launched in the background and given a one-time permission to start a Live Activity from the background. The assigned block will be executed on an arbitrary background queue. API-Since: 17.0
-
useStoredAccessor
@Deprecated public static boolean useStoredAccessor()
Deprecated.
-
workoutSessionMirroringStartHandler
@Nullable public @Nullable HKHealthStore.Block_workoutSessionMirroringStartHandler_ret workoutSessionMirroringStartHandler()
[@property] workoutSessionMirroringStartHandler Called when a session has started mirroring. This property should always be assigned a value promptly after your app is launched, to ensure it is always observing for incoming mirrored workout sessions. If your app is not active when a mirrored session starts, it will be launched in the background and given a one-time permission to start a Live Activity from the background. The assigned block will be executed on an arbitrary background queue. API-Since: 17.0
-
-