Class HKAttachmentStore

  • All Implemented Interfaces:
    NSObject

    public class HKAttachmentStore
    extends NSObject
    HKAttachmentStore The HKAttachmentStore class provides an interface for accessing and storing HKAttachment objects. API-Since: 16.0
    • Constructor Detail

      • HKAttachmentStore

        protected HKAttachmentStore​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • addAttachmentToObjectNameContentTypeURLMetadataCompletion

        public void addAttachmentToObjectNameContentTypeURLMetadataCompletion​(@NotNull
                                                                              @NotNull HKObject object,
                                                                              @NotNull
                                                                              @NotNull java.lang.String name,
                                                                              @NotNull
                                                                              @NotNull UTType contentType,
                                                                              @NotNull
                                                                              @NotNull NSURL URL,
                                                                              @Nullable
                                                                              @Nullable NSDictionary<java.lang.String,​?> metadata,
                                                                              @NotNull
                                                                              @NotNull HKAttachmentStore.Block_addAttachmentToObjectNameContentTypeURLMetadataCompletion completion)
        addAttachmentToObject:name:contentType:URL:metadata:completion: Creates a new HKAttachment using the passed in NSURL and attaches it to the specified HKObject.
        Parameters:
        object - The object for which to add the HKAttachment.
        name - The name of the attachment.
        contentType - The content type of the attachment.
        URL - The NSURL to use to create the attachment.
        metadata - Extra information describing the attachment.
        completion - Called with an HKAttachment instance once the file was successfully saved and attached, otherwise called with an error.
      • allocWithZone

        public static HKAttachmentStore 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()
      • getAttachmentsForObjectCompletion

        public void getAttachmentsForObjectCompletion​(@NotNull
                                                      @NotNull HKObject object,
                                                      @NotNull
                                                      @NotNull HKAttachmentStore.Block_getAttachmentsForObjectCompletion completion)
        getAttachmentsForObject:completion: Retrieves a list of attachments for a given object.
        Parameters:
        object - The object for which to retrieve attachments.
        completion - Called with a list of attachments or an error.
      • getDataForAttachmentCompletion

        @NotNull
        public @NotNull NSProgress getDataForAttachmentCompletion​(@NotNull
                                                                  @NotNull HKAttachment attachment,
                                                                  @NotNull
                                                                  @NotNull HKAttachmentStore.Block_getDataForAttachmentCompletion completion)
        getDataForAttachment:completion: Retrieves the NSData for the given HKAttachment. Prefer @c streamDataForAttachment:completion: for large files that support incremental reading to limit your app's peak memory usage. The attachment's data may not always be available locally, and could be stored in iCloud.
        Parameters:
        attachment - The attachment object to read data from.
        completion - Called with an NSData or an error.
        Returns:
        An NSProgress object to use for tracking the progress of downloading the attachment's data from iCloud.
      • hash_static

        public static long hash_static()
      • initWithHealthStore

        public HKAttachmentStore initWithHealthStore​(@NotNull
                                                     @NotNull HKHealthStore healthStore)
        initWithHealthStore: The designated initializer to create an HKAttachmentStore.
        Parameters:
        healthStore - Specifies the HKHealthStore object to use.
      • 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)
      • removeAttachmentFromObjectCompletion

        public void removeAttachmentFromObjectCompletion​(@NotNull
                                                         @NotNull HKAttachment attachment,
                                                         @NotNull
                                                         @NotNull HKObject object,
                                                         @NotNull
                                                         @NotNull HKAttachmentStore.Block_removeAttachmentFromObjectCompletion completion)
        removeAttachment:fromObject:completion: Removes the given HKAttachment from the specified HKObject.
        Parameters:
        attachment - The HKAttachment to be removed.
        object - The object from which to remove the attachment.
        completion - Called once the remove operation finishes.
      • 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)
      • streamDataForAttachmentDataHandler

        @NotNull
        public @NotNull NSProgress streamDataForAttachmentDataHandler​(@NotNull
                                                                      @NotNull HKAttachment attachment,
                                                                      @NotNull
                                                                      @NotNull HKAttachmentStore.Block_streamDataForAttachmentDataHandler dataHandler)
        streamDataForAttachment:dataHandler: Streams the given HKAttachment's data as ordered NSData chunks. The dataHandler's done parameter is set to YES when all chunks have been streamed. The attachment's data may not always be available locally, and could be stored in iCloud.
        Parameters:
        attachment - The attachment object to read data from.
        dataHandler - Called with an NSData chunk or an error. When done is YES, the operation has completed.
        Returns:
        An NSProgress object to use for tracking the progress of downloading the attachment's data from iCloud.
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • version_static

        public static long version_static()
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.