Skip to content

FileProvider macOS xcode13.0 rc

Alex Soto edited this page Sep 14, 2021 · 1 revision

#FileProvider.framework

diff -ruN /Applications/Xcode_13.0.0-beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderActions.h /Applications/Xcode_13.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderActions.h
--- /Applications/Xcode_13.0.0-beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderActions.h	2021-08-05 00:17:19.000000000 -0400
+++ /Applications/Xcode_13.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderActions.h	2021-03-16 04:44:11.000000000 -0400
@@ -11,13 +11,11 @@
 
 NS_ASSUME_NONNULL_BEGIN
 
-FILEPROVIDER_API_AVAILABILITY_V2_V3
 typedef NSString *NSFileProviderExtensionActionIdentifier NS_EXTENSIBLE_STRING_ENUM;
 
 /**
  This category encapsulates common user-driven actions on FileProvider's items.
  */
-FILEPROVIDER_API_AVAILABILITY_V2
 @interface NSFileProviderExtension (NSFileProviderActions)
 
 /**
@@ -34,7 +32,7 @@
    - filename (to fileURL's resource value for key NSURLNameKey)
    - creationDate (to NSURLCreationDateKey)
    - contentModificationDate (to NSURLContentModificationDateKey)
-   - contentType (to NSURLContentTypeKey)
+   - typeIdentifier (to NSURLTypeIdentifierKey)
    - documentSize (to NSURLTotalFileSizeKey on a flat file, or to the sum of the
      files sizes for a package)
    - capabilities
@@ -95,7 +93,7 @@
  - parentItemIdentifier (to the value passed in to this method)
  - filename (to directoryName)
  - creationDate (to the current date and time)
- - contentType (to "public.folder" - UTTypeFolder)
+ - typeIdentifier (to "public.folder")
  - childItemCount (to 0)
  - capabilities
 
diff -ruN /Applications/Xcode_13.0.0-beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderDefines.h /Applications/Xcode_13.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderDefines.h
--- /Applications/Xcode_13.0.0-beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderDefines.h	2021-08-07 05:22:26.000000000 -0400
+++ /Applications/Xcode_13.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderDefines.h	2021-08-03 21:51:56.000000000 -0400
@@ -5,10 +5,10 @@
 //  Copyright © 2017-2020 Apple Inc. All rights reserved.
 //
 
+#ifndef PREPROCESS_AVAILABILITY_MACROS
+
 // original API
-#define FILEPROVIDER_API_AVAILABILITY_V1 API_AVAILABLE(ios(8.0)) API_UNAVAILABLE(macos, macCatalyst) API_UNAVAILABLE(watchos, tvos)
-// original API that made it to macOS
-#define FILEPROVIDER_API_AVAILABILITY_V1_V2_V3 API_AVAILABLE(ios(8.0), macos(11.0)) API_UNAVAILABLE(macCatalyst) API_UNAVAILABLE(watchos, tvos)
+#define FILEPROVIDER_CLASS_AVAILABILITY API_AVAILABLE(ios(8.0)) API_UNAVAILABLE(macos, macCatalyst) API_UNAVAILABLE(watchos, tvos)
 // iOS API with file enumeration
 #define FILEPROVIDER_API_AVAILABILITY_V2 API_AVAILABLE(ios(11.0)) API_UNAVAILABLE(macos, macCatalyst) API_UNAVAILABLE(watchos, tvos)
 // iOS API with file enumeration and macOS API with FPFS
@@ -17,5 +17,7 @@
 #define FILEPROVIDER_API_AVAILABILITY_V3 API_AVAILABLE(macos(11.0)) API_UNAVAILABLE(watchos, tvos) API_UNAVAILABLE(ios, macCatalyst)
 // macOS API with first revision of FPFS
 #define FILEPROVIDER_API_AVAILABILITY_V3_1 API_AVAILABLE(macos(11.3)) API_UNAVAILABLE(watchos, tvos) API_UNAVAILABLE(ios, macCatalyst)
-// macOS API with second revision of FPFS
-#define FILEPROVIDER_API_AVAILABILITY_V4_0 API_AVAILABLE(macos(12.0)) API_UNAVAILABLE(watchos, tvos) API_UNAVAILABLE(ios, macCatalyst)
+
+#else
+// This file intentionally left blank.
+#endif
diff -ruN /Applications/Xcode_13.0.0-beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderDomain.h /Applications/Xcode_13.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderDomain.h
--- /Applications/Xcode_13.0.0-beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderDomain.h	2021-08-07 05:22:26.000000000 -0400
+++ /Applications/Xcode_13.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderDomain.h	2021-08-03 21:51:57.000000000 -0400
@@ -11,7 +11,6 @@
 
 NS_ASSUME_NONNULL_BEGIN
 
-FILEPROVIDER_API_AVAILABILITY_V2_V3
 typedef NSString *NSFileProviderDomainIdentifier NS_EXTENSIBLE_STRING_ENUM;
 
 /**
@@ -163,26 +162,6 @@
  */
 @property (readwrite, assign) NSFileProviderDomainTestingModes testingModes FILEPROVIDER_API_AVAILABILITY_V3_1;
 
-/**
- Identity of the backing store of the domain on the system.
-
- This property only applies for extensions that implement NSFileProviderReplicatedExtension.
-
- This provides an identifier that uniquely identifies the backing store used by the system for
- the domain. When this identifier has changed, the system has dropped its backing store and is
- building a new one.
-
- The system may decide to rebuild its backing store if it got corrupted. The backing store can also
- be rebuilt as a response to the provider calling `-[NSFileProviderManager reimportItemsBelowItemWithIdentifier:completionHandler:]`.
- It is guaranteed that calling reimport on the root item will cause the backing store to be rebuilt,
- but the system can also decide to do so when reimport is called on other items.
-
- When rebuilding the backing store, the system will invalidate any extension instance associated
- to that domain. As a consequence, the identity of the backing store associated with that domain
- is guaranteed to be stable for the lifetime of the NSFileProviderReplicatedExtension instance.
- */
-@property (nonatomic, readonly, nullable) NSData *backingStoreIdentity FILEPROVIDER_API_AVAILABILITY_V4_0;
-
 @end
 
 FILEPROVIDER_API_AVAILABILITY_V2
diff -ruN /Applications/Xcode_13.0.0-beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderEnumerating.h /Applications/Xcode_13.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderEnumerating.h
--- /Applications/Xcode_13.0.0-beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderEnumerating.h	2021-08-05 00:17:19.000000000 -0400
+++ /Applications/Xcode_13.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderEnumerating.h	2021-03-16 04:44:11.000000000 -0400
@@ -19,7 +19,6 @@
 
  The size of a sync anchor should not exceed a combined 500 bytes.
  */
-FILEPROVIDER_API_AVAILABILITY_V2_V3
 typedef NSData *NSFileProviderSyncAnchor NS_TYPED_EXTENSIBLE_ENUM;
 
 /**
@@ -29,7 +28,6 @@
 
  The size of a page should not exceed 500 bytes.
  */
-FILEPROVIDER_API_AVAILABILITY_V2_V3
 typedef NSData *NSFileProviderPage NS_TYPED_EXTENSIBLE_ENUM;
 
 FOUNDATION_EXPORT FILEPROVIDER_API_AVAILABILITY_V2_V3
@@ -37,7 +35,6 @@
 FOUNDATION_EXPORT FILEPROVIDER_API_AVAILABILITY_V2_V3
 NSFileProviderPage const NSFileProviderInitialPageSortedByName;
 
-FILEPROVIDER_API_AVAILABILITY_V2_V3
 @protocol NSFileProviderEnumerationObserver <NSObject>
 
 - (void)didEnumerateItems:(NSArray <id<NSFileProviderItem>> *)updatedItems;
@@ -64,13 +61,12 @@
  materialization of the folder by the system, ...). Each case has its own performance profile.
 
  By taking into account the suggested size, the enumeration will guarantee the best user experience possible. The
- system enforces a maximum of 100 times the suggested size.
+ system does not enforce the size of the page.
  */
 @property (nonatomic, readonly) NSInteger suggestedPageSize FILEPROVIDER_API_AVAILABILITY_V3;
 
 @end
 
-FILEPROVIDER_API_AVAILABILITY_V2_V3
 @protocol NSFileProviderChangeObserver <NSObject>
 
 /**
@@ -124,13 +120,13 @@
  enumerator, the enumerator should finish immediately and not wait for more incoming changes to enumerate.
 
  By taking into account the suggested size, the enumeration will guarantee the best user experience possible. The
- system enforces a maximum of 100 times the suggested size.
+ system does not enforce the size of the batch.
  */
 @property (nonatomic, readonly) NSInteger suggestedBatchSize FILEPROVIDER_API_AVAILABILITY_V3;
 
 @end
 
-FILEPROVIDER_API_AVAILABILITY_V2_V3
+
 @protocol NSFileProviderEnumerator <NSObject>
 
 - (void)invalidate;
@@ -189,13 +185,15 @@
  - continue enumerating pages, each time from the page returned in the previous
    enumeration, until finishEnumeratingUpToPage: is called with nextPage set to
    nil
- - enumerate changes starting from the sync anchor returned in (1), until
-   finishEnumeratingChangesUpToSyncAnchor: is called with the latest sync anchor.
-   If moreComing is YES, continue enumerating changes, using the latest sync anchor returned.
-   If moreComing is NO, stop enumerating.
- - When the extension calls -[NSFileProviderManager signalEnumeratorForContainerItemIdentifier:
-   completionHandler:] to signal more changes, the system will again enumerate changes,
-   starting at the latest known sync anchor from finishEnumeratingChangesUpToSyncAnchor.
+ - enumerate changes starting from the sync anchor returned in (1)
+ - continue enumerating changes, each time from the sync anchor returned in the
+   previous enumeration, until finishEnumeratingChangesUpToSyncAnchor: is called
+   with moreComing:NO
+
+ This method will be called again if you signal that there are more changes with
+ -[NSFileProviderManager signalEnumeratorForContainerItemIdentifier:
+ completionHandler:] and again, the system will enumerate changes until
+ finishEnumeratingChangesUpToSyncAnchor: is called with moreComing:NO.
 
  NOTE that the change-based observation methods are marked optional for historical
  reasons, but are really required. System performance will be severely degraded if
@@ -206,7 +204,6 @@
 
 @end
 
-FILEPROVIDER_API_AVAILABILITY_V2
 @interface NSFileProviderExtension (NSFileProviderEnumeration)
 
 /**
diff -ruN /Applications/Xcode_13.0.0-beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderError.h /Applications/Xcode_13.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderError.h
--- /Applications/Xcode_13.0.0-beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderError.h	2021-08-07 05:22:25.000000000 -0400
+++ /Applications/Xcode_13.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderError.h	2021-08-03 21:51:56.000000000 -0400
@@ -13,7 +13,7 @@
 
 FOUNDATION_EXPORT NSErrorDomain const NSFileProviderErrorDomain FILEPROVIDER_API_AVAILABILITY_V2_V3;
 
-FOUNDATION_EXPORT NSErrorUserInfoKey const NSFileProviderErrorCollidingItemKey API_DEPRECATED("NSFileProviderErrorItemKey", ios(8.0, 13.0)) API_UNAVAILABLE(macos, tvos, watchos) API_UNAVAILABLE(macCatalyst);
+FOUNDATION_EXPORT NSErrorUserInfoKey const NSFileProviderErrorCollidingItemKey API_DEPRECATED("NSFileProviderErrorItemKey", ios(8.0, 13.0)) API_UNAVAILABLE(macos, tvos, watchos);
 FOUNDATION_EXPORT NSErrorUserInfoKey const NSFileProviderErrorItemKey API_AVAILABLE(ios(13.0), macos(10.15)) API_UNAVAILABLE(macCatalyst) API_UNAVAILABLE(watchos, tvos);
 FOUNDATION_EXPORT NSErrorUserInfoKey const NSFileProviderErrorNonExistentItemIdentifierKey FILEPROVIDER_API_AVAILABILITY_V2_V3;
 
@@ -80,17 +80,10 @@
     NSFileProviderErrorNewerExtensionVersionFound FILEPROVIDER_API_AVAILABILITY_V3 = -2004,
 
     /**
-     Indicates that synchronization cannot happen.
-
-     This error can be returned by the provider or the system.
-
-     This is returned by NSFileProviderManager if a barrier failed for a sync-related error.
+     Returned by NSFileProviderManager if a barrier failed for a sync-related error.
 
      If the failure is caused by a specific item, the NSFileProviderErrorItemKey will be set to the corresponding item identifier
      and the NSUnderlyingErrorKey will be set to the error encountered by that item.
-
-     When a provider returns that error, it means the syncing an item is definitively broken, and cannot be resolved without an update of
-     either the provider or the system.
      */
     NSFileProviderErrorCannotSynchronize FILEPROVIDER_API_AVAILABILITY_V3 = -2005,
 
diff -ruN /Applications/Xcode_13.0.0-beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderExtension.h /Applications/Xcode_13.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderExtension.h
--- /Applications/Xcode_13.0.0-beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderExtension.h	2021-08-09 03:22:50.000000000 -0400
+++ /Applications/Xcode_13.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderExtension.h	2021-08-03 21:51:56.000000000 -0400
@@ -11,7 +11,7 @@
 
 @class NSFileProviderDomain;
 
-FILEPROVIDER_API_AVAILABILITY_V1
+FILEPROVIDER_CLASS_AVAILABILITY
 @interface NSFileProviderExtension : NSObject
 
 - (nullable NSFileProviderItem)itemForIdentifier:(NSFileProviderItemIdentifier)identifier error:(NSError * _Nullable *)error NS_SWIFT_NAME(item(for:)) FILEPROVIDER_API_AVAILABILITY_V2;
@@ -61,7 +61,6 @@
 
 @end
 
-FILEPROVIDER_API_AVAILABILITY_V2
 @interface NSFileProviderExtension (Deprecated)
 
 /**
diff -ruN /Applications/Xcode_13.0.0-beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderItem.h /Applications/Xcode_13.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderItem.h
--- /Applications/Xcode_13.0.0-beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderItem.h	2021-08-07 05:22:25.000000000 -0400
+++ /Applications/Xcode_13.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderItem.h	2021-08-03 21:51:56.000000000 -0400
@@ -12,7 +12,6 @@
 
 NS_ASSUME_NONNULL_BEGIN
 
-FILEPROVIDER_API_AVAILABILITY_V1_V2_V3
 typedef NSString *NSFileProviderItemIdentifier NS_EXTENSIBLE_STRING_ENUM;
 
 /**
@@ -64,21 +63,6 @@
 @interface NSFileProviderItemVersion : NSObject
 
 /**
- Version component exposed by the system to denote a state that predates a version returned by the provider.
-
- In case an item was created by calling `createItemBasedOnTemplate` and the item returned by the provider in
- the completion handler of that call didn't match the item template passed by the system, the system will try
- to apply the changes asked by the provider to the disk. However, the system may detect conflicts when applying
- those content back to the disk, which will cause the system to send the new disk version to the extension,
- by calling `modifyItem` or `deleteItemWithIdentifier` with a `baseVersion` that represents the item as passed in
- the template of the `createItemBasedOnTemplate` call.
-
- This constant is used by the system to represent that specific version that was communicated by the system to
- the extension but does not have a corresponding version assigned by the extension.
- */
-@property (class, readonly, nonnull) NSData *beforeFirstSyncComponent FILEPROVIDER_API_AVAILABILITY_V4_0;
-
-/**
  Items versions have two distinct components, one for the file contents and one
  for metadata.
 
@@ -123,7 +107,6 @@
  */
 FOUNDATION_EXPORT unsigned long long const NSFileProviderFavoriteRankUnranked FILEPROVIDER_API_AVAILABILITY_V2_V3;
 
-FILEPROVIDER_API_AVAILABILITY_V2_V3
 typedef NS_OPTIONS(NSUInteger, NSFileProviderItemCapabilities) {
     /**
      Indicates that the file can be opened for reading.  If set on a folder
@@ -187,7 +170,7 @@
      */
     NSFileProviderItemCapabilitiesAllowsContentEnumerating = NSFileProviderItemCapabilitiesAllowsReading,
 
-    NSFileProviderItemCapabilitiesAllowsAll API_DEPRECATED("This capability is no longer supported, and does not contain all capabilities. Please migrate to directly specifying each of the individual capabilities that should be allowed for the item.", ios(11.0, 15.0), macos(11.0, 12.0)) =
+    NSFileProviderItemCapabilitiesAllowsAll =
           NSFileProviderItemCapabilitiesAllowsReading
         | NSFileProviderItemCapabilitiesAllowsWriting
         | NSFileProviderItemCapabilitiesAllowsReparenting
@@ -218,27 +201,8 @@
     NSFileProviderFileSystemPathExtensionHidden = 1 << 4,
 };
 
-FILEPROVIDER_API_AVAILABILITY_V4_0
-typedef struct NSFileProviderTypeAndCreator {
-    /**
-     The first word of the FinderInfo structure. It matches the file type code
-     */
-    OSType type;
-    /**
-     The second word of the FinderInfo structure. It matches the creator code
-     */
-    OSType creator;
-} NSFileProviderTypeAndCreator;
-
-FILEPROVIDER_API_AVAILABILITY_V2_V3
 @protocol NSFileProviderItem <NSObject>
 
-/**
- The identifier of the item.
-
- The itemIdentifier should not contain sensitive information, as it may be recorded in system logs and
- diagnostic files.
- */
 @property (nonatomic, readonly, copy) NSFileProviderItemIdentifier itemIdentifier;
 
 /**
@@ -259,10 +223,6 @@
 
 /**
  The file or directory name, complete with its file extension.
-
- The filename property must not be an empty string, including when the item identifier is
- NSFileProviderRootContainerItemIdentifier. The filename for NSFileProviderRootContainerItemIdentifier
- may be displayed in the user interface. Therefore it should be a user-friendly string.
  */
 @property (nonatomic, readonly, copy) NSString *filename;
 
@@ -276,17 +236,6 @@
  On iOS, items must implement either contentType or typeIdentifier. Note
  that contentType is not available on iOS 13 and earlier, so typeIdentifier
  is required in order to target iOS 13 and earlier.
-
- When using NSFileProviderReplicatedExtension, providers must be prepared
- to handle the following contentType in the appropriate manner
- when they are passed in itemTemplates contentType to createItem/modifyItem calls:
- * UTType.symbolicLink
- * UTType.folder
- * UTType.package
- * UTType.aliasFile
-
- Changing the contentType for a given item that would result in a transition to/from a folder
- or to/from a symlink is not supported.
  */
 @property (nonatomic, readonly, copy) UTType *contentType API_AVAILABLE(ios(14.0), macos(11.0));
 
@@ -303,27 +252,12 @@
  is required in order to target iOS 13 and earlier.
  */
 @property (nonatomic, readonly, copy) NSString *typeIdentifier
-    API_DEPRECATED_WITH_REPLACEMENT("contentType", ios(11.0, 15.0))
+    API_DEPRECATED_WITH_REPLACEMENT("contentType", ios(11.0, API_TO_BE_DEPRECATED))
     API_UNAVAILABLE(macos);
 
 /**
- File type and creator code for the item.
-
- This property contains two variables, one for the file type code and one for the creator code.
- Both will be synchronized at the same time, so you have to define both when changing one.
-
- On change on this structure, the NSFileProviderItemTypeAndCreator field will be set in the
- NSFileProviderItemFields argument to createItem/modifyItem.
-
- These will be written down in the FinderInfo structure if relevant.
- */
-@property (nonatomic, readonly) NSFileProviderTypeAndCreator typeAndCreator FILEPROVIDER_API_AVAILABILITY_V4_0;
-
-/**
  The capabilities of the item.  This controls the list of actions that the UI
  will allow for the item.
-
- Capabilities on an item only apply to the item itself. They are not inherited by the children of directories.
  */
 @property (nonatomic, readonly) NSFileProviderItemCapabilities capabilities;
 
@@ -399,15 +333,12 @@
 @property (nonatomic, readonly, copy, nullable) NSDate *lastUsedDate;
 
 /**
- An abstract data blob representing the tags associated with the item.  The same
+ An abstract data blob reprenting the tags associated with the item.  The same
  tags that are available via -[NSURL getResourceValue:forKey:error:] with key
  NSURLTagNamesKey on macOS, except that this data blob may transport more
  information than just the tag names.
 
  This property must not be shared between users, even if the item is.
-
- Starting in macOS 12 and iOS 15, the system suppports the value of the
- `com.apple.metadata:_kMDItemUserTags` xattr as a valid `tagData` blob input.
  */
 @property (nonatomic, readonly, copy, nullable) NSData *tagData;
 
@@ -510,46 +441,15 @@
 /**
  The target of a symlink.
 
- If a replicated extension expose an item with the contentType public.symlink (UTTypeSymbolicLink),
+ If a replicated extension expose an item with the typeIdentifier public.symlink (kUTTypeSymLink),
  this field should contain the target of the symlink.
  */
 @property (nonatomic, readonly, copy, nullable) NSString *symlinkTargetPath
     FILEPROVIDER_API_AVAILABILITY_V3;
 
 /**
- Use this dictionary to add state information to the item. Entries are accessible to
- FileProviderUI and non-UI action predicates and user interaction predicates [1] via the
- `userInfo` context key.
-
- Additionally, any entry of this dictionary with a key ending in `.inherited`
- will be accessible to predicates for descendants of this item via the context key `inheritedUserInfo`.
-
- Items can redefine inherited values for their descendants by specifying the same key used in an ancestor's `userInfo`.
- Thus, `inheritedUserInfo` for a given item is a dictionary of `*.inherited` keys from all if its ancestors, with each value
- taken from the nearest ancestor that has the entry defined.
-
- In this example directory structure:
- root
- |_ parent
-   |_ child
-     |_ grandchild
-
- with the following userInfo values set:
- parent.userInfo = { "a.inherited": YES, "b.inherited": YES }
- child.userInfo = { "a.inherited": NO, "c.inherited": NO }
- grandchild.userInfo = { }
-
- the following inheritedUserInfo values will be provided:
- parent.inheritedUserInfo = { }
- child.inheritedUserInfo = { "a.inherited": YES, "b.inherited": YES }
- grandchild.inheritedUserInfo = { "a.inherited": NO, "b.inherited": YES, "c.inherited": NO }
-
- The context key `resolvedUserInfo` is also available. For each item, the resolvedUserInfo is it's
- inheritedUserInfo, combined with the keys suffixed with .inherited from it's userInfo.
- Continuing the previous example:
- parent.resolvedUserInfo = { "a.inherited": YES, "b.inherited": YES }
- child.resolvedUserInfo = { "a.inherited": NO, "b.inherited": YES, "c.inherited": NO }
- grandchild.resolvedUserInfo = { "a.inherited": NO, "b.inherited": YES, "c.inherited": NO }
+ Use this dictionary to add state information to the item. It is accessible to
+ FileProviderUI action predicates and user interaction predicates [1].
 
  All values for this dictionary must be of type String, Number, Bool or Date.
 
@@ -558,30 +458,16 @@
   - `NSFileProviderUserInteractions` *array*
     - `ActivationRule ` *string*, the predicate.
         @parameters predicates
-            - `destinationItem`: the destination item for an action. Present for Move/MoveIn/Copy/CopyIn/Create
+            - `destinationItem`: the destination item for an action (only present for Move/Import)
             - `action` : the action that is being performed
-                 'Move'       : moving item(s) within the same provider
-                 'MoveOut'    : moving item(s) out of the provider
-                 'MoveIn'     : importing item(s) into a folder/root of the provider
-                 'Copy'       : copying item(s) within the same provider
-                 'CopyOut'    : copying item(s) out of the provider
-                 'CopyIn'     : copying item(s) into a folder/root of the provider
+                 'Move'       : moving items within the same provider
+                 'MoveOut' : moving items out of the provider
+                 'MoveIn'    : importing item(s) into a folder/root of the provider
                  'Trash'      : trashing item(s)
-                 'Create'      : creating an item (available in macOS 12.0 and later)
-                            The Create action will be evaluated when the user creates a new file
-                            or folder in a system Open/Save panel.
-                            The sourceItem is the file/folder being created. The only field that is
-                            populated for this item is the filename. The type of file/folder, size, etc,
-                            are unknown at Create evaluation time.
-                            The destinationItem is the directory which the file/folder is being created
-                            within.
                  'Delete'     : deleting item(s)
-                             If the provider wishes to take full responsibility for showing warnings on Delete,
-                             the provider can set NSExtensionFileProviderAllowsSystemDeleteAlerts=0 in the provider's Info.plist.
-                             This will ensure that the system does not display it's warnings when the user is deleting a file.
-                 'ExcludeFromSync' : deleting items(s) because the user chose to exclude those from sync (available in macOS 12.0 and later)
+                 'ExcludeFromSync' : deleting items(s) because the user chose to exclude those from sync
                  'Rename'  : renaming item(s) (available in macOS 11.3 and later)
-            - `sourceItem` : current item that the predicate is evaluating. Present for Move/MoveOut/Copy/CopyOut/Create/Trash/Delete/ExcludeFromSync/Rename
+            - `sourceItem` : current item that the predicate is evaluating
             - `sourceItemsCount` :
                 - In userInteraction, represents the count of sourceItems of an action operation
                 - In subUserInteraction: represents the count of items that matched the previous predicate
@@ -601,41 +487,21 @@
         - `RecoveryOptions` (optional)
             - `Continue` *bool*, the boolean for whether to have a continue button - default value is YES if not specified
             - `Destructive` *bool*, the boolean for whether continuing is a destructive action - default value is NO if not specified
-    - `HelpURL` *string*: If present, a help button will be displayed on the Alert that is shown. If the user
-                   clicks the help button, this help URL will be opened. This URL is not restricted to Web URLs. For instance, the extension could configure
-                   the HelpURL to launch it's application with a custom URL scheme. (available in macOS 12.0 and later)
     - `SubInteractions `: *dictionary* (same as `NSFileProviderUserInteractions`)
-    - `SupressionIdentifier` *string*: If present, when this predicate matches, the alert will display an option to
-                           suppress future alerts from UserInteractions with the same
-                           SuppressionIdentifier (including the current UserInteraction). This also
-                           requires implementing the `NSFileProviderUserInteractionSuppressing`
-                           protocol on the principal class of the FileProvider extension (available in
-                           macOS 12.0 and later).
 
  For each interaction, either Alert or SubInteractions must be specified. SubInteractions will be evaluated if the main ActivationRule evaluates to
  YES for at least once. This allows you to match a general pattern via the top-level activation rule and then select a specialized error message from a list
  of subpatterns.
 
- At most one UserInteraction alert will be shown for each FileProvider domain involved in the user's Action. For
- instance, if provider A defines a UserInteraction for MoveOut actions, and provider B defines a UserInteraction
- for MoveIn operations. When the user moves a file from A to B, and the predicate for both UserInteraction
- matches, then both of the UserInteraction alerts will be shown to the user. However, as soon as the user
- denies any of the alerts, the remainder will not be shown, and the action will be denied.
-
- If the provider wishes to take full responsibility for showing a custom contextual menu item for Download,
- the provider can set NSExtensionFileProviderAllowsContextualMenuDownloadEntry=0 in the provider's Info.plist.
- This will ensure that the system does not display the "Download Now" button in the contextual menu.
-
  Here is a sample extension Info.plist:
 

NSExtension

  • NSExtensionFileProviderAllowsContextualMenuDownloadEntry
  • ... NSFileProviderUserInteractions ActivationRule
  • action == "Move"
  • action == Move SubInteractions @@ -717,7 +583,7 @@

@end

-FILEPROVIDER_API_AVAILABILITY_V2_V3 + typedef id NSFileProviderItem;

NS_ASSUME_NONNULL_END diff -ruN /Applications/Xcode_13.0.0-beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderItemDecoration.h /Applications/Xcode_13.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderItemDecoration.h --- /Applications/Xcode_13.0.0-beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderItemDecoration.h 2021-08-05 00:17:19.000000000 -0400 +++ /Applications/Xcode_13.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderItemDecoration.h 2021-03-16 04:44:11.000000000 -0400 @@ -9,7 +9,6 @@ #import <FileProvider/NSFileProviderDefines.h> #import <FileProvider/NSFileProviderItem.h>

-FILEPROVIDER_API_AVAILABILITY_V3 typedef NSString *NSFileProviderItemDecorationIdentifier NS_TYPED_EXTENSIBLE_ENUM;

/** @@ -60,7 +59,6 @@

*/

-FILEPROVIDER_API_AVAILABILITY_V3 @protocol NSFileProviderItemDecorating /** Returns an array of decorations for the item. @@ -68,5 +66,5 @@ To adopt this protocol, implement the -decorations method on your NSFileProviderItem to return valid decoration identifiers from your Info.plist. */

  • @property (nonatomic, nullable, readonly, strong) NSArray *decorations;
  • @property (nonatomic, nullable, readonly, strong) NSArray *decorations FILEPROVIDER_API_AVAILABILITY_V3; @end diff -ruN /Applications/Xcode_13.0.0-beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderManager.h /Applications/Xcode_13.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderManager.h --- /Applications/Xcode_13.0.0-beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderManager.h 2021-08-09 03:25:52.000000000 -0400 +++ /Applications/Xcode_13.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderManager.h 2021-08-03 21:51:56.000000000 -0400 @@ -16,20 +16,6 @@ @class NSFileProviderDomain; @class NSFileProviderRequest;

-typedef NS_ENUM(NSInteger, NSFileProviderDomainRemovalMode) {

  • /// Don't keep any files that are current in the domain
  • NSFileProviderDomainRemovalModeRemoveAll = 0,
  • /// Delete the domain from the system but keeps the at least all the
  • /// dirty corresponding user data around.
  • NSFileProviderDomainRemovalModePreserveDirtyUserData = 1,
  • /// Delete the domain from the system but keeps all the downloaded
  • /// corresponding user data around.
  • NSFileProviderDomainRemovalModePreserveDownloadedUserData = 2, -} NS_SWIFT_NAME(NSFileProviderManager.DomainRemovalMode) FILEPROVIDER_API_AVAILABILITY_V4_0;

/** The file provider manager allows you to communicate with the file provider framework from both the extension and related processes. @@ -203,13 +189,6 @@

/** Register a domain in which items can be stored.

  • If a domain with the same identifier already exists, addDomain will update the display name
  • and hidden state of the domain and succeed.
  • When the domain is backed by a NSFileProviderReplicatedExtension, the system will create
  • a disk location where the domain will be replicated. If that location already exists on disk
  • this call will fail with the code NSFileWriteFileExistsError. */
  • (void)addDomain:(NSFileProviderDomain *)domain completionHandler:(void(^)(NSError *_Nullable error))completionHandler;

@@ -219,11 +198,6 @@

  • (void)removeDomain:(NSFileProviderDomain *)domain completionHandler:(void(^)(NSError *_Nullable error))completionHandler;

/**

  • Remove a domain with options
  • */ -+ (void)removeDomain:(NSFileProviderDomain *)domain mode:(NSFileProviderDomainRemovalMode)mode completionHandler:(void(^)(NSURL *_Nullable_result preservedLocation, NSError *_Nullable error))completionHandler FILEPROVIDER_API_AVAILABILITY_V4_0;

-/** Get all registered domains. */

  • (void)getDomainsWithCompletionHandler:(void (^)(NSArray<NSFileProviderDomain *> *domains, NSError * _Nullable error))completionHandler; @@ -234,13 +208,12 @@
  • (void)removeAllDomainsWithCompletionHandler:(void(^)(NSError *_Nullable error))completionHandler;

/**

  • Calling this method will cause the system to cancel throttling on every item which has been throttled due to the given error.
  • This call supports 4 types of errors:
  • Cancel throttling applied by the system to any item because of that error.
  • This call supports 3 types of errors:
    • NSFileProviderErrorNotAuthenticated
    • NSFileProviderErrorInsufficientQuota
    • NSFileProviderErrorServerUnreachable
    • NSFileProviderErrorCannotSynchronize */
  • (void)signalErrorResolved:(NSError *)error completionHandler:(void(^)(NSError *_Nullable error))completionHandler FILEPROVIDER_API_AVAILABILITY_V3; @@ -318,9 +291,6 @@

/** The version of the domain when the pending set was last refreshed by the system.

  • This property is updated when the enumeration methods are called on the pending set enumerator. The value
  • is initially nil. */ @property (nonatomic, readonly, nullable) NSFileProviderDomainVersion *domainVersion;

@@ -398,19 +368,11 @@ When the import of the file hierarchy is finished, the system calls -[NSFileProviderExtension importDidFinishWithCompletionHandler:].

  • In some circumstances, in particular in case the requested item is the root item, calling

  • reimport will cause the system to stop the extension process. If the call is initiated

  • from the extension, the system does not guarantee that the completion handler will be called

  • before the extension is stopped. When called on the root item, reimport will cause the system

  • to rebuild its backing store for the domain. See -[NSFileProviderDomain backingStoreIdentity].

  • If this method succeeds, the system will reimport at least the requested sub-tree, but may import more.

    If the requested item has no on-disk representation, the completion handler will be called with

  • a NSFileProviderErrorNoSuchItem error. The same error will be reported if the reimport request

  • happens quickly after a previous import / reimport and the corresponding item hasn't been

  • reimported yet.

  • a NSFileProviderErrorNoSuchItem error. */
  • (void)reimportItemsBelowItemWithIdentifier:(NSFileProviderItemIdentifier)itemIdentifier completionHandler:(void (^)(NSError * _Nullable error))completionHandler diff -ruN /Applications/Xcode_13.0.0-beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderReplicatedExtension.h /Applications/Xcode_13.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderReplicatedExtension.h --- /Applications/Xcode_13.0.0-beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderReplicatedExtension.h 2021-08-07 05:22:26.000000000 -0400 +++ /Applications/Xcode_13.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderReplicatedExtension.h 2021-03-16 04:44:11.000000000 -0400 @@ -98,7 +98,6 @@ NSFileProviderItemContentModificationDate = 1 << 7, NSFileProviderItemFileSystemFlags = 1 << 8, NSFileProviderItemExtendedAttributes = 1 << 9,
  • NSFileProviderItemTypeAndCreator FILEPROVIDER_API_AVAILABILITY_V4_0 = 1 << 10, } FILEPROVIDER_API_AVAILABILITY_V3;

#pragma mark - Extension with FPFS support @@ -118,13 +117,10 @@ Once this has been called, the directory and its children should be included in the working set.

  • This is also used to subscribe to live updates for a single document.
  • The system will keep an enumerator open in the extension on directories that are
  • presented to the user (for instance, in Finder), and on document on which an application
  • has a NSFilePresenter. The provider can use the existence of that enumerator as a hint
  • that the user is actively seeing / using the item in question, and prioritize the delivery
  • of updates on the item or its children in the working set.
  • This is also used to subscribe to live updates for a single document. In that

  • case, -[NSFileProviderEnumerator enumerateChangesToObserver:fromSyncAnchor:]

  • will be called and the enumeration results shouldn't include items other than

  • the very item that the enumeration was started on.

    If returning nil, you must set the error out parameter.

@@ -173,15 +169,8 @@ system will present an appropriate error message and back off until the next time it is signalled.

  • Any other error, including crashes of the extension process, will be considered to be transient
  • and will cause the enumeration to be retried.
  • Errors must be in one of the following domains: NSCocoaErrorDomain, NSFileProviderErrorDomain.
  • For errors which can not be represented using an existing error code in one of these domains, the extension
  • should construct an NSError with domain NSCocoaErrorDomain and code NSXPCConnectionReplyInvalid.
  • The extension should set the NSUnderlyingErrorKey in the NSError's userInfo to the error which could not
  • be represented.
  • Any other error will be considered to be transient and will cause the
  • enumeration to be retried. */
  • (nullable id)enumeratorForContainerItemIdentifier:(NSFileProviderItemIdentifier)containerItemIdentifier request:(NSFileProviderRequest *)request @@ -206,26 +195,6 @@ The provider can notify the system of changes on the items by publishing those on the enumerator for the working set. The system notifies the extension of changes made by the user on disk by calling createItemBasedOnTemplate, modifyItem, or deleteItemWithIdentifier.
  • Concurrency:

  • A replicated extension class must be prepared to handle multiple concurrent calls since the

  • system may perform several concurrent operations (for instance, modifying an item, while enumerating

  • the working set, creating another item, and fetching the contents of yet another item).

  • The system has limits to the number of concurrent operations.When the number of concurrent

  • operations is reached, the system will not schedule additional operations falling in that category

  • until at least one of the running operation has completed by calling its completion handler.

  • The system currently separates the operations into the following categories:

    • enumeration of the working set. At most 1 enumeration of the working set can happen at a given time
    • downloads. The system has a limit on the number of concurrent calls to fetchContents and similar calls
  • That limit is configurable by setting the NSExtensionFileProviderDownloadPipelineDepth key to an integer

  • value (between 1 and 128) in the Info.plist of the extension.

    • uploads. The system has a limit on the number of concurrent calls to createItemBasedOnTemplate and
  • modifyItem when the call includes new content to be uploaded. That limit is configurable by setting the

  • NSExtensionFileProviderUploadPipelineDepth key to an integer value (between 1 and 128) in the Info.plist

  • of the extension. */ FILEPROVIDER_API_AVAILABILITY_V3 @protocol NSFileProviderReplicatedExtension <NSObject, NSFileProviderEnumerating> @@ -263,15 +232,8 @@ system will present an appropriate error message and back off until the next time it is signalled.

  • Any other error, including crashes of the extension process, will be considered to be

  • transient and will cause the lookup to be retried.

  • Errors must be in one of the following domains: NSCocoaErrorDomain, NSFileProviderErrorDomain.

  • For errors which can not be represented using an existing error code in one of these domains, the extension

  • should construct an NSError with domain NSCocoaErrorDomain and code NSXPCConnectionReplyInvalid.

  • The extension should set the NSUnderlyingErrorKey in the NSError's userInfo to the error which could not

  • be represented.

  • Any other error will be considered to be transient and will cause the

  • lookup to be retried.

    Cancellations:

@@ -323,27 +285,13 @@ moment the system unlinks the file, the file may unexpectedly still be on disk the next time an instance of the extension is created. The extension is then responsible for deleting that file.

  • Disallowing processes from fetching items:

  • The system automatically downloads files on POSIX accesses. The extension may wish to disallow this class of
  • downloads for specific applications.
  • The extension can set an array of strings into the UserDefault key
  • "NSFileProviderExtensionNonMaterializingProcessNames". A process whose name is an exact match for an
  • entry in this array will not be allowed to fetch items in the extension's domains.
  • In macOS 11.0 and later, this list will be checked when a download is initiated through a POSIX filesystem call.
  • In macOS 11.4 and later, this list will also be checked for downloads initiated through file coordination.
  • Error cases:

  • If the download fails because the item was deleted on the server, the call should
  • If the download fails because the item is unknown, the call should fail with the NSFileProviderErrorNoSuchItem error. In that case, the system will consider the item has been removed from the domain and will attempt to delete it from disk. In case that deletion fails because there are local
  • changes on this item, the system will re-create the item using createItemBasedOnTemplate,
  • passing the NSFileProviderCreateItemDeletionConflicted flag.
  • changes on this item, the system will re-create the item using createItemBasedOnTemplate.

    If the user does not have access to the content of the file, the provider can fail the call with NSCocoaErrorDomain and code NSFileReadNoPermissionError. @@ -353,15 +301,8 @@ In those cases, the system will present an appropriate error message and back off until the next time it is signalled.

  • Any other error, including crashes of the extension process, will be considered to be transient
  • and will cause the download to be retried.
  • Errors must be in one of the following domains: NSCocoaErrorDomain, NSFileProviderErrorDomain.
  • For errors which can not be represented using an existing error code in one of these domains, the extension
  • should construct an NSError with domain NSCocoaErrorDomain and code NSXPCConnectionReplyInvalid.
  • The extension should set the NSUnderlyingErrorKey in the NSError's userInfo to the error which could not
  • be represented.
  • Any other error will be considered to be transient and will cause the

  • download to be retried.

    Cancellations:

@@ -497,21 +438,14 @@ the system will call createItemBasedOnTemplate again.

The extension can also report the NSFileProviderErrorNotAuthenticated,

  • NSFileProviderErrorServerUnreachable, NSFileProviderErrorInsufficientQuota
  • or NSFileProviderErrorCannotSynchronize in case the modification cannot be applied
  • because of the current state of the system / domain. In that case, the system will
  • present an appropriate error message and back off until the next time it is signalled.
  • NSFileProviderErrorServerUnreachable or NSFileProviderErrorInsufficientQuota
  • in case the modification cannot be applied because of the current state of the
  • system / domain. In that case, the system will present an appropriate error
  • message and back off until the next time it is signalled. The provider can signal the error resolution by calling signalErrorResolved:completionHandler:.
  • Any other error, including crashes of the extension process, will be considered to be transient
  • and will cause the creation to be retried.
  • Errors must be in one of the following domains: NSCocoaErrorDomain, NSFileProviderErrorDomain.
  • For errors which can not be represented using an existing error code in one of these domains, the extension
  • should construct an NSError with domain NSCocoaErrorDomain and code NSXPCConnectionReplyInvalid.
  • The extension should set the NSUnderlyingErrorKey in the NSError's userInfo to the error which could not
  • be represented.
  • Any other error will be considered to be transient and will cause the

  • creation to be retried.

    Cancellations:

@@ -540,11 +474,6 @@ set of stillPendingFields in its completion handler. In that case, the system will attempt to modify the item later by calling modifyItem with those fields.

  • Starting in macOS 12.0, if the set of stillPendingFields returned by the provider is

  • identical to the set of fields passed to modifyItem, then the system will consider that these fields

  • are not supported by the provider. The system will not send these fields to the provider again,

  • until the item is modified.

  • If a field in the returned item does not match the itemTemplate, and is not in the list of stillPendingFields, the value from the item will be propagated to the disk. In case there is a content change and the content of @@ -580,27 +509,6 @@ but direct file system changes (e.g. from Terminal) can still result in changes that must be handled.

  • Conflict resolution:


  • The system passes a baseVersion parameter to the modifyItem call. This

  • baseVersion describes the latest version of the file which was reflected on disk.

  • This parameter can be used to detect conflicts with remote edits.

  • For instance, if content version A of the file was downloaded to the local system, and

  • the content was modified locally, the modifyItem call will receive baseVersion of A. If the server

  • has in the meantime received another content edit of the same file, the server may

  • have content version C. In this case, the extension can detect the mismatching baseVersion,

  • and decide how to resolve the conflict. The extension informs the system of how it

  • wishes to resolve the conflict by returning the resolved metadata on the completion handler.

  • As an example resolution, if the extension informs that it wishes for the remote version

  • of the item to be on disk (and to ignore the local edits), it should return the new

  • contentVersion in the completion handler's item. The system will subsequently call

  • fetchContents to retrieve the new contents and replace them on disk.

  • The baseVersion might contain one or both component set to

  • NSFileProviderItemVersionComponentZero in case there has never been a version for

  • which the item on disk and the item in the provider were known to be in sync.

  • Structural consistency and Cycle handling:

    In case the parentItemIdentifier is modified, the system guarantees that the new @@ -661,21 +569,14 @@ modifyItem again.

    The extension can also report the NSFileProviderErrorNotAuthenticated,

  • NSFileProviderErrorServerUnreachable, NSFileProviderErrorInsufficientQuota

  • or NSFileProviderErrorCannotSynchronize in case the modification cannot be applied

  • because of the current state of the system / domain. In that case, the system will

  • present an appropriate error message and back off until the next time it is signalled.

  • NSFileProviderErrorServerUnreachable or NSFileProviderErrorInsufficientQuota
  • in case the modification cannot be applied because of the current state of the
  • system / domain. In that case, the system will present an appropriate error
  • message and back off until the next time it is signalled. The provider can signal the error resolution by calling signalErrorResolved:completionHandler:.
  • Any other error, including crashes of the extension process, will be considered to be transient
  • and will cause the modification to be retried.
  • Errors must be in one of the following domains: NSCocoaErrorDomain, NSFileProviderErrorDomain.
  • For errors which can not be represented using an existing error code in one of these domains, the extension
  • should construct an NSError with domain NSCocoaErrorDomain and code NSXPCConnectionReplyInvalid.
  • The extension should set the NSUnderlyingErrorKey in the NSError's userInfo to the error which could not
  • be represented.
  • Any other error will be considered to be transient and will cause the

  • modification to be retried.

    Cancellations:

@@ -747,21 +648,14 @@ that item may have already been deleted remotely, then the extension should report a success.

  • The extension can also report the NSFileProviderErrorNotAuthenticated,
  • NSFileProviderErrorServerUnreachable, or NSFileProviderErrorCannotSynchronize
  • in case the deletion cannot be applied because of the current state of the
  • system / domain. In that case, the system will present an appropriate error
  • message and back off until the next time it is signalled.
  • Any other error, including crashes of the extension process, will be considered to be transient
  • and will cause the deletion to be retried.
  • The extension can also report the NSFileProviderErrorNotAuthenticated and
  • NSFileProviderErrorServerUnreachable in case the deletion cannot be applied
  • because of the current state of the system / domain. In that case, the system
  • will present an appropriate error message and back off until the next time it
  • is signalled.
  • Errors must be in one of the following domains: NSCocoaErrorDomain, NSFileProviderErrorDomain.
  • For errors which can not be represented using an existing error code in one of these domains, the extension
  • should construct an NSError with domain NSCocoaErrorDomain and code NSXPCConnectionReplyInvalid.
  • The extension should set the NSUnderlyingErrorKey in the NSError's userInfo to the error which could not
  • be represented.
  • Any other error will be considered to be transient and will cause the

  • deletion to be retried.

    Cancellations:

@@ -783,27 +677,17 @@

/** Signal the end of import of on-disk items.

  • This is called after a reimport of on-disk items has been triggered by either
  • -[NSFileProviderManager reimportItemsBelowItemWithIdentifier:completionHandler:]
  • or after a new domain is created using
  • +[NSFileProviderManager importDomain:fromDirectoryAtURL:completionHandler:] or
  • +[NSFileProviderManager addDomain:completionHandler:].
  • reimport can also be started by the system independently from any request by the
  • provider. The provider can detect those events by monitoring
  • -[NSFileProviderDomain backingStoreIdentity].
  • This is called after an import of on-disk items has been triggered by either

  • -[NSFileProviderManager reimportItemsBelowItemWithIdentifier:completionHandler:] or

  • +[NSFileProviderManager importDomain:fromDirectoryAtURL:completionHandler:]. A

  • reimport can also be started by the system independently from any request by the

  • provider.

    During import, found items will be created via the -[NSFileProviderExtension createItemBasedOnTemplate:fields:contents:options:completionHandler:] call with the NSFileProviderCreateItemMayAlreadyExist flag set. At the end of an import the -[NSFileProviderExtension importDidFinishWithCompletionHandler:] is called.

  • The system will attempt to import items as they are accessed by the user or applications. Import
  • of the other items is scheduled by the system as a background task. That task may be delayed,
  • for instance in low-power situations, or when the system is under heavy load. The provider can
  • force the system to process a folder and its direct children by issuing a coordination request
  • on that folder. */
  • (void)importDidFinishWithCompletionHandler:(void (^)(void))completionHandler;

@@ -980,12 +864,6 @@ The system will cache the thumbnail for the item, and the cache will be invalidated when itemVersion.contentVersion changes.

  • Thread safety:

  • The @p perThumbnailCompletionHandler may be called from multiple threads
  • concurrently.
  • Cancellations:

    If the NSProgress returned by this method is cancelled, the extension should @@ -1024,38 +902,6 @@

@end

-/**

  • Protocol to implement for managing UserInteraction alerts.
  • */ -FILEPROVIDER_API_AVAILABILITY_V4_0 -@protocol NSFileProviderUserInteractionSuppressing

-/**

  • Suppression management:
  • The extension may choose to give the user the option to suppress certain UserInteraction alerts.
  • In order to do so, the extension must both implement NSFileProviderUserInteractionSuppressing, as well as
  • configure the desired UserInteractions in the Info.plist with the SuppressionIdentifier field.
  • When FileProvider needs to evaluate whether to display a UserInteraction alert, it will call
  • -[NSFileProviderUserInteractionSuppressing isInteractionSuppressedForIdentifier:]. When the user indicates that they do not
  • wish to see a given SuppressionIdentifiers's alert again, FileProvider will call
  • -[NSFileProviderUserInteractionSuppressing setInteractionSuppressed:forIdentifier:].
  • The extension can choose whether the suppression should apply only to the domain upon which
  • -[NSFileProviderUserInteractionSuppressing setInteractionSuppressed:forIdentifier:] was called, or if it should apply to all
  • domains for their provider. For instance, the extension could choose to suppress future alerts related
  • to adding an item to a shared folder across all domains, after the user chooses to suppress the alerts
  • in a specific domain's context. Or, the extension could choose to only suppress that alert for the
  • specific domain it was displayed within, and in the future, the user would see the same alert in the same
  • context, if they take the same action in another domain.
  • */

-- (void)setInteractionSuppressed:(BOOL)suppression forIdentifier:(NSString *)suppressionIdentifier; -- (BOOL)isInteractionSuppressedForIdentifier:(NSString *)suppressionIdentifier;

-@end

FILEPROVIDER_API_AVAILABILITY_V3_1 @protocol NSFileProviderDomainState

@@ -1082,9 +928,8 @@ /** Global state of the domain.

  • Use this dictionary to add state information to the domain. It is accessible to predicates for
  • User Interactions, FileProvider Actions, and FileProviderUI Actions, via the top-level domainUserInfo context
  • key.
  • Use this dictionary to add state information to the domain. It is accessible to

  • user interaction predicates via the domainUserInfo context key.

    This dictionary must only contain key and value classes in the following list: NSString, NSNumber, NSDate, and NSPersonNameComponents. diff -ruN /Applications/Xcode_13.0.0-beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderService.h /Applications/Xcode_13.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderService.h --- /Applications/Xcode_13.0.0-beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderService.h 2021-08-05 00:17:19.000000000 -0400 +++ /Applications/Xcode_13.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderService.h 2021-03-16 04:44:11.000000000 -0400 @@ -44,7 +44,6 @@ Client applications can retrieve the list of supported services by calling @c -[NSFileManager getFileProviderServicesForItemAtURL:] for a specific item URL. */ -FILEPROVIDER_API_AVAILABILITY_V2 @interface NSFileProviderExtension (NSFileProviderService)

  • (nullable NSArray <id > *)supportedServiceSourcesForItemIdentifier:(NSFileProviderItemIdentifier)itemIdentifier error:(NSError **)error NS_SWIFT_NAME(supportedServiceSources(for:)) FILEPROVIDER_API_AVAILABILITY_V2; diff -ruN /Applications/Xcode_13.0.0-beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderThumbnailing.h /Applications/Xcode_13.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderThumbnailing.h --- /Applications/Xcode_13.0.0-beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderThumbnailing.h 2021-08-05 00:17:19.000000000 -0400 +++ /Applications/Xcode_13.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderThumbnailing.h 2021-03-16 04:44:11.000000000 -0400 @@ -12,7 +12,6 @@

NS_ASSUME_NONNULL_BEGIN

-FILEPROVIDER_API_AVAILABILITY_V2 @interface NSFileProviderExtension (NSFileProviderThumbnailing)

/**

Clone this wiki locally