Skip to content

FileProvider iOS xcode15.3 b1

Alex Soto edited this page May 22, 2024 · 2 revisions

#FileProvider.framework https://github.com/xamarin/xamarin-macios/pull/20097

diff -ruN /Applications/Xcode_15.2.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderDefines.h /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderDefines.h
--- /Applications/Xcode_15.2.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderDefines.h	2023-11-12 10:55:35
+++ /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderDefines.h	2024-01-19 01:53:14
@@ -33,3 +33,9 @@
 #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)
+// macOS API with the fifth revision of FPFS
+#define FILEPROVIDER_API_AVAILABILITY_V5_1 API_AVAILABLE(macos(13.4)) API_UNAVAILABLE(ios, watchos, tvos) API_UNAVAILABLE(macCatalyst)
+
+#define FILEPROVIDER_API_AVAILABILITY_V6_0_IOS API_AVAILABLE(macos(14.1), ios(17.1)) API_UNAVAILABLE(watchos, tvos) API_UNAVAILABLE(macCatalyst)
+
+#define FILEPROVIDER_API_AVAILABILITY_V7_0_IOS API_AVAILABLE(macos(14.4), ios(17.4)) API_UNAVAILABLE(watchos, tvos) API_UNAVAILABLE(macCatalyst)
diff -ruN /Applications/Xcode_15.2.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderDomain.h /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderDomain.h
--- /Applications/Xcode_15.2.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderDomain.h	2023-10-28 17:16:35
+++ /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderDomain.h	2024-01-19 03:46:37
@@ -227,6 +227,8 @@
  */
 @property (readwrite, assign) BOOL supportsSyncingTrash FILEPROVIDER_API_AVAILABILITY_V5_0;
 
+@property (nonatomic, readonly, nullable) NSUUID *volumeUUID;
+
 @end
 
 FILEPROVIDER_API_AVAILABILITY_V2
diff -ruN /Applications/Xcode_15.2.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderError.h /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderError.h
--- /Applications/Xcode_15.2.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderError.h	2023-10-28 17:10:19
+++ /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderError.h	2024-01-19 03:46:36
@@ -164,6 +164,25 @@
      completed.
     */
     NSFileProviderErrorDomainDisabled FILEPROVIDER_API_AVAILABILITY_V5_0_IOS = -2011,
+
+    /*
+     Returned by the system to indicate that it is temporarily unable to service requests for this domain.
+     The caller should expect the same API call to succeed at a later time.
+     */
+    NSFileProviderErrorProviderDomainTemporarilyUnavailable FILEPROVIDER_API_AVAILABILITY_V6_0_IOS = -2012,
+
+    /*
+     Returned by the system to indicate that there is no NSFileProviderDomain registered in the
+     system which has the same identifier that was used to construct the NSFileProviderManager
+     which made the API call.
+     */
+    NSFileProviderErrorProviderDomainNotFound FILEPROVIDER_API_AVAILABILITY_V6_0_IOS = -2013,
+
+    /*
+     Returned by the system to indicate that the system does not have any launchable
+     `com.apple.fileprovider-nonui` application extension for this domain's app bundle.
+     */
+    NSFileProviderErrorApplicationExtensionNotFound FILEPROVIDER_API_AVAILABILITY_V6_0_IOS = -2014,
 } FILEPROVIDER_API_AVAILABILITY_V2_V3;
 
 @interface NSError (NSFileProviderError)
diff -ruN /Applications/Xcode_15.2.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderManager.h /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderManager.h
--- /Applications/Xcode_15.2.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderManager.h	2023-11-12 10:55:35
+++ /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderManager.h	2024-01-19 01:53:14
@@ -417,8 +417,8 @@
  In case the extension has lost its synchronisation state and is not interested in preserving
  the data cached on disk, it can remove and re-add the affected domain.
 
- The completion handler is called immediately and does not reflect the end of the import.
- When the import of the file hierarchy is finished, the system calls
+ The completion handler is called as soon as the reimport is initiated and does not not reflect
+ the end of the import. 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
@@ -570,6 +570,28 @@
 - (void)requestDownloadForItemWithIdentifier:(NSFileProviderItemIdentifier)itemIdentifier
                               requestedRange:(NSRange)rangeToMaterialize
                            completionHandler:(void (^)(NSError * _Nullable error))completionHandler NS_REFINED_FOR_SWIFT FILEPROVIDER_API_AVAILABILITY_V5_0;
+@end
+
+@interface NSFileProviderManager (StateDirectory)
+/**
+ A directory suitable for storing state information for the domain.
+
+ The returned URL is guaranteed to be on the same volume as the user visible URL and the temporary URL, making sure
+ the system can atomatically clone/move files from that location to the user visible URL.
+ The caller is responsible for managing the security scope of the returned URL.
+
+ When syncing a domain on an external volume, all information about the sync state must be kept in this directory
+ if the volume is to be shared between multiple machines.
+
+ If the system cannot find a suitable directory, this call will fail. This could happen e.g. if the domain
+ does not exist.
+
+ This call will not fail when called from the extension process with an active instance of the extension
+ for that domain.
+
+ Removing the domain will remove the corresponding directory along with it.
+*/
+- (NSURL *)stateDirectoryURLWithError:(NSError *__autoreleasing  _Nullable *)error;
 @end
 
 NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_15.2.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderReplicatedExtension.h /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderReplicatedExtension.h
--- /Applications/Xcode_15.2.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderReplicatedExtension.h	2023-11-12 10:49:46
+++ /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderReplicatedExtension.h	2024-01-19 01:53:14
@@ -654,8 +654,9 @@
  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.
+ `+[NSFileProviderItemVersion beforeFirstSyncComponent]`, 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:
  ------------------------------------------
Clone this wiki locally