-
Notifications
You must be signed in to change notification settings - Fork 516
FileProvider macOS xcode14.0 beta1
Manuel de la Pena edited this page Aug 29, 2022
·
3 revisions
#FileProvider.framework https://github.com/xamarin/xamarin-macios/pull/15777
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderDefines.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderDefines.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderDefines.h 2022-02-23 10:57:52.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderDefines.h 2022-05-31 15:03:57.000000000 -0400
@@ -15,9 +15,21 @@
#define FILEPROVIDER_API_AVAILABILITY_V2_V3 API_AVAILABLE(ios(11.0), macos(11.0)) API_UNAVAILABLE(macCatalyst) API_UNAVAILABLE(watchos, tvos)
// macOS API with FPFS
#define FILEPROVIDER_API_AVAILABILITY_V3 API_AVAILABLE(macos(11.0)) API_UNAVAILABLE(watchos, tvos) API_UNAVAILABLE(ios, macCatalyst)
+// iOS API with FPFS
+#define FILEPROVIDER_API_AVAILABILITY_V3_IOS API_AVAILABLE(macos(11.0), ios(16.0)) API_UNAVAILABLE(watchos, tvos) API_UNAVAILABLE(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)
+// iOS API with first revision of FPFS
+#define FILEPROVIDER_API_AVAILABILITY_V3_1_IOS API_AVAILABLE(macos(11.3), ios(16.0)) API_UNAVAILABLE(watchos, tvos) API_UNAVAILABLE(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)
+// iOS API with second revision of FPFS
+#define FILEPROVIDER_API_AVAILABILITY_V4_0_IOS API_AVAILABLE(macos(12.0), ios(16.0)) API_UNAVAILABLE(watchos, tvos) API_UNAVAILABLE(macCatalyst)
// macOS API with third revision of FPFS
#define FILEPROVIDER_API_AVAILABILITY_V4_1 API_AVAILABLE(macos(12.3)) API_UNAVAILABLE(watchos, tvos) API_UNAVAILABLE(ios, macCatalyst)
+// macOS API with the fourth revision of FPFS
+#define FILEPROVIDER_API_AVAILABILITY_V5_0 API_AVAILABLE(macos(13.0)) API_UNAVAILABLE(watchos, tvos) API_UNAVAILABLE(ios, macCatalyst)
+// iOS API with the fourth revision of FPFS
+#define FILEPROVIDER_API_AVAILABILITY_V5_0_IOS API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(watchos, tvos) API_UNAVAILABLE(macCatalyst)
+// macOS/iOS API
+#define FILEPROVIDER_API_AVAILABILITY_V2_V5 API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(watchos, tvos) API_UNAVAILABLE(macCatalyst)
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderDomain.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderDomain.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderDomain.h 2022-02-23 10:57:52.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderDomain.h 2022-05-31 14:52:32.000000000 -0400
@@ -21,7 +21,7 @@
current version of the domain. This object is immutable and can safely be used as
a key in a dictionary.
*/
-FILEPROVIDER_API_AVAILABILITY_V3_1
+FILEPROVIDER_API_AVAILABILITY_V3_1_IOS
@interface NSFileProviderDomainVersion : NSObject <NSSecureCoding>
/** Build a version that is strictly greater than the receiver.
@@ -44,7 +44,7 @@
/** Testing modes.
*/
-FILEPROVIDER_API_AVAILABILITY_V3_1
+FILEPROVIDER_API_AVAILABILITY_V3_1_IOS
typedef NS_OPTIONS(NSUInteger, NSFileProviderDomainTestingModes) {
/** Enable the domain without any user action required.
*/
@@ -90,7 +90,9 @@
@interface NSFileProviderDomain : NSObject
/**
- Initialize a new NSFileProviderDomain
+ Initialize a new non-replicated NSFileProviderDomain
+
+ The extension will be implementing NSFileProviderExtension.
The file provider extension implementation can pick any @c identifier as it sees
fit to identify the group of items. The identifier must not contain any characters from this set: [/:]
@@ -104,15 +106,29 @@
- (instancetype)initWithIdentifier:(NSFileProviderDomainIdentifier)identifier displayName:(NSString *)displayName pathRelativeToDocumentStorage:(NSString *)pathRelativeToDocumentStorage FILEPROVIDER_API_AVAILABILITY_V2;
/**
- Initialize a new NSFileProviderDomain
+ Initialize a new replicated NSFileProviderDomain
+
+ The extension will be implementing NSFileProviderReplicatedExtension.
The file provider extension implementation can pick any @c identifier as it sees
fit to identify the group of items. The identifier must not contain any characters from this set: [/:]
+ In order to migrate a non-replicated domain to a replicated one, implementers have to make sure that they do not
+ use the default domain, and then call +[NSFileProviderManager addDomain:completionHandler:] using
+ the NSFileProviderDomain object returned by that init method.
+
+ A domain with a specific identifier can be added multiple times; subsequent adds will update the properties
+ of the existing domain.
+ If a replicated domain is added "on top" of a non-replicated domain, the domain will be migrated to be replicated;
+ existing bookmarks will remain valid, but the (externally visible) location of items will change to reflect the replicated location.
+
+ It is not possible to migrate the default domain in this manner (since the default domain can not be added).
+ It is recommended to migrate usage of the default domain to a domain with an explicit identifier instead.
+
@param displayName a user visible string representing the group of items the
file provider extension is using.
*/
-- (instancetype)initWithIdentifier:(NSFileProviderDomainIdentifier)identifier displayName:(NSString *)displayName FILEPROVIDER_API_AVAILABILITY_V3;
+- (instancetype)initWithIdentifier:(NSFileProviderDomainIdentifier)identifier displayName:(NSString *)displayName FILEPROVIDER_API_AVAILABILITY_V3_IOS;
/**
The identifier - as provided by the file provider extension.
@@ -144,7 +160,7 @@
/** If user has disabled this domain from Files.app on iOS or System Preferences on macOS, this will bet set
to NO.
*/
-@property (readonly) BOOL userEnabled FILEPROVIDER_API_AVAILABILITY_V3;
+@property (readonly) BOOL userEnabled FILEPROVIDER_API_AVAILABILITY_V3_IOS;
/** If this domain is not user visible.
@@ -152,6 +168,21 @@
*/
@property (readwrite, assign, getter=isHidden) BOOL hidden FILEPROVIDER_API_AVAILABILITY_V3;
+/** If the domain is a replicated domain.
+
+ If set to YES, it means the domain is replicated. By default, on macOS, the value will always be YES.
+
+ On iOS, it will depend on the way the NSFileProviderDomain object is contructed. Calling
+ -[NSFileProviderDomain initWithIdentifier:displayName:] will initialize a replicated domain.
+ -[NSFileProviderDomain initWithIdentifier:displayName:pathRelativeToDocumentStorage:] will
+ initialize a non-replicated domain.
+
+ To know whether a domain is replicated or not, users are advised to rely on the output of
+ +[NSFileProviderManager getDomainsForProviderIdentifier:completionHandler:]
+
+*/
+@property (readonly, getter=isReplicated) BOOL replicated FILEPROVIDER_API_AVAILABILITY_V5_0_IOS;
+
/** Testing modes.
Testing modes are exposed as a means for the provider to have more control over the system in
@@ -161,7 +192,7 @@
A process must have the com.apple.developer.fileprovider.testing-mode entitlement in order to
configure a domain with non-empty testing modes.
*/
-@property (readwrite, assign) NSFileProviderDomainTestingModes testingModes FILEPROVIDER_API_AVAILABILITY_V3_1;
+@property (readwrite, assign) NSFileProviderDomainTestingModes testingModes FILEPROVIDER_API_AVAILABILITY_V3_1_IOS;
/**
Identity of the backing store of the domain on the system.
@@ -181,7 +212,17 @@
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;
+@property (nonatomic, readonly, nullable) NSData *backingStoreIdentity FILEPROVIDER_API_AVAILABILITY_V4_0_IOS;
+
+/** If the domain supports syncing the trash.
+
+ This property only applies for extensions that implement NSFileProviderReplicatedExtension.
+
+ Defaults to YES. Set this to NO to indicate that the domain cannot sync the trash.
+ In the case that the domain cannot sync the trash, the system might still offer trashing to the local trash when appropriate,
+ but the operation will look like a delete to the extension.
+ */
+@property (readwrite, assign) BOOL supportsSyncingTrash FILEPROVIDER_API_AVAILABILITY_V5_0;
@end
@@ -199,7 +240,7 @@
called.
*/
FOUNDATION_EXPORT NSNotificationName const NSFileProviderDomainDidChange
-FILEPROVIDER_API_AVAILABILITY_V3;
+FILEPROVIDER_API_AVAILABILITY_V3_IOS;
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderEnumerating.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderEnumerating.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderEnumerating.h 2022-02-12 07:51:27.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderEnumerating.h 2022-05-21 07:16:24.000000000 -0400
@@ -66,7 +66,7 @@
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.
*/
-@property (nonatomic, readonly) NSInteger suggestedPageSize FILEPROVIDER_API_AVAILABILITY_V3;
+@property (nonatomic, readonly) NSInteger suggestedPageSize FILEPROVIDER_API_AVAILABILITY_V3_IOS;
@end
@@ -129,7 +129,7 @@
The system enforces a maximum of 100 times the suggested size.
*/
-@property (nonatomic, readonly) NSInteger suggestedBatchSize FILEPROVIDER_API_AVAILABILITY_V3;
+@property (nonatomic, readonly) NSInteger suggestedBatchSize FILEPROVIDER_API_AVAILABILITY_V3_IOS;
@end
@@ -154,6 +154,15 @@
enumeration after the previous page. If a file provider sends batches of 200
items to -[NSFileProviderEnumerationObserver didEnumerateItems:] for example,
then successive pages might contain offsets in increments of 200.
+
+ Execution time:
+ ---------------
+ This method is not expected to take more than a few seconds to complete the
+ enumeration of a page of items. If the enumeration may not complete in a reasonable
+ amount of time because, for instance, of bad network conditions, it is recommended
+ to either report an error (for instance NSFileProviderErrorServerUnreachable) or
+ return everything that is readily available and wait for the enumeration of the
+ next page.
*/
- (void)enumerateItemsForObserver:(id<NSFileProviderEnumerationObserver>)observer
startingAtPage:(NSFileProviderPage)page NS_SWIFT_NAME(enumerateItems(for:startingAt:));
@@ -179,6 +188,15 @@
NOTE that the change-based observation methods are marked optional for historical
reasons, but are really required. System performance will be severely degraded if
they are not implemented.
+
+ Execution time:
+ ---------------
+ This method is not expected to take more than a few seconds to complete the
+ enumeration of a batch of items. If the enumeration may not complete in a reasonable
+ amount of time because, for instance, of bad network conditions, it is recommended
+ to either report an error (for instance NSFileProviderErrorServerUnreachable) or
+ return everything that is readily available and wait for the enumeration of the
+ next batch.
*/
- (void)enumerateChangesForObserver:(id<NSFileProviderChangeObserver>)observer
fromSyncAnchor:(NSFileProviderSyncAnchor)syncAnchor NS_SWIFT_NAME(enumerateChanges(for:from:));
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderError.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderError.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderError.h 2022-02-23 07:59:58.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderError.h 2022-05-31 14:50:01.000000000 -0400
@@ -53,16 +53,16 @@
\note Please use -[NSError (NSFileProviderError) fileProviderErrorForRejectedDeletionOfItem:] to build an error with this code.
\see -[NSError (NSFileProviderError) fileProviderErrorForRejectedDeletionOfItem:]
*/
- NSFileProviderErrorDeletionRejected FILEPROVIDER_API_AVAILABILITY_V3 = -1006,
+ NSFileProviderErrorDeletionRejected FILEPROVIDER_API_AVAILABILITY_V3_IOS = -1006,
/** We're trying to non-recursively delete a non-empty directory
*/
- NSFileProviderErrorDirectoryNotEmpty FILEPROVIDER_API_AVAILABILITY_V3 = -1007,
+ NSFileProviderErrorDirectoryNotEmpty FILEPROVIDER_API_AVAILABILITY_V3_IOS = -1007,
/**
Returned by NSFileProviderManager if no provider could be found in the application
*/
- NSFileProviderErrorProviderNotFound FILEPROVIDER_API_AVAILABILITY_V3 = -2001,
+ NSFileProviderErrorProviderNotFound FILEPROVIDER_API_AVAILABILITY_V3_IOS = -2001,
/**
Returned by NSFileProviderManager if the application's provider has been disabled due to app translocation
@@ -93,7 +93,7 @@
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,
+ NSFileProviderErrorCannotSynchronize FILEPROVIDER_API_AVAILABILITY_V3_IOS = -2005,
/**
Returned by NSFileProviderManager if directory eviction failed because the target contains non-evictable items.
@@ -107,21 +107,21 @@
+ domain: NSPOSIXErrorDomain errorCode: EBUSY - if the item had open file descriptors on it.
+ domain: NSPOSIXErrorDomain errorCode: EMLINK : if the item had several hardlinks.
*/
- NSFileProviderErrorNonEvictableChildren FILEPROVIDER_API_AVAILABILITY_V3_1 = -2006,
+ NSFileProviderErrorNonEvictableChildren FILEPROVIDER_API_AVAILABILITY_V3_1_IOS = -2006,
/**
Returned by NSFileProviderManager if item eviction is failing because the item has edits that have not been synced yet
The NSURLErrorKey will be set to with the item URL that has unsynced content.
*/
- NSFileProviderErrorUnsyncedEdits FILEPROVIDER_API_AVAILABILITY_V3_1 = -2007,
+ NSFileProviderErrorUnsyncedEdits FILEPROVIDER_API_AVAILABILITY_V3_1_IOS = -2007,
/**
Returned by NSFileProviderManager if item eviction is failing because the item has not been assigned the evictable capability.
The NSURLErrorKey will be set to with the corresponding item URL.
*/
- NSFileProviderErrorNonEvictable FILEPROVIDER_API_AVAILABILITY_V3_1 = -2008,
+ NSFileProviderErrorNonEvictable FILEPROVIDER_API_AVAILABILITY_V3_1_IOS = -2008,
/**
Returned by the provider to indicate that the requested version for an item cannot be provided.
@@ -131,12 +131,42 @@
happened to the item that outdated the requested version.
*/
NSFileProviderErrorVersionNoLongerAvailable FILEPROVIDER_API_AVAILABILITY_V4_1 = -2009,
+
+ /**
+ Returned by createItemBasedOnTemplate or modifyItem if the provider does not wish to sync the item.
+
+ When a provider returns this error, it causes the item to be excluded from sync. The system will ensure that
+ the item (and any descendents, in case of a directory), are downloaded, and then issue a deleteItem call to the
+ provider for the item.
+
+ The system will call createItemBasedOnTemplate for the item, whenever the item's metadata changes on disk.
+ This ensures that the provider's rules for excluding from sync are re-evaluated whenever the
+ item's properties change.
+
+ Re-evaluating items
+ ------
+
+ If the provider wishes for previously excluded items to be re-sent as createItemBasedOnTemplate calls,
+ the provider may call -[NSFileProviderManager signalErrorResolved:completionHandler:] with this error code.
+
+ If the provider wishes to exclude items which had previously been synced, the provider may call
+ -[NSFileProviderManager requestModificationOfFields:forItemWithIdentifier:options:completionHandler:].
+ This will cause the system to send a new modifyItem call to the provider. At that time, the provider can choose to
+ return this error code.
+ */
+ NSFileProviderErrorExcludedFromSync FILEPROVIDER_API_AVAILABILITY_V2_V5 = -2010,
+
+ /*
+ Returned by the system to indicate that the domain is disabled by the user, and therefore the operation cannot be
+ completed.
+ */
+ NSFileProviderErrorDomainDisabled FILEPROVIDER_API_AVAILABILITY_V5_0_IOS = -2011,
} FILEPROVIDER_API_AVAILABILITY_V2_V3;
@interface NSError (NSFileProviderError)
+ (instancetype)fileProviderErrorForCollisionWithItem:(NSFileProviderItem)existingItem FILEPROVIDER_API_AVAILABILITY_V2_V3;
+ (instancetype)fileProviderErrorForNonExistentItemWithIdentifier:(NSFileProviderItemIdentifier)itemIdentifier FILEPROVIDER_API_AVAILABILITY_V2_V3;
-+ (instancetype)fileProviderErrorForRejectedDeletionOfItem:(NSFileProviderItem)updatedVersion NS_SWIFT_NAME(fileProviderErrorForRejectedDeletion(of:)) FILEPROVIDER_API_AVAILABILITY_V3;
++ (instancetype)fileProviderErrorForRejectedDeletionOfItem:(NSFileProviderItem)updatedVersion NS_SWIFT_NAME(fileProviderErrorForRejectedDeletion(of:)) FILEPROVIDER_API_AVAILABILITY_V3_IOS;
@end
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderItem.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderItem.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderItem.h 2022-02-23 07:59:58.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderItem.h 2022-05-31 15:03:57.000000000 -0400
@@ -58,9 +58,9 @@
Extension should be able to return all trashed items by supporting the creation of a NSFileProviderEnumerator
for the trashed items.
*/
-FOUNDATION_EXPORT NSFileProviderItemIdentifier const NSFileProviderTrashContainerItemIdentifier NS_SWIFT_NAME(NSFileProviderItemIdentifier.trashContainer) FILEPROVIDER_API_AVAILABILITY_V3;
+FOUNDATION_EXPORT NSFileProviderItemIdentifier const NSFileProviderTrashContainerItemIdentifier NS_SWIFT_NAME(NSFileProviderItemIdentifier.trashContainer) FILEPROVIDER_API_AVAILABILITY_V3_IOS;
-FILEPROVIDER_API_AVAILABILITY_V3
+FILEPROVIDER_API_AVAILABILITY_V3_IOS
@interface NSFileProviderItemVersion : NSObject
/**
@@ -76,7 +76,7 @@
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;
+@property (class, readonly, nonnull) NSData *beforeFirstSyncComponent FILEPROVIDER_API_AVAILABILITY_V4_0_IOS;
/**
Items versions have two distinct components, one for the file contents and one
@@ -163,7 +163,7 @@
of the OS or the provider's program to evict items), the provider can set the following key to false in
their Info.plist, in the NSExtension section: NSExtensionFileProviderAllowsUserControlledEviction
*/
- NSFileProviderItemCapabilitiesAllowsEvicting FILEPROVIDER_API_AVAILABILITY_V3 = 1 << 6,
+ NSFileProviderItemCapabilitiesAllowsEvicting API_DEPRECATED("use NSFileProviderContentPolicy instead", macos(11.0, 13.0)) = 1 << 6,
/**
Indicates that the item can be excluded from sync.
@@ -196,7 +196,27 @@
| NSFileProviderItemCapabilitiesAllowsDeleting
};
-FILEPROVIDER_API_AVAILABILITY_V3
+/**
+ NSFileProviderItemContents corresponds to the item's contents.
+
+ Each subsequent field corresponds to a property on NSFileProviderItem that can
+ change.
+ */
+typedef NS_OPTIONS(NSUInteger, NSFileProviderItemFields) {
+ NSFileProviderItemContents = 1 << 0,
+ NSFileProviderItemFilename = 1 << 1,
+ NSFileProviderItemParentItemIdentifier = 1 << 2,
+ NSFileProviderItemLastUsedDate = 1 << 3,
+ NSFileProviderItemTagData = 1 << 4,
+ NSFileProviderItemFavoriteRank = 1 << 5,
+ NSFileProviderItemCreationDate = 1 << 6,
+ NSFileProviderItemContentModificationDate = 1 << 7,
+ NSFileProviderItemFileSystemFlags = 1 << 8,
+ NSFileProviderItemExtendedAttributes = 1 << 9,
+ NSFileProviderItemTypeAndCreator FILEPROVIDER_API_AVAILABILITY_V4_0_IOS = 1 << 10,
+} FILEPROVIDER_API_AVAILABILITY_V3_IOS;
+
+FILEPROVIDER_API_AVAILABILITY_V3_IOS
typedef NS_OPTIONS(NSUInteger, NSFileProviderFileSystemFlags) {
/// Item has the POSIX user-executable (u+x) permission.
NSFileProviderFileSystemUserExecutable = 1 << 0,
@@ -218,7 +238,7 @@
NSFileProviderFileSystemPathExtensionHidden = 1 << 4,
};
-FILEPROVIDER_API_AVAILABILITY_V4_0
+FILEPROVIDER_API_AVAILABILITY_V4_0_IOS
typedef struct NSFileProviderTypeAndCreator {
/**
The first word of the FinderInfo structure. It matches the file type code
@@ -230,6 +250,44 @@
OSType creator;
} NSFileProviderTypeAndCreator;
+FILEPROVIDER_API_AVAILABILITY_V5_0_IOS
+typedef NS_ENUM(NSInteger, NSFileProviderContentPolicy) {
+ /**
+ Inherit the content policy of the parent folder.
+
+ This is the default policy on every item other than the root.
+ */
+ NSFileProviderContentPolicyInherited FILEPROVIDER_API_AVAILABILITY_V5_0_IOS,
+
+ /**
+ Download this item lazily (i.e when it is read) if it is dataless.
+ Download remote content updates eagerly if this file is not dataless.
+ Allow eviction on low disk pressure and other triggers.
+
+ This is the default policy on the root on macOS.
+ */
+ NSFileProviderContentPolicyDownloadLazily FILEPROVIDER_API_AVAILABILITY_V5_0,
+
+ /**
+ Download this item lazily (i.e when it is read.)
+ Evict the file upon remote content update.
+ Also allow eviction on low disk pressure and other triggers.
+
+ This is the default policy on the root on iOS.
+ */
+ NSFileProviderContentPolicyDownloadLazilyAndEvictOnRemoteUpdate FILEPROVIDER_API_AVAILABILITY_V5_0_IOS,
+
+ /**
+ Download this item eagerly (i.e before it is read.)
+ Keep downloading remote updates eagerly.
+ Prevent eviction on low disk pressure and other triggers.
+
+ When an item with the inherited policy is moved into a folder with
+ this policy, the system will automatically schedule a download.
+ */
+ NSFileProviderContentPolicyDownloadEagerlyAndKeepDownloaded FILEPROVIDER_API_AVAILABILITY_V5_0
+};
+
FILEPROVIDER_API_AVAILABILITY_V2_V3
@protocol NSFileProviderItem <NSObject>
@@ -317,7 +375,7 @@
These will be written down in the FinderInfo structure if relevant.
*/
-@property (nonatomic, readonly) NSFileProviderTypeAndCreator typeAndCreator FILEPROVIDER_API_AVAILABILITY_V4_0;
+@property (nonatomic, readonly) NSFileProviderTypeAndCreator typeAndCreator FILEPROVIDER_API_AVAILABILITY_V4_0_IOS;
/**
The capabilities of the item. This controls the list of actions that the UI
@@ -334,7 +392,7 @@
Prior to macOS 11.3, fileSystemFlags are not honored for directories.
*/
-@property (nonatomic, readonly) NSFileProviderFileSystemFlags fileSystemFlags FILEPROVIDER_API_AVAILABILITY_V3;
+@property (nonatomic, readonly) NSFileProviderFileSystemFlags fileSystemFlags FILEPROVIDER_API_AVAILABILITY_V3_IOS;
@property (nonatomic, readonly, copy, nullable) NSNumber *documentSize;
@property (nonatomic, readonly, copy, nullable) NSNumber *childItemCount;
@@ -377,7 +435,7 @@
will be communicated under NSFileProviderItemContents. Remote changes to
the resource fork should bump itemVersion.contentVersion.
*/
-@property (nonatomic, readonly, strong) NSDictionary <NSString *, NSData *> *extendedAttributes FILEPROVIDER_API_AVAILABILITY_V3;
+@property (nonatomic, readonly, strong) NSDictionary <NSString *, NSData *> *extendedAttributes FILEPROVIDER_API_AVAILABILITY_V3_IOS;
/*
@@ -435,10 +493,6 @@
Trashed items should remain in the working set; however, children of trashed
directories should be removed from the working set.
-
- Additionally, when an item is trashed, the `parentItemIdentifier` refers to the location the item was before being
- trashed. As such, when the user decides to restore the item from trash, `parentItemIdentifier` will be used for
- the default restore location.
*/
@property (nonatomic, readonly, getter=isTrashed) BOOL trashed FILEPROVIDER_API_AVAILABILITY_V2;
@@ -505,7 +559,7 @@
/**
The version is used to track which version of an item has been modified when informing a provider about changes. It is also used to invalidate the thumbnail cache.
*/
-@property (nonatomic, strong, readonly) NSFileProviderItemVersion *itemVersion FILEPROVIDER_API_AVAILABILITY_V3;
+@property (nonatomic, strong, readonly) NSFileProviderItemVersion *itemVersion FILEPROVIDER_API_AVAILABILITY_V3_IOS;
/**
The target of a symlink.
@@ -514,7 +568,7 @@
this field should contain the target of the symlink.
*/
@property (nonatomic, readonly, copy, nullable) NSString *symlinkTargetPath
- FILEPROVIDER_API_AVAILABILITY_V3;
+FILEPROVIDER_API_AVAILABILITY_V3_IOS;
/**
Use this dictionary to add state information to the item. Entries are accessible to
@@ -715,6 +769,10 @@
*/
@property (nonatomic, strong, readonly, nullable) NSDictionary *userInfo;
+/**
+ Declarative API to define the item content policy according to the available NSFileProviderContentPolicy
+ */
+@property (nonatomic, readonly) NSFileProviderContentPolicy contentPolicy FILEPROVIDER_API_AVAILABILITY_V5_0_IOS;
@end
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderItemDecoration.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderItemDecoration.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderItemDecoration.h 2022-02-12 07:51:27.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderItemDecoration.h 2022-05-21 09:07:05.000000000 -0400
@@ -9,7 +9,7 @@
#import <FileProvider/NSFileProviderDefines.h>
#import <FileProvider/NSFileProviderItem.h>
-FILEPROVIDER_API_AVAILABILITY_V3
+FILEPROVIDER_API_AVAILABILITY_V3_IOS
typedef NSString *NSFileProviderItemDecorationIdentifier NS_TYPED_EXTENSIBLE_ENUM;
/**
@@ -60,7 +60,7 @@
*/
-FILEPROVIDER_API_AVAILABILITY_V3
+FILEPROVIDER_API_AVAILABILITY_V3_IOS
@protocol NSFileProviderItemDecorating <NSFileProviderItem>
/**
Returns an array of decorations for the item.
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderManager.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderManager.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderManager.h 2022-02-23 10:57:51.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderManager.h 2022-05-31 15:03:57.000000000 -0400
@@ -9,6 +9,7 @@
#import <FileProvider/NSFileProviderItem.h>
#import <FileProvider/NSFileProviderDomain.h>
#import <FileProvider/NSFileProviderEnumerating.h>
+#import <FileProvider/NSFileProviderModifyItemOptions.h>
NS_ASSUME_NONNULL_BEGIN
@@ -19,16 +20,16 @@
typedef NS_ENUM(NSInteger, NSFileProviderDomainRemovalMode) {
/// Don't keep any files that are current in the domain
- NSFileProviderDomainRemovalModeRemoveAll = 0,
+ NSFileProviderDomainRemovalModeRemoveAll FILEPROVIDER_API_AVAILABILITY_V4_0_IOS = 0,
/// Delete the domain from the system but keeps the at least all the
/// dirty corresponding user data around.
- NSFileProviderDomainRemovalModePreserveDirtyUserData = 1,
+ NSFileProviderDomainRemovalModePreserveDirtyUserData FILEPROVIDER_API_AVAILABILITY_V4_0 = 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;
+ NSFileProviderDomainRemovalModePreserveDownloadedUserData FILEPROVIDER_API_AVAILABILITY_V4_0 = 2,
+} NS_SWIFT_NAME(NSFileProviderManager.DomainRemovalMode) FILEPROVIDER_API_AVAILABILITY_V4_0_IOS;
/**
The file provider manager allows you to communicate with the file provider
@@ -70,19 +71,23 @@
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.
+ When using NSFileProviderExtension, the system will enumerate containers
+ while the user is viewing them in the UI. If there are changes to the container
+ while an enumerator is open, call this method with the identifier of that
+ container. This will trigger another call to
+ -[NSFileProviderEnumerator enumerateChangesForObserver:fromSyncAnchor:] on
+ that enumerator, 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
+ If there are changes 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.
+ even if there is no live enumeration for the working set container.
+
+ When using NSFileProviderReplicatedExtension, only call this
+ method with NSFileProviderWorkingSetContainerItemIdentifier. Other container
+ identifiers are ignored. The system will automatically propagate
+ working set changes to the UI, without explicitly signaling the
+ containers currently being viewed in the UI.
In addition to using this method, your application/extension can register for
pushes using the PKPushTypeFileProvider push type. Pushes of the form
@@ -96,7 +101,7 @@
- (void)signalEnumeratorForContainerItemIdentifier:(NSFileProviderItemIdentifier)containerItemIdentifier completionHandler:(void (^)(NSError * __nullable error))completion NS_SWIFT_NAME(signalEnumerator(for:completionHandler:));
/**
- Return the user visible URL for an item identifier.
+ Return the security scoped URL to the user visible location for an item identifier.
The caller must use file coordination (see NSFileCoordinator) if it wishes to read the
content or list the children of the URL. The caller should not try to manipulate files
@@ -112,8 +117,17 @@
This attribute is only set if the item has been assigned a different local name following
a collision. Such local names are not synced up to the provider; the purpose of the attribute is
to enable consistency checkers to detect this case.
+
+ Before accessing the content of the returned URL, the caller must call `-[NSURL startAccessingSecurityScopedResource]
+ on the returned URL and call `-[NSURL stopAccessingSecurityScopedResource]` when done accessing the content.
+
+ On macOS, the returned URL grants read-write access to the user visible location for the corresponding
+ item. On iOS, the the returned URL grants read-only access to the user visible location.
+
+ On iOS, for replicated domains, the extension process will never be granted access to the user
+ visible location, this function will always fail with `NSFileReadNoPermissionError`.
*/
-- (void)getUserVisibleURLForItemIdentifier:(NSFileProviderItemIdentifier)itemIdentifier completionHandler:(void (^)(NSURL * __nullable userVisibleFile, NSError * __nullable error))completionHandler FILEPROVIDER_API_AVAILABILITY_V3 NS_SWIFT_NAME(getUserVisibleURL(for:completionHandler:));
+- (void)getUserVisibleURLForItemIdentifier:(NSFileProviderItemIdentifier)itemIdentifier completionHandler:(void (^)(NSURL * __nullable userVisibleFile, NSError * __nullable error))completionHandler FILEPROVIDER_API_AVAILABILITY_V3_IOS NS_SWIFT_NAME(getUserVisibleURL(for:completionHandler:));
/**
Return the identifier and domain for a user visible URL.
@@ -123,7 +137,7 @@
provider/domain, or which hasn't yet been assigned an identifier by
the provider will return the Cocoa error NSFileNoSuchFileError.
*/
-+ (void)getIdentifierForUserVisibleFileAtURL:(NSURL *)url completionHandler:(void (^)(NSFileProviderItemIdentifier __nullable itemIdentifier, NSFileProviderDomainIdentifier __nullable domainIdentifier, NSError * __nullable error))completionHandler FILEPROVIDER_API_AVAILABILITY_V3;
++ (void)getIdentifierForUserVisibleFileAtURL:(NSURL *)url completionHandler:(void (^)(NSFileProviderItemIdentifier __nullable itemIdentifier, NSFileProviderDomainIdentifier __nullable domainIdentifier, NSError * __nullable error))completionHandler FILEPROVIDER_API_AVAILABILITY_V3_IOS;
/**
Registers the given NSURLSessionTask to be responsible for the specified item.
@@ -169,7 +183,7 @@
This call will not fail when called from the extension process with an active instance of the extension
for that domain.
*/
-- (nullable NSURL *)temporaryDirectoryURLWithError:(NSError **)error FILEPROVIDER_API_AVAILABILITY_V3;
+- (nullable NSURL *)temporaryDirectoryURLWithError:(NSError **)error FILEPROVIDER_API_AVAILABILITY_V3_IOS;
/**
Writes out a placeholder at the specified URL. The placeholder is used in place
@@ -221,7 +235,7 @@
/**
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;
++ (void)removeDomain:(NSFileProviderDomain *)domain mode:(NSFileProviderDomainRemovalMode)mode completionHandler:(void(^)(NSURL *_Nullable_result preservedLocation, NSError *_Nullable error))completionHandler FILEPROVIDER_API_AVAILABILITY_V4_0_IOS;
/**
Get all registered domains.
@@ -243,7 +257,7 @@
- NSFileProviderErrorCannotSynchronize
*/
- (void)signalErrorResolved:(NSError *)error completionHandler:(void(^)(NSError *_Nullable error))completionHandler
- FILEPROVIDER_API_AVAILABILITY_V3;
+FILEPROVIDER_API_AVAILABILITY_V3_IOS;
/**
Returns the global progress for the specified kind of operations
@@ -269,7 +283,7 @@
The returned progress will have its fileOperationKind property set.
*/
-- (NSProgress *)globalProgressForKind:(NSProgressFileOperationKind)kind NS_SWIFT_NAME(globalProgress(for:)) FILEPROVIDER_API_AVAILABILITY_V3_1;
+- (NSProgress *)globalProgressForKind:(NSProgressFileOperationKind)kind NS_SWIFT_NAME(globalProgress(for:)) FILEPROVIDER_API_AVAILABILITY_V3_1_IOS;
@end
@@ -281,7 +295,7 @@
*/
FOUNDATION_EXPORT NSNotificationName const NSFileProviderMaterializedSetDidChange
-FILEPROVIDER_API_AVAILABILITY_V3_1;
+FILEPROVIDER_API_AVAILABILITY_V3_1_IOS;
@interface NSFileProviderManager (MaterializedSet)
@@ -300,7 +314,7 @@
- The app/extension enumerates the materialized set after the system calls
'materializedItemsDidChangeWithCompletionHandler'.
*/
-- (id<NSFileProviderEnumerator>)enumeratorForMaterializedItems FILEPROVIDER_API_AVAILABILITY_V3;
+- (id<NSFileProviderEnumerator>)enumeratorForMaterializedItems FILEPROVIDER_API_AVAILABILITY_V3_IOS;
@end
@@ -311,9 +325,9 @@
Note, this notification starts to be posted only after `+[NSFileProviderManager getDomainsWithCompletionHandler:]` is called.
*/
FOUNDATION_EXPORT NSNotificationName const NSFileProviderPendingSetDidChange
-FILEPROVIDER_API_AVAILABILITY_V3_1;
+FILEPROVIDER_API_AVAILABILITY_V3_1_IOS;
-FILEPROVIDER_API_AVAILABILITY_V3_1
+FILEPROVIDER_API_AVAILABILITY_V3_1_IOS
@protocol NSFileProviderPendingSetEnumerator <NSFileProviderEnumerator>
/**
@@ -340,7 +354,7 @@
On later modifications in the set, the system will call
'pendingItemsDidChangeWithCompletionHandler'.
*/
-- (id<NSFileProviderPendingSetEnumerator>)enumeratorForPendingItems FILEPROVIDER_API_AVAILABILITY_V3_1;
+- (id<NSFileProviderPendingSetEnumerator>)enumeratorForPendingItems FILEPROVIDER_API_AVAILABILITY_V3_1_IOS;
@end
@@ -374,7 +388,7 @@
will be received for both the import and the scan.
*/
+ (void)importDomain:(NSFileProviderDomain *)domain fromDirectoryAtURL:(NSURL *)url completionHandler:(void(^)(NSError * _Nullable error))completionHandler
- FILEPROVIDER_API_AVAILABILITY_V3;
+FILEPROVIDER_API_AVAILABILITY_V3_IOS;
/** Notify the system that the itemIdentifiers known by the system are not valid anymore.
@@ -415,7 +429,22 @@
- (void)reimportItemsBelowItemWithIdentifier:(NSFileProviderItemIdentifier)itemIdentifier
completionHandler:(void (^)(NSError * _Nullable error))completionHandler
NS_SWIFT_NAME(reimportItems(below:completionHandler:))
- FILEPROVIDER_API_AVAILABILITY_V3;
+FILEPROVIDER_API_AVAILABILITY_V3_IOS;
+
+/**
+ Request that the system schedules a call to -[NSFileProviderReplicatedExtension modifyItem:] for the given item identifier.
+ The fields passed to modifyItem will contain at least the set requested via the `fields` parameter.
+ The completion handler is called when the system has persisted the request. There is no guarantee as to when the
+ modifyItem call will be scheduled.
+ The completion handler may be called with an error. If the provider passes the `.content` field when the item
+ is not downloaded, or when the item is a folder, then the system will return CocoaError(.ubiquitousFileUnavailable).
+ */
+- (void)requestModificationOfFields:(NSFileProviderItemFields)fields
+ forItemWithIdentifier:(NSFileProviderItemIdentifier)itemIdentifier
+ options:(NSFileProviderModifyItemOptions)options
+ completionHandler:(void(^)(NSError *_Nullable error))completionHandler
+FILEPROVIDER_API_AVAILABILITY_V2_V5;
+
@end
@@ -446,7 +475,7 @@
- (void)evictItemWithIdentifier:(NSFileProviderItemIdentifier)itemIdentifier
completionHandler:(void (^)(NSError * _Nullable error))completionHandler
NS_SWIFT_NAME(evictItem(identifier:completionHandler:))
- FILEPROVIDER_API_AVAILABILITY_V3;
+FILEPROVIDER_API_AVAILABILITY_V3_IOS;
@end
@@ -473,7 +502,7 @@
- (void)waitForChangesOnItemsBelowItemWithIdentifier:(NSFileProviderItemIdentifier)itemIdentifier
completionHandler:(void (^)(NSError * _Nullable error))completionHandler
NS_SWIFT_NAME(waitForChanges(below:completionHandler:))
- FILEPROVIDER_API_AVAILABILITY_V3;
+FILEPROVIDER_API_AVAILABILITY_V3_IOS;
@end
@interface NSFileProviderManager (Stabilization)
@@ -488,7 +517,7 @@
The completion handler is called when both sets of changes are caught up to at least the time
of the call. This is useful to enforce a consistent state for testing.
*/
-- (void)waitForStabilizationWithCompletionHandler:(void(^)(NSError * _Nullable error))completionHandler FILEPROVIDER_API_AVAILABILITY_V3;
+- (void)waitForStabilizationWithCompletionHandler:(void(^)(NSError * _Nullable error))completionHandler FILEPROVIDER_API_AVAILABILITY_V3_IOS;
@end
typedef NS_OPTIONS(NSUInteger, NSFileProviderManagerDisconnectionOptions) {
@@ -507,4 +536,31 @@
- (void)reconnectWithCompletionHandler:(void(^)(NSError * _Nullable error))completionHandler FILEPROVIDER_API_AVAILABILITY_V3;
@end
+@interface NSFileProviderManager (Materialize)
+
+/**
+ Request that the system schedule a download for an item.
+
+ The completion handler is called when the system acknowledges the download request,
+ or with an error indicating why it didn't (e.g NSFileProviderErrorNoSuchItem.)
+ The system will then call -fetchContentsForItemWithIdentifier at the earliest
+ convenient time.
+
+ Set rangeToMaterialize to NSMakeRange(offset, nbytes) to request a partial download.
+ The system will then invoke -fetchPartialContentsForItemWithIdentifier instead of
+ fetchContentsForItemWithIdentifier. For a full download, set rangeToMaterialize to
+ NSMakeRange(NSNotFound, 0). -[NSFileProviderManager evictItemWithIdentifier:completionHandler:]
+ must be called on a partially materialized file before requesting an extent to be downloaded from a
+ later version of the file.
+
+ This method cannot be used to download directories recursively. When invoked on a
+ dataless directory, it will trigger an enumeration of the directory, causing a
+ materialization of the directory one level down only. All the children of the
+ directory will remain dataless after the enumeration.
+ */
+- (void)requestDownloadForItemWithIdentifier:(NSFileProviderItemIdentifier)itemIdentifier
+ requestedRange:(NSRange)rangeToMaterialize
+ completionHandler:(void (^)(NSError * _Nullable error))completionHandler NS_REFINED_FOR_SWIFT FILEPROVIDER_API_AVAILABILITY_V5_0;
+@end
+
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderModifyItemOptions.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderModifyItemOptions.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderModifyItemOptions.h 1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderModifyItemOptions.h 2022-05-21 09:07:05.000000000 -0400
@@ -0,0 +1,18 @@
+//
+// NSFileProviderModifyItemOptions.h
+//
+// Copyright © 2019-2022 Apple Inc. All rights reserved.
+//
+
+#import <FileProvider/NSFileProviderDefines.h>
+
+typedef NS_OPTIONS(NSUInteger, NSFileProviderModifyItemOptions) {
+ /**
+ We're moving the item to a location where it may refer to an item that already exists. This may happen
+ when two directories are being merged together. When this happens some items may be merged to the
+ same directory and we end up in a situation where the merged contains may also exist.
+
+ This is similar to NSFileProviderCreateItemMayAlreadyExist
+ */
+ NSFileProviderModifyItemMayAlreadyExist = 1 << 0,
+} FILEPROVIDER_API_AVAILABILITY_V3_IOS;
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderReplicatedExtension.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderReplicatedExtension.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderReplicatedExtension.h 2022-02-23 10:57:52.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderReplicatedExtension.h 2022-05-31 15:03:57.000000000 -0400
@@ -13,6 +13,7 @@
#import <FileProvider/NSFileProviderService.h>
#import <FileProvider/NSFileProviderActions.h>
#import <FileProvider/NSFileProviderRequest.h>
+#import <FileProvider/NSFileProviderModifyItemOptions.h>
NS_ASSUME_NONNULL_BEGIN
@@ -25,7 +26,7 @@
*/
typedef NS_OPTIONS(NSUInteger, NSFileProviderCreateItemOptions) {
/**
- The imported item may already exists.
+ The imported item may already exist.
This can happen because:
@@ -40,9 +41,14 @@
The Extension should assess whether the item could actually be a disk
representation of an already existing item.
- Since this can happens when the system has to reimport all the existing
- item from disk, it is advised that the assessment method avoids
- computational intensive tasks, such as checksumming the item.
+ The best user experience is to match the requested item to one on the server,
+ if the extension is able to confirm that the disk item is representing an item already on
+ the server.
+
+ Given that this flag may be set when the system is reimporting all items from disk,
+ it is advised that the Extension attempts assessment methods for each item
+ in order from cheapest to most expensive (in terms of CPU and network), in order
+ to avoid unnecessary work.
When all the items pending reimport have been processed, the system
will call -[NSFileProviderExtension importDidFinishWithCompletionHandler:].
@@ -55,9 +61,9 @@
This happens only if the edit wasn't yet known by the system at the time the
deletion was requested.
*/
- NSFileProviderCreateItemDeletionConflicted FILEPROVIDER_API_AVAILABILITY_V3_1 = 1 << 1,
+ NSFileProviderCreateItemDeletionConflicted FILEPROVIDER_API_AVAILABILITY_V3_1_IOS = 1 << 1,
-} FILEPROVIDER_API_AVAILABILITY_V3;
+} FILEPROVIDER_API_AVAILABILITY_V3_IOS;
/**
Options passed on item deletion.
@@ -67,38 +73,7 @@
The deletion of the item is recursive.
*/
NSFileProviderDeleteItemRecursive = 1 << 0,
-} FILEPROVIDER_API_AVAILABILITY_V3;
-
-typedef NS_OPTIONS(NSUInteger, NSFileProviderModifyItemOptions) {
- /**
- We're moving the item to a location where it may refer to an item that already exists. This may happen
- when two directories are being merged together. When this happens some items may be merged to the
- same directory and we end up in a situation where the merged contains may also exist.
-
- This is similar to NSFileProviderCreateItemMayAlreadyExist
- */
- NSFileProviderModifyItemMayAlreadyExist = 1 << 0,
-} FILEPROVIDER_API_AVAILABILITY_V3;
-
-/**
- NSFileProviderItemContents corresponds to the item's contents.
-
- Each subsequent field corresponds to a property on NSFileProviderItem that can
- change.
- */
-typedef NS_OPTIONS(NSUInteger, NSFileProviderItemFields) {
- NSFileProviderItemContents = 1 << 0,
- NSFileProviderItemFilename = 1 << 1,
- NSFileProviderItemParentItemIdentifier = 1 << 2,
- NSFileProviderItemLastUsedDate = 1 << 3,
- NSFileProviderItemTagData = 1 << 4,
- NSFileProviderItemFavoriteRank = 1 << 5,
- NSFileProviderItemCreationDate = 1 << 6,
- NSFileProviderItemContentModificationDate = 1 << 7,
- NSFileProviderItemFileSystemFlags = 1 << 8,
- NSFileProviderItemExtendedAttributes = 1 << 9,
- NSFileProviderItemTypeAndCreator FILEPROVIDER_API_AVAILABILITY_V4_0 = 1 << 10,
-} FILEPROVIDER_API_AVAILABILITY_V3;
+} FILEPROVIDER_API_AVAILABILITY_V3_IOS;
/**
NSFileProviderMaterializationFlags are used to inform the system about specific conditions
@@ -107,8 +82,12 @@
*/
typedef NS_OPTIONS(NSUInteger, NSFileProviderMaterializationFlags) {
/**
- Mark the file as fully materialized even though it's sparse.
- This flag is ignored if the provided range doesn't cover the entire file (ie. [0, EOF])
+ By default, the system will track which parts of the returned file are sparse; those parts will remain non-materialized
+ and trigger subsequent calls to the materialization methods on access. Returning this flag will instead cause the entire
+ file to be marked as materialized. This is useful if the resulting file is known to contain sparse parts,
+ and all the remaining parts have been filled in.
+ This flag is ignored if the provided range doesn't cover the entire file (ie. [0, EOF]).
+ This flag is currently ignored.
*/
NSFileProviderMaterializationFlagsKnownSparseRanges = (1 << 0)
} FILEPROVIDER_API_AVAILABILITY_V4_1;
@@ -127,7 +106,7 @@
#pragma mark - Extension with FPFS support
-FILEPROVIDER_API_AVAILABILITY_V3
+FILEPROVIDER_API_AVAILABILITY_V3_IOS
@protocol NSFileProviderEnumerating <NSObject>
/**
@@ -179,6 +158,13 @@
YES in its Info.plist, it is considered to apply the changes atomically, in which case the
system does not need to check for potential races.
+ Execution time:
+ ---------------
+ The system expects this call to complete quickly, it should build the object that will be
+ used for enumeration and return it. The enumeration logic should happen when the system
+ calls `-[NSFileProviderEnumerator enumerateItemsForObserver:startingAtPage:]` or
+ `-[NSFileProviderEnumerator enumerateChangesForObserver:fromSyncAnchor:]`.
+
Error cases:
------------
If containerItemIdentifier is NSFileProviderTrashContainerItemIdentifier and
@@ -243,15 +229,15 @@
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
+ - downloads. The system has a per-domain 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
+ - uploads. The system has a per-domain 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
+FILEPROVIDER_API_AVAILABILITY_V3_IOS
@protocol NSFileProviderReplicatedExtension <NSObject, NSFileProviderEnumerating>
/**
@@ -302,6 +288,15 @@
If the NSProgress returned by this method is cancelled, the extension should
call the completion handler with (nil, NSUserCancelledError) in the NSProgress
cancellation handler.
+
+ Execution time:
+ ---------------
+ This method is not expected to take more than a few seconds to complete the retrieval of the
+ metadata of the item. If the operation may not complete in a reasonable amount of time because,
+ for instance, of bad network conditions, it is recommended to report an error (for instance
+ NSFileProviderErrorServerUnreachable). The system will call `cancel` on the progress if the
+ operation takes too much time. The extension is then expected to quickly call the completion
+ handler.
*/
- (NSProgress *)itemForIdentifier:(NSFileProviderItemIdentifier)identifier
request:(NSFileProviderRequest *)request
@@ -339,6 +334,8 @@
File ownership:
---------------
+ The retrieved content at `fileContents` URL must be a regular file on the same volume as the user-visible URL.
+ A suitable location can be retrieved using -[NSFileProviderManager temporaryDirectoryURLWithError:].
The system clones and unlinks the received fileContents. The extension should not mutate the corresponding
file after calling the completion handler. If the extension wishes to keep a copy of the content, it must
provide a clone of the that content as the URL passed to the completion handler.
@@ -396,7 +393,13 @@
The returned NSProgress is used to show progress to the user. If the user cancels the
fetch, the extension should stop fetching the item, as it is no longer required.
- */
+ Execution time:
+ ---------------
+ The system will grant enough time to the extension to download the file. The system will interrupt the
+ call if it stops making progress or if download takes an unexpectedly long time. In that case, the system
+ will call `cancel` on the progress. The extension is then expected to quickly call the completion
+ handler.
+ */
- (NSProgress *)fetchContentsForItemWithIdentifier:(NSFileProviderItemIdentifier)itemIdentifier
version:(nullable NSFileProviderItemVersion *)requestedVersion
request:(NSFileProviderRequest *)request
@@ -542,6 +545,14 @@
If the NSProgress returned by this method is cancelled, the extension should
call the completion handler with (nil, [], NO, NSUserCancelledError) in the NSProgress
cancellation handler.
+
+ Execution time:
+ ---------------
+ The system will grant enough time to the extension to upload the file if content is passed to the call,
+ otherwise the call is expected to completed within a few seconds. The system will interrupt the
+ call if it stops making progress or if upload takes an unexpectedly long time. In that case, the system
+ will call `cancel` on the progress. The extension is then expected to quickly call the completion
+ handler.
*/
- (NSProgress *)createItemBasedOnTemplate:(NSFileProviderItem)itemTemplate
fields:(NSFileProviderItemFields)fields
@@ -706,6 +717,14 @@
If the NSProgress returned by this method is cancelled, the extension should
call the completion handler with (nil, [], NO, NSUserCancelledError) in the NSProgress
cancellation handler.
+
+ Execution time:
+ ---------------
+ The system will grant enough time to the extension to upload the file if content is passed to the call,
+ otherwise the call is expected to completed within a few seconds. The system will interrupt the
+ call if it stops making progress or if upload takes an unexpectedly long time. In that case, the system
+ will call `cancel` on the progress. The extension is then expected to quickly call the completion
+ handler.
*/
- (NSProgress *)modifyItem:(NSFileProviderItem)item
baseVersion:(NSFileProviderItemVersion *)version
@@ -792,6 +811,13 @@
If the NSProgress returned by this method is cancelled, the extension should
call the completion handler with (NSUserCancelledError) in the NSProgress
cancellation handler.
+
+ Execution time:
+ ---------------
+ This call is not expected to take more than a few seconds to complete. The system will interrupt the
+ call if it stops making progress or if the deletion takes an unexpectedly long time. In that case,the system
+ will call `cancel` on the progress. The extension is then expected to quickly call the completion
+ handler.
*/
- (NSProgress *)deleteItemWithIdentifier:(NSFileProviderItemIdentifier)identifier
baseVersion:(NSFileProviderItemVersion *)version
@@ -828,6 +854,10 @@
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.
+
+ Execution time:
+ ---------------
+ This call is not expected to take more than a few seconds to complete.
*/
- (void)importDidFinishWithCompletionHandler:(void (^)(void))completionHandler;
@@ -882,6 +912,10 @@
Since this method is called on every change of the set of materialized items,
it is advisable to use it to set a flag and perform any resulting work as a
timed task rather than performing any work directly.
+
+ Execution time:
+ ---------------
+ This call is not expected to take more than a few seconds to complete.
*/
- (void)materializedItemsDidChangeWithCompletionHandler:(void (^)(void))completionHandler;
@@ -921,8 +955,12 @@
Thus, implementeers should not use the pending set to detect when a change happens.
The pending set will only contain items that were pending for a least one second before the
last refresh date.
+
+ Execution time:
+ ---------------
+ This call is not expected to take more than a few seconds to complete.
*/
-- (void)pendingItemsDidChangeWithCompletionHandler:(void (^)(void))completionHandler FILEPROVIDER_API_AVAILABILITY_V3_1;
+- (void)pendingItemsDidChangeWithCompletionHandler:(void (^)(void))completionHandler FILEPROVIDER_API_AVAILABILITY_V3_1_IOS;
@end
@@ -931,7 +969,7 @@
/**
Protocol to implement if the provider instance supports fetching incremental content changes.
*/
-FILEPROVIDER_API_AVAILABILITY_V3
+FILEPROVIDER_API_AVAILABILITY_V3_IOS
@protocol NSFileProviderIncrementalContentFetching <NSObject>
/**
@@ -953,7 +991,7 @@
@end
-FILEPROVIDER_API_AVAILABILITY_V3
+FILEPROVIDER_API_AVAILABILITY_V3_IOS
@protocol NSFileProviderServicing <NSObject>
/**
@@ -969,6 +1007,13 @@
If the NSProgress returned by this method is cancelled, the extension should
call the completion handler with (nil, NSUserCancelledError) in the NSProgress
cancellation handler.
+
+ Execution time:
+ ---------------
+ This method is not expected to take more than a few seconds to complete the retrieval of the
+ thumbnails. The system will call `cancel` on the progress if the
+ operation takes too much time. The extension is then expected to quickly call the completion
+ handler.
*/
- (NSProgress *)supportedServiceSourcesForItemIdentifier:(NSFileProviderItemIdentifier)itemIdentifier
completionHandler:(void (^)(NSArray <id <NSFileProviderServiceSource>> * _Nullable, NSError * _Nullable))completionHandler
@@ -979,7 +1024,7 @@
/**
Protocol to implement if the provider supports fetching thumbnails for its items.
*/
-FILEPROVIDER_API_AVAILABILITY_V3
+FILEPROVIDER_API_AVAILABILITY_V3_IOS
@protocol NSFileProviderThumbnailing <NSObject>
/**
@@ -1015,6 +1060,13 @@
If the NSProgress returned by this method is cancelled, the extension should
call the completion handler with (NSUserCancelledError) in the NSProgress
cancellation handler.
+
+ Execution time:
+ ---------------
+ This method is not expected to take more than a few tens seconds to complete the retrieval of the
+ services exposed on the item. The system will call `cancel` on the progress if the
+ operation takes too much time. The extension is then expected to quickly call the completion
+ handler.
*/
- (NSProgress *)fetchThumbnailsForItemIdentifiers:(NSArray<NSFileProviderItemIdentifier> *)itemIdentifiers
requestedSize:(CGSize)size
@@ -1024,7 +1076,7 @@
@end
-FILEPROVIDER_API_AVAILABILITY_V3
+FILEPROVIDER_API_AVAILABILITY_V3_IOS
@protocol NSFileProviderCustomAction <NSObject>
/**
@@ -1073,6 +1125,10 @@
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.
+
+ Execution time:
+ ---------------
+ This method is expected to complete immediately.
*/
- (void)setInteractionSuppressed:(BOOL)suppression forIdentifier:(NSString *)suppressionIdentifier;
@@ -1080,7 +1136,7 @@
@end
-FILEPROVIDER_API_AVAILABILITY_V3_1
+FILEPROVIDER_API_AVAILABILITY_V3_1_IOS
@protocol NSFileProviderDomainState <NSObject>
/**
@@ -1141,8 +1197,20 @@
In addition to the content the extension needs to fill in fetchedRange with either the requestest range,
<location, length>, or indicate full materialization with, <0, file size>.
+ On-disk layout:
+ ---------------
+ The retrieved content at `fileContents` URL must be a regular file on the same volume as the user-visible URL.
+ A suitable location can be retrieved using -[NSFileProviderManager temporaryDirectoryURLWithError:].
+ The file contents outside of the fetched range are ignored by the system. The system only requires the file
+ to be at least as large as the end of the fetched range. For instance, if the fetchedRange is {offset:0x100000, length:0x1000},
+ the file size must be at least 0x101000 bytes. Any data (or lack thereof) beyond the fetched range is ignored.
+
+ The fetched range must be stored in this file at the same offset as the range indicates.
+ For instance if the retrievedRange is {offset:0x100000, length:0x1000} then it should actually be at offset 0x100000 in the
+ `fileContents` file. The ranges {0, 0x100000}, and {0x101000, EOF} can be anything including sparse ranges.
+
Concurrent Downloads:
- ----------
+ ---------------
The system will call fetchContents concurrently if there are multiple outstanding file download requests.
The provider can control the concurrency by setting the key NSExtensionFileProviderDownloadPipelineDepth
in the Info.plist of the extension to the number of concurrent downloads that the system should create
@@ -1162,14 +1230,14 @@
---------------
The system automatically downloads files on POSIX accesses. The extension may wish to disallow this class of
- downloads for specific applications. Currently only POSIX accesses trigger this message so that would render this
- message superfluous in such cases.
+ 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.
- This list will not be checked for downloads requested through file coordination.
+ 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:
------------
@@ -1208,6 +1276,12 @@
The returned NSProgress is used to show progress to the user. If the user cancels the
fetch, the extension should stop fetching the item, as it is no longer required.
+ Execution time:
+ ---------------
+ The system will grant enough time to the extension to download the file. The system will interrupt the
+ call if it stops making progress or if download takes an unexpectedly long time. In that case, the system
+ will call `cancel` on the progress. The extension is then expected to quickly call the completion
+ handler.
*/
- (NSProgress *)fetchPartialContentsForItemWithIdentifier:(NSFileProviderItemIdentifier)itemIdentifier
version:(NSFileProviderItemVersion *)requestedVersion
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderRequest.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderRequest.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderRequest.h 2022-02-12 07:51:27.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderRequest.h 2022-05-21 09:07:05.000000000 -0400
@@ -11,7 +11,7 @@
NS_ASSUME_NONNULL_BEGIN
-FILEPROVIDER_API_AVAILABILITY_V3
+FILEPROVIDER_API_AVAILABILITY_V3_IOS
@interface NSFileProviderRequest : NSObject
/**
The request was made by the sync system, e.g. to update a file to its latest version after a remote update was pushed.
@@ -48,7 +48,7 @@
If the extension doesn't implement the NSFileProviderDomainState protocol, this will be nil.
*/
-@property (nonatomic, readonly, nullable) NSFileProviderDomainVersion *domainVersion FILEPROVIDER_API_AVAILABILITY_V3_1;
+@property (nonatomic, readonly, nullable) NSFileProviderDomainVersion *domainVersion FILEPROVIDER_API_AVAILABILITY_V3_1_IOS;
@end
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderService.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderService.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderService.h 2022-02-12 07:51:27.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderService.h 2022-05-21 09:07:05.000000000 -0400
@@ -9,6 +9,7 @@
#import <FileProvider/NSFileProviderDefines.h>
#import <FileProvider/NSFileProviderExtension.h>
#import <FileProvider/NSFileProviderItem.h>
+#import <FileProvider/NSFileProviderManager.h>
NS_ASSUME_NONNULL_BEGIN
@@ -35,6 +36,17 @@
*/
- (nullable NSXPCListenerEndpoint *)makeListenerEndpointAndReturnError:(NSError **)error;
+@optional
+
+/**
+ Indicates whether access to the service is restricted.
+
+ A restricted service can only be accessed by processes that can manage the domain the service is attached to. It is only accessible
+ through `-[NSFileProviderManager getServiceWithName:itemIdentifier:completionHandler:]`
+ */
+
+@property (readonly, nonatomic, getter=isRestricted) BOOL restricted FILEPROVIDER_API_AVAILABILITY_V2_V5;
+
@end
/**
@@ -51,4 +63,19 @@
@end
+
+FILEPROVIDER_API_AVAILABILITY_V2_V5
+@interface NSFileProviderManager (NSFileProviderService)
+
+/**
+ Retrieve the service with the specified named for the specified item.
+ */
+- (void)getServiceWithName:(NSFileProviderServiceName)serviceName
+ itemIdentifier:(NSFileProviderItemIdentifier)itemIdentifier
+ completionHandler:(void (^)(NSFileProviderService * _Nullable_result, NSError * _Nullable))completionHandler
+ NS_SWIFT_NAME(getService(named:for:completionHandler:))
+ NS_SWIFT_ASYNC_NAME(service(named:for:));
+
+@end
+
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderTesting.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderTesting.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderTesting.h 2022-02-11 08:45:03.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderTesting.h 2022-05-21 07:16:24.000000000 -0400
@@ -7,6 +7,7 @@
#import <Foundation/Foundation.h>
#import <FileProvider/NSFileProviderManager.h>
+#import <FileProvider/NSFileProviderReplicatedExtension.h>
NS_ASSUME_NONNULL_BEGIN
@@ -38,7 +39,7 @@
// A testing operation of type CollisionResolution
NSFileProviderTestingOperationTypeCollisionResolution = 7
-} FILEPROVIDER_API_AVAILABILITY_V3_1;
+} FILEPROVIDER_API_AVAILABILITY_V3_1_IOS;
@protocol NSFileProviderTestingIngestion;
@protocol NSFileProviderTestingLookup;
@@ -51,7 +52,7 @@
/** An operation that can scheduled.
*/
-FILEPROVIDER_API_AVAILABILITY_V3_1
+FILEPROVIDER_API_AVAILABILITY_V3_1_IOS
@protocol NSFileProviderTestingOperation <NSObject>
/** The operation type
@@ -135,7 +136,7 @@
set events, or if some operation are scheduled using -runTestingOperations:error:.
*/
- (nullable NSArray <id<NSFileProviderTestingOperation>> *)listAvailableTestingOperationsWithError:(NSError **)error
- FILEPROVIDER_API_AVAILABILITY_V3_1;
+FILEPROVIDER_API_AVAILABILITY_V3_1_IOS;
/** Run a set of operations.
@@ -144,7 +145,7 @@
*/
- (nullable NSDictionary<id<NSFileProviderTestingOperation>, NSError *> *)runTestingOperations:(NSArray<id<NSFileProviderTestingOperation>> *)operations
error:(NSError **)error
- FILEPROVIDER_API_AVAILABILITY_V3_1;
+FILEPROVIDER_API_AVAILABILITY_V3_1_IOS;
@end
@@ -160,14 +161,14 @@
/** The operation reads or writes the file provider extension.
*/
NSFileProviderTestingOperationSideFileProvider = 1,
-} FILEPROVIDER_API_AVAILABILITY_V3_1;
+} FILEPROVIDER_API_AVAILABILITY_V3_1_IOS;
/** This operation causes the system to ingest a change.
When running this operation, the system will discover a change from the disk or the provider.
*/
-FILEPROVIDER_API_AVAILABILITY_V3_1
+FILEPROVIDER_API_AVAILABILITY_V3_1_IOS
@protocol NSFileProviderTestingIngestion <NSFileProviderTestingOperation>
/** Side of the event.
@@ -189,7 +190,7 @@
/** This operation causes the system to lookup an item.
*/
-FILEPROVIDER_API_AVAILABILITY_V3_1
+FILEPROVIDER_API_AVAILABILITY_V3_1_IOS
@protocol NSFileProviderTestingLookup <NSFileProviderTestingOperation>
/** Side of the event.
@@ -205,7 +206,7 @@
/** This operation causes the system to propagate a creation of an item from a source side to a target side.
*/
-FILEPROVIDER_API_AVAILABILITY_V3_1
+FILEPROVIDER_API_AVAILABILITY_V3_1_IOS
@protocol NSFileProviderTestingCreation <NSFileProviderTestingOperation>
/** The target side of the operation.
@@ -227,7 +228,7 @@
The modification happens if a change is identified on an item that is already known by both sides.
*/
-FILEPROVIDER_API_AVAILABILITY_V3_1
+FILEPROVIDER_API_AVAILABILITY_V3_1_IOS
@protocol NSFileProviderTestingModification <NSFileProviderTestingOperation>
/** The target side of the operation.
@@ -261,7 +262,7 @@
The deletion happens if an item that is known by the target side is deleted on the source side.
*/
-FILEPROVIDER_API_AVAILABILITY_V3_1
+FILEPROVIDER_API_AVAILABILITY_V3_1_IOS
@protocol NSFileProviderTestingDeletion <NSFileProviderTestingOperation>
/** The target side of the operation.
@@ -289,7 +290,7 @@
/** This operation causes the system to fetch the content of an item.
*/
-FILEPROVIDER_API_AVAILABILITY_V3_1
+FILEPROVIDER_API_AVAILABILITY_V3_1_IOS
@protocol NSFileProviderTestingContentFetch <NSFileProviderTestingOperation>
/** The side of the operation.
@@ -305,7 +306,7 @@
/** This operation causes the system to list the children of an item
*/
-FILEPROVIDER_API_AVAILABILITY_V3_1
+FILEPROVIDER_API_AVAILABILITY_V3_1_IOS
@protocol NSFileProviderTestingChildrenEnumeration <NSFileProviderTestingOperation>
/** The side of the operation.
@@ -327,7 +328,7 @@
This can for instance happen if the case sensitivity of the local filesystem and of the provider differs.
*/
-FILEPROVIDER_API_AVAILABILITY_V3_1
+FILEPROVIDER_API_AVAILABILITY_V3_1_IOS
@protocol NSFileProviderTestingCollisionResolution <NSFileProviderTestingOperation>
/** The side of the operation.
- README
- xcode13.0 Binding Status
- xcode13.1 Binding Status
- xcode13.2 Binding Status
- xcode13.3 Binding Status
- xcode13.4 Binding Status
- xcode14.0 Binding Status
- xcode14.1 Binding Status
- xcode14.2 Binding Status
- xcode14.3 Binding Status
- xcode15.0 Binding Status
- xcode15.1 Binding Status
- xcode15.3 Binding Status
- xcode15.4 Binding Status
- xcode16.0 Binding Status
- xcode16.1 Binding Status
- xcode16.2 Binding Status