Package apple.healthkit
Class HKWorkoutBuilder
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.healthkit.HKWorkoutBuilder
-
- All Implemented Interfaces:
NSObject
public class HKWorkoutBuilder extends NSObject
HKWorkoutBuilder An HKWorkoutBuilder is used to incrementally create new workouts in the HealthKit database. Samples, events, and metadata may be added to a builder either during a live workout session or to create a workout that occurred in the past. Calling finishWorkoutWithCompletion: will create a new workout with samples, events, and metadata that have been provided. API-Since: 12.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceHKWorkoutBuilder.Block_addMetadataCompletionstatic interfaceHKWorkoutBuilder.Block_addSamplesCompletionstatic interfaceHKWorkoutBuilder.Block_addWorkoutActivityCompletionstatic interfaceHKWorkoutBuilder.Block_addWorkoutEventsCompletionstatic interfaceHKWorkoutBuilder.Block_beginCollectionWithStartDateCompletionstatic interfaceHKWorkoutBuilder.Block_endCollectionWithEndDateCompletionstatic interfaceHKWorkoutBuilder.Block_finishWorkoutWithCompletionstatic interfaceHKWorkoutBuilder.Block_updateActivityWithUUIDAddMedatataCompletionstatic interfaceHKWorkoutBuilder.Block_updateActivityWithUUIDEndDateCompletion-
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 protectedHKWorkoutBuilder(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()voidaddMetadataCompletion(@NotNull NSDictionary<java.lang.String,?> metadata, @NotNull HKWorkoutBuilder.Block_addMetadataCompletion completion)addMetadata:completion: Adds new metadata to the builder instance.voidaddSamplesCompletion(@NotNull NSArray<? extends HKSample> samples, @NotNull HKWorkoutBuilder.Block_addSamplesCompletion completion)addSamples:completion: Adds new samples to the builder instance.voidaddWorkoutActivityCompletion(@NotNull HKWorkoutActivity workoutActivity, @NotNull HKWorkoutBuilder.Block_addWorkoutActivityCompletion completion)addWorkoutActivity:completion: Adds a new workout activity to the builder instance.voidaddWorkoutEventsCompletion(@NotNull NSArray<? extends HKWorkoutEvent> workoutEvents, @NotNull HKWorkoutBuilder.Block_addWorkoutEventsCompletion completion)addWorkoutEvents:completion: Adds new workout events to the builder instance.static HKWorkoutBuilderalloc()static HKWorkoutBuilderallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)@NotNull NSDictionary<? extends HKQuantityType,? extends HKStatistics>allStatistics()[@property] allStatistics A dictionary of statistics per quantity type added to the builder This dictionary will contain HKStatistics objects containing the statistics by quantity sample type for all of the samples that have been added to the builder.static booleanautomaticallyNotifiesObserversForKey(@NotNull java.lang.String key)voidbeginCollectionWithStartDateCompletion(@NotNull NSDate startDate, @NotNull HKWorkoutBuilder.Block_beginCollectionWithStartDateCompletion completion)beginCollectionWithStartDate:error: Sets the workout start date and activates the workout builder.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()static java.lang.StringdebugDescription_static()static java.lang.Stringdescription_static()@Nullable HKDevicedevice()[@property] device The HKDevice to be associated with the workout.voiddiscardWorkout()discardWorkout Finishes building the workout and discards the result instead of saving it.doubleelapsedTimeAtDate(@NotNull NSDate date)elapsedTimeAtDate: The elapsed duration of the workout evaluated at the specified date.voidendCollectionWithEndDateCompletion(@NotNull NSDate endDate, @NotNull HKWorkoutBuilder.Block_endCollectionWithEndDateCompletion completion)endCollectionWithEndDate:error: Sets the workout end date and deactivates the workout builer.@Nullable NSDateendDate()[@property] endDate The end date for the workout, as provided by endCollectionWithEndDate:completion:voidfinishWorkoutWithCompletion(@NotNull HKWorkoutBuilder.Block_finishWorkoutWithCompletion completion)finishWorkoutWithCompletion: Creates and saves an HKWorkout using samples and events that have been added to workout previously.static longhash_static()HKWorkoutBuilderinit()HKWorkoutBuilderinitWithHealthStoreConfigurationDevice(@NotNull HKHealthStore healthStore, @NotNull HKWorkoutConfiguration configuration, @Nullable HKDevice device)initWithHealthStore:configuration:device: The designated initializer to create an HKWorkoutBuilder.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 booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static @NotNull NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(@NotNull java.lang.String key)@NotNull NSDictionary<java.lang.String,?>metadata()[@property] metadata The metadata that will be used when the workout is finished.static HKWorkoutBuildernew_objc()static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)@Nullable HKSeriesBuilderseriesBuilderForType(@NotNull HKSeriesType seriesType)seriesBuilderForType: Retrieves the associated series builder for the specified type.static voidsetVersion_static(long aVersion)@Nullable NSDatestartDate()[@property] startDate The start date for the workout, as provided by beginCollectionWithStartDate:completion:@Nullable HKStatisticsstatisticsForType(@NotNull HKQuantityType quantityType)statisticsForType: Returns an HKStatistics object containing the statistics for all the samples of the given type that have been added to the receiver.static org.moe.natj.objc.Classsuperclass_static()voidupdateActivityWithUUIDAddMedatataCompletion(@NotNull NSUUID UUID, @NotNull NSDictionary<java.lang.String,?> metadata, @NotNull HKWorkoutBuilder.Block_updateActivityWithUUIDAddMedatataCompletion completion)updateActivityWithUUID:addMetadata:completion: Adds new metadata to an already added activity.voidupdateActivityWithUUIDEndDateCompletion(@NotNull NSUUID UUID, @NotNull NSDate endDate, @NotNull HKWorkoutBuilder.Block_updateActivityWithUUIDEndDateCompletion completion)updateActivityWithUUID:endDate:completion: Sets the end date on an already added activity.static booleanuseStoredAccessor()Deprecated.static longversion_static()@NotNull NSArray<? extends HKWorkoutActivity>workoutActivities()[@property] workoutActivities Workout activities that have been added to the builder.@NotNull HKWorkoutConfigurationworkoutConfiguration()[@property] workoutConfiguration The configuration for the workout being built.@NotNull NSArray<? extends HKWorkoutEvent>workoutEvents()[@property] workoutEvents Workout events that have been added to the builder.-
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()
-
addMetadataCompletion
public void addMetadataCompletion(@NotNull @NotNull NSDictionary<java.lang.String,?> metadata, @NotNull @NotNull HKWorkoutBuilder.Block_addMetadataCompletion completion)addMetadata:completion: Adds new metadata to the builder instance. This method can be called more than once; each time the newly provided metadata will be merged with previously added metadata in the same manner as -[NSMutableDictionary addEntriesFromDictionary:]. This operation is performed asynchronously and the completion will be executed on an arbitrary background queue.- Parameters:
metadata- The metadata to add to the workout.completion- Block to be called when the addition of metadata to the builder is complete. If success is YES, the metadata has been added to the builder successfully. If success is NO, error will be non-null and will contain the error encountered during the insertion operation. When an error occurs, the builder's metadata property will remain unchanged.
-
addSamplesCompletion
public void addSamplesCompletion(@NotNull @NotNull NSArray<? extends HKSample> samples, @NotNull @NotNull HKWorkoutBuilder.Block_addSamplesCompletion completion)addSamples:completion: Adds new samples to the builder instance. This method can be called multiple times to add samples incrementally to the builder. The samples will be saved to the database if they have not already been saved. The constraints of -[HKHealthStore saveObject:withCompletion:] apply to this method as well. The start date of the samples must be later than the start date of the receiver. It is an error to call this method after finishWorkoutWithCompletion: has been called. This operation is performed asynchronously and the completion will be executed on an arbitrary background queue.- Parameters:
samples- The samples to add to the workout.completion- Block to be called when the insertion is complete. If success is YES, the samples were added to the builder successfully. If success is NO, error will be non-nil and contain the error encountered while adding the new samples.
-
addWorkoutEventsCompletion
public void addWorkoutEventsCompletion(@NotNull @NotNull NSArray<? extends HKWorkoutEvent> workoutEvents, @NotNull @NotNull HKWorkoutBuilder.Block_addWorkoutEventsCompletion completion)addWorkoutEvents:completion: Adds new workout events to the builder instance. This method can be called many times to add workout events incrementally to the builder. It is an error to call this method after finishWorkoutWithCompletion: has been called. This operation is performed asynchronously and the completion will be executed on an arbitrary background queue.- Parameters:
workoutEvents- The events to add to the builder.completion- Block to be called when the addition of events to the builder is complete. If success is YES, the events were added to the builder successfully. If success is NO, error will be non-null and will contain the error encountered during the insertion operation.
-
alloc
public static HKWorkoutBuilder alloc()
-
allocWithZone
public static HKWorkoutBuilder allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(@NotNull @NotNull java.lang.String key)
-
beginCollectionWithStartDateCompletion
public void beginCollectionWithStartDateCompletion(@NotNull @NotNull NSDate startDate, @NotNull @NotNull HKWorkoutBuilder.Block_beginCollectionWithStartDateCompletion completion)beginCollectionWithStartDate:error: Sets the workout start date and activates the workout builder. Calling this method is required before any samples, events or metadata can be added to the builder.- Parameters:
startDate- The start date of the workout.completion- Called once data collection has started or has failed to start.
-
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()
-
device
@Nullable public @Nullable HKDevice device()
[@property] device The HKDevice to be associated with the workout.
-
discardWorkout
public void discardWorkout()
discardWorkout Finishes building the workout and discards the result instead of saving it. Samples that were added to the workout will not be deleted. Adding samples, events, and metadata to the receiver after discardWorkout has been called is an error.
-
elapsedTimeAtDate
public double elapsedTimeAtDate(@NotNull @NotNull NSDate date)elapsedTimeAtDate: The elapsed duration of the workout evaluated at the specified date. The duration does not include periods when the workout was paused, which are the intervals between pause and resume events.
-
endCollectionWithEndDateCompletion
public void endCollectionWithEndDateCompletion(@NotNull @NotNull NSDate endDate, @NotNull @NotNull HKWorkoutBuilder.Block_endCollectionWithEndDateCompletion completion)endCollectionWithEndDate:error: Sets the workout end date and deactivates the workout builer. Calling this method is required before you finish a workout builder.- Parameters:
endDate- The end date of the workout.completion- Called once data collection has stopped or has failed to stop.
-
endDate
@Nullable public @Nullable NSDate endDate()
[@property] endDate The end date for the workout, as provided by endCollectionWithEndDate:completion:
-
finishWorkoutWithCompletion
public void finishWorkoutWithCompletion(@NotNull @NotNull HKWorkoutBuilder.Block_finishWorkoutWithCompletion completion)finishWorkoutWithCompletion: Creates and saves an HKWorkout using samples and events that have been added to workout previously.- Parameters:
completion- Block to be called after the HKWorkout object has been created and saved. If the returned workout is nil, an error may have occurred in which case error will be non-nil. If both workout and error are nil then finishing the workout succeeded but the workout sample is not available because the device is locked.
-
hash_static
public static long hash_static()
-
init
public HKWorkoutBuilder init()
-
initWithHealthStoreConfigurationDevice
public HKWorkoutBuilder initWithHealthStoreConfigurationDevice(@NotNull @NotNull HKHealthStore healthStore, @NotNull @NotNull HKWorkoutConfiguration configuration, @Nullable @Nullable HKDevice device)
initWithHealthStore:configuration:device: The designated initializer to create an HKWorkoutBuilder. Creates a new HKWorkoutBuilder unconnected to any HKWorkoutSession or any sources of data.- Parameters:
healthStore- Specifies the HKHealthStore object to use for building the workout. The store is retained until the builder is finished and a workout has been saved or discarded.configuration- The workout configuration to be used.device- The HKDevice to attach to the resulting HKWorkout.
-
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)
-
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)
-
metadata
@NotNull public @NotNull NSDictionary<java.lang.String,?> metadata()
[@property] metadata The metadata that will be used when the workout is finished.
-
new_objc
public static HKWorkoutBuilder new_objc()
-
resolveClassMethod
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
-
resolveInstanceMethod
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
-
seriesBuilderForType
@Nullable public @Nullable HKSeriesBuilder seriesBuilderForType(@NotNull @NotNull HKSeriesType seriesType)
seriesBuilderForType: Retrieves the associated series builder for the specified type. Retrieves, and creates if it does not already exist, the series builder for the specified type. The series constructed with the returned builder will be associated with the workout when it is finished.- Parameters:
seriesType- The series type for which the builder should be retrieved.
-
setVersion_static
public static void setVersion_static(long aVersion)
-
startDate
@Nullable public @Nullable NSDate startDate()
[@property] startDate The start date for the workout, as provided by beginCollectionWithStartDate:completion:
-
statisticsForType
@Nullable public @Nullable HKStatistics statisticsForType(@NotNull @NotNull HKQuantityType quantityType)
statisticsForType: Returns an HKStatistics object containing the statistics for all the samples of the given type that have been added to the receiver. If there are no samples of the given type then nil is returned.- Parameters:
quantityType- The quantity type to gather statistics about.
-
superclass_static
public static org.moe.natj.objc.Class superclass_static()
-
version_static
public static long version_static()
-
workoutConfiguration
@NotNull public @NotNull HKWorkoutConfiguration workoutConfiguration()
[@property] workoutConfiguration The configuration for the workout being built.
-
workoutEvents
@NotNull public @NotNull NSArray<? extends HKWorkoutEvent> workoutEvents()
[@property] workoutEvents Workout events that have been added to the builder. New events that are added using addWorkoutEvents:completion: will be appended to this array once the completion is called.
-
addWorkoutActivityCompletion
public void addWorkoutActivityCompletion(@NotNull @NotNull HKWorkoutActivity workoutActivity, @NotNull @NotNull HKWorkoutBuilder.Block_addWorkoutActivityCompletion completion)addWorkoutActivity:completion: Adds a new workout activity to the builder instance. This method can be called many times to add workout activities incrementally to the builder. It is an error to call this method after finishWorkoutWithCompletion: has been called. This operation is performed asynchronously and the completion will be executed on an arbitrary background queue.- Parameters:
workoutActivity- The activity to add to the builder.completion- Block to be called when the addition of the activity to the builder is complete. If success is YES, the activity was added to the builder successfully. If success is NO, error will be non-null and will contain the error encountered during the insertion operation. API-Since: 16.0
-
allStatistics
@NotNull public @NotNull NSDictionary<? extends HKQuantityType,? extends HKStatistics> allStatistics()
[@property] allStatistics A dictionary of statistics per quantity type added to the builder This dictionary will contain HKStatistics objects containing the statistics by quantity sample type for all of the samples that have been added to the builder. API-Since: 16.0
-
updateActivityWithUUIDAddMedatataCompletion
public void updateActivityWithUUIDAddMedatataCompletion(@NotNull @NotNull NSUUID UUID, @NotNull @NotNull NSDictionary<java.lang.String,?> metadata, @NotNull @NotNull HKWorkoutBuilder.Block_updateActivityWithUUIDAddMedatataCompletion completion)updateActivityWithUUID:addMetadata:completion: Adds new metadata to an already added activity. This method can be called more than once; each time the newly provided metadata will be merged with previously added metadata in the same manner as -[NSMutableDictionary addEntriesFromDictionary:]. It is an error to call this method after finishWorkoutWithCompletion: has been called. This operation is performed asynchronously and the completion will be executed on an arbitrary background queue.- Parameters:
UUID- The UUID of the workout activity to update.metadata- The metadata to add to the workout activity.completion- Block to be called when the addition of metadata to the activity is complete. If success is YES, the metadata has been added to the activity successfully. If success is NO, error will be non-null and will contain the error encountered during the insertion operation. When an error occurs, the activity's metadata property will remain unchanged. API-Since: 16.0
-
updateActivityWithUUIDEndDateCompletion
public void updateActivityWithUUIDEndDateCompletion(@NotNull @NotNull NSUUID UUID, @NotNull @NotNull NSDate endDate, @NotNull @NotNull HKWorkoutBuilder.Block_updateActivityWithUUIDEndDateCompletion completion)updateActivityWithUUID:endDate:completion: Sets the end date on an already added activity. It is an error to call this method after finishWorkoutWithCompletion: has been called. This operation is performed asynchronously and the completion will be executed on an arbitrary background queue.- Parameters:
UUID- The UUID of the workout activity to update.endDate- The end date to set on the activitycompletion- Block to be called when the update of the end date on the activity is complete. If success is YES, the end date was set to the actvity successfully. If success is NO, error will be non-null and will contain the error encountered during the update operation. API-Since: 16.0
-
workoutActivities
@NotNull public @NotNull NSArray<? extends HKWorkoutActivity> workoutActivities()
[@property] workoutActivities Workout activities that have been added to the builder. New activities that are added using addWorkoutActivity:completion: will be appended to this array once the completion is called. API-Since: 16.0
-
useStoredAccessor
@Deprecated public static boolean useStoredAccessor()
Deprecated.
-
-