Class NSFileProviderManager

  • All Implemented Interfaces:
    NSObject

    public class NSFileProviderManager
    extends NSObject
    The file provider manager allows you to communicate with the file provider framework for purposes that may be relevant from both the extension and the containing application (or sibling extensions). The file provider framework will invoke your file provider extension in response to those calls if appropriate. The class also provides methods to manage provider domains. Each domain has a corresponding manager.
    • Constructor Detail

      • NSFileProviderManager

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static java.lang.Object allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(java.lang.Object aTarget,
                                                                                 org.moe.natj.objc.SEL aSelector,
                                                                                 java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        public static org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • defaultManager

        public static NSFileProviderManager defaultManager()
        Return the manager responsible for the default domain.
      • description_static

        public static java.lang.String description_static()
      • documentStorageURL

        public NSURL documentStorageURL()
        The root URL for provided documents. This URL is derived by consulting the NSExtensionFileProviderDocumentGroup property on your extension. The document storage URL is the folder "File Provider Storage" in the corresponding container. If the NSExtensionFileProviderDocumentGroup property is not set, calling this method will result in an error.
      • hash_static

        public static long hash_static()
      • 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

        public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(java.lang.String key)
      • new_objc

        public static java.lang.Object new_objc()
      • placeholderURLForURL

        public static NSURL placeholderURLForURL​(NSURL url)
        Returns the designated placeholder URL for a given file URL. Used in conjunction with writePlaceholderAtURL.
      • providerIdentifier

        public java.lang.String providerIdentifier()
        The purpose identifier of your file provider extension. A coordination using a file coordinator with this purpose identifier set will not trigger your file provider extension. You can use this to e.g. perform speculative work on behalf of the file provider from the main app.
      • registerURLSessionTaskForItemWithIdentifierCompletionHandler

        public void registerURLSessionTaskForItemWithIdentifierCompletionHandler​(NSURLSessionTask task,
                                                                                 java.lang.String identifier,
                                                                                 NSFileProviderManager.Block_registerURLSessionTaskForItemWithIdentifierCompletionHandler completion)
        Registers the given NSURLSessionTask to be responsible for the specified item. A given item can only have one task registered at a time. The task must be suspended at the time of calling. The task's progress is displayed on the item when the task is executed.
      • 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)
      • signalEnumeratorForContainerItemIdentifierCompletionHandler

        public void signalEnumeratorForContainerItemIdentifierCompletionHandler​(java.lang.String containerItemIdentifier,
                                                                                NSFileProviderManager.Block_signalEnumeratorForContainerItemIdentifierCompletionHandler completion)
        Call this method either in the app or in the extension to trigger an enumeration, typically in response to a push. Set the containerItemIdentifier to the identifier of the enumerated container that was specified in -[NSFileProviderExtension enumeratorForContainerItemIdentifier:error:] This will trigger another call to -[NSFileProviderEnumerator enumerateChangesForObserver:fromSyncAnchor:] and the UI will be refreshed, giving the user live updates on the presented enumeration. If you have a change in the working set, call this method with containerItemIdentifier set to NSFileProviderWorkingSetContainerItemIdentifier, even if there is no live enumeration for this item. The working set is cached on the device and it's important to keep the cache in sync. In addition to using this method, your application/extension can register for pushes using the PKPushTypeFileProvider push type. Pushes of the form { container-identifier = "" domain = "" } with a topic of ".pushkit.fileprovider" will be translated into a call to signalEnumeratorForContainerItemIdentifier:completionHandler:.
      • superclass_static

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

        public static long version_static()
      • writePlaceholderAtURLWithMetadataError

        public static boolean writePlaceholderAtURLWithMetadataError​(NSURL placeholderURL,
                                                                     NSFileProviderItem metadata,
                                                                     org.moe.natj.general.ptr.Ptr<NSError> error)
        Writes out a placeholder at the specified URL. The placeholder is used in place of the actual file for operations that do not require the file's actual data to be on disk: - if attributes are requested by an application via the getPromisedItemResourceValue: method on NSURL - or via a coordination with the NSFileCoordinatorReadingImmediatelyAvailableMetadataOnly flag set - to verify whether an application has access to a file Your extension should provide placeholders by implementing the providePlaceholderAtURL: method, but your application may choose to proactively write out placeholders to facilitate access to files. This is especially useful if your application wants to actively hand out a file URL, e.g. using UIActivityViewController, in which case it should ensure that either the file or a placeholder is present on disk first. The path of the placeholder is fixed and must be determined in advance by calling the placeholderURLForURL: method.