Skip to content

FileProvider iOS xcode9 beta3

Vincent Dondain edited this page Jul 10, 2017 · 2 revisions

#FileProvider.framework

diff -ruN /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderActions.h /Applications/Xcode9-beta3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderActions.h
--- /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderActions.h	2017-06-09 21:27:58.000000000 -0400
+++ /Applications/Xcode9-beta3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderActions.h	2017-06-29 02:50:17.000000000 -0400
@@ -146,8 +146,7 @@
 
  It is also suggested that shared documents be unshared when trashed.
 
- Errors (including collision errors) are handled as documented for the import
- method above.  Trash is gated by the capabilities of the trashed item with
+ Trash is gated by the capabilities of the trashed item with
  NSFileProviderItemCapabilitiesAllowsTrashing.
  */
 - (void)trashItemWithIdentifier:(NSFileProviderItemIdentifier)itemIdentifier
@@ -164,9 +163,8 @@
  the children and send addition events in the working set so that the documents
  in the now untrashed directory may be reindexed.
 
- Errors (including collision errors) are handled as documented for the import
- method above.  Untrash is gated by the capabilities of the destination
- directory, with NSFileProviderItemCapabilitiesAllowsAddingSubItems.
+ Untrash is gated by the capabilities of the destination directory, with
+ NSFileProviderItemCapabilitiesAllowsAddingSubItems.
  */
 - (void)untrashItemWithIdentifier:(NSFileProviderItemIdentifier)itemIdentifier
            toParentItemIdentifier:(nullable NSFileProviderItemIdentifier)parentItemIdentifier
diff -ruN /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderEnumerating.h /Applications/Xcode9-beta3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderEnumerating.h
--- /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderEnumerating.h	2017-06-09 21:02:01.000000000 -0400
+++ /Applications/Xcode9-beta3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderEnumerating.h	2017-06-29 02:50:38.000000000 -0400
@@ -15,7 +15,7 @@
 
  The size of a sync anchor should not exceed a combined 500 bytes.
  */
-typedef NSData *NSFileProviderSyncAnchor;
+typedef NSData *NSFileProviderSyncAnchor NS_TYPED_EXTENSIBLE_ENUM;
 
 /**
  A user- or system-defined chunk of data that defines a page to continue the enumeration from.
@@ -23,7 +23,7 @@
 
  The size of a page should not exceed 500 bytes.
  */
-typedef NSData *NSFileProviderPage;
+typedef NSData *NSFileProviderPage NS_TYPED_EXTENSIBLE_ENUM;
 
 FOUNDATION_EXPORT API_AVAILABLE(ios(11.0)) API_UNAVAILABLE(macos, watchos, tvos)
 NSFileProviderPage const NSFileProviderInitialPageSortedByDate;
@@ -44,7 +44,7 @@
  Page data is limited to 500 bytes.  Setting a larger nextPage interrupts the
  enumeration.
  */
-- (void)finishEnumeratingUpToPage:(nullable NSFileProviderPage)nextPage NS_SWIFT_NAME(finishEnumerating(upToPage:));
+- (void)finishEnumeratingUpToPage:(nullable NSFileProviderPage)nextPage NS_SWIFT_NAME(finishEnumerating(upTo:));
 - (void)finishEnumeratingWithError:(NSError *)error;
 @end
 
@@ -113,7 +113,7 @@
  then successive pages might contain offsets in increments of 200.
  */
 - (void)enumerateItemsForObserver:(id<NSFileProviderEnumerationObserver>)observer
-                   startingAtPage:(NSFileProviderPage)page;
+                   startingAtPage:(NSFileProviderPage)page NS_SWIFT_NAME(enumerateItems(for:startingAt:));
 
 @optional
 /**
@@ -138,7 +138,7 @@
  starting from an empty list.
  */
 - (void)enumerateChangesForObserver:(id<NSFileProviderChangeObserver>)observer
-                     fromSyncAnchor:(NSFileProviderSyncAnchor)anchor;
+                     fromSyncAnchor:(NSFileProviderSyncAnchor)syncAnchor NS_SWIFT_NAME(enumerateChanges(for:from:));
 
 /**
  Request the current sync anchor.
@@ -193,7 +193,7 @@
  If returning nil, you must set the error out parameter.
  */
 - (nullable id<NSFileProviderEnumerator>)enumeratorForContainerItemIdentifier:(NSFileProviderItemIdentifier)containerItemIdentifier
-                                                                        error:(NSError **)error;
+                                                                        error:(NSError **)error NS_SWIFT_NAME(enumerator(for:));
 
 @end
 
diff -ruN /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderError.h /Applications/Xcode9-beta3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderError.h
--- /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderError.h	2017-06-09 21:02:01.000000000 -0400
+++ /Applications/Xcode9-beta3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderError.h	2017-06-29 02:50:17.000000000 -0400
@@ -10,16 +10,17 @@
 
 NS_ASSUME_NONNULL_BEGIN
 
-FOUNDATION_EXPORT NSString * const NSFileProviderErrorDomain API_AVAILABLE(ios(11.0)) API_UNAVAILABLE(macos, watchos, tvos);
+FOUNDATION_EXPORT NSErrorDomain const NSFileProviderErrorDomain API_AVAILABLE(ios(11.0)) API_UNAVAILABLE(macos, watchos, tvos);
 
 FOUNDATION_EXPORT NSString * const NSFileProviderErrorCollidingItemKey API_AVAILABLE(ios(11.0)) API_UNAVAILABLE(macos, watchos, tvos);
 FOUNDATION_EXPORT NSString * const NSFileProviderErrorNonExistentItemIdentifierKey API_AVAILABLE(ios(11.0)) API_UNAVAILABLE(macos, watchos, tvos);
 
-typedef NS_ENUM(NSInteger, NSFileProviderErrorCode) {
+typedef NS_ERROR_ENUM(NSFileProviderErrorDomain, NSFileProviderErrorCode) {
     NSFileProviderErrorNotAuthenticated  = -1000, /**< The user credentials cannot be verified */
     NSFileProviderErrorFilenameCollision = -1001, /**< An item already exists with the same parentItemIdentifier and filename (or with a filename differing only in case.)
                                                        Please use -[NSError (NSFileProviderError) fileProviderErrorForCollisionWithItem:] to build an error with this code. */
     NSFileProviderErrorSyncAnchorExpired = -1002, /**< The value of the sync anchor is too old, and the system must re-sync from scratch */
+    NSFileProviderErrorPageExpired        = NSFileProviderErrorSyncAnchorExpired, /**< The value of the page token is too old, and the system must re-sync from scratch */
     NSFileProviderErrorInsufficientQuota = -1003, /**< The item has not been uploaded because it would push the account over quota */
     NSFileProviderErrorServerUnreachable = -1004, /**< Connecting to the servers failed */
     NSFileProviderErrorNoSuchItem        = -1005  /**< The requested item doesn't exist
diff -ruN /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderItem.h /Applications/Xcode9-beta3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderItem.h
--- /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderItem.h	2017-06-09 21:02:01.000000000 -0400
+++ /Applications/Xcode9-beta3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderItem.h	2017-06-29 02:50:38.000000000 -0400
@@ -31,13 +31,6 @@
 FOUNDATION_EXPORT NSFileProviderItemIdentifier const NSFileProviderWorkingSetContainerItemIdentifier NS_SWIFT_NAME(NSFileProviderItemIdentifier.workingSet) API_AVAILABLE(ios(11.0)) API_UNAVAILABLE(macos, watchos, tvos);
 
 /**
- The item identifier representing the set of all the directories, used for the
- directory picker presented when the user wants to pick a destination for a
- move or an import.
- */
-FOUNDATION_EXPORT NSFileProviderItemIdentifier const NSFileProviderAllDirectoriesContainerItemIdentifier NS_SWIFT_NAME(NSFileProviderItemIdentifier.allDirectories) API_AVAILABLE(ios(11.0)) API_UNAVAILABLE(macos, watchos, tvos);
-
-/**
  A special value for favorite ranks, to use when no rank was set when the item
  was favorited.
  */
@@ -96,13 +89,16 @@
 /**
  The parent identifier specifies the parent of the item in the hierarchy.
 
+ Set to NSFileProviderRootContainerItemIdentifier for an item at the root of the
+ user's storage.  Set to the itemIdentifier of the item's parent otherwise.
+
  When enumerating the root container or a generic container, the
  parentItemIdentifier of the enumerated items is expected to match the
  enumerated item's identifier.  When enumerating the working set, the
  parentItemIdentifier is expected to match the actual parent of the item in the
  hierarchy (ie. it is not NSFileProviderWorkingSetContainerItemIdentifier).
 
- The parent of trashed items and of the root item is ignored.
+ The parents of trashed items and of the root item are ignored.
  */
 @property (nonatomic, readonly, copy) NSFileProviderItemIdentifier parentItemIdentifier;
 
diff -ruN /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderManager.h /Applications/Xcode9-beta3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderManager.h
--- /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderManager.h	2017-06-09 21:27:58.000000000 -0400
+++ /Applications/Xcode9-beta3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderManager.h	2017-06-29 02:50:17.000000000 -0400
@@ -55,7 +55,7 @@
  with a topic of "<your application identifier>.pushkit.fileprovider" will be
  translated into a call to signalEnumeratorForContainerItemIdentifier:completionHandler:.
  */
-- (void)signalEnumeratorForContainerItemIdentifier:(NSFileProviderItemIdentifier)containerItemIdentifier completionHandler:(void (^)(NSError * __nullable error))completion;
+- (void)signalEnumeratorForContainerItemIdentifier:(NSFileProviderItemIdentifier)containerItemIdentifier completionHandler:(void (^)(NSError * __nullable error))completion NS_SWIFT_NAME(signalEnumerator(for:completionHandler:));
 
 /**
  Registers the given NSURLSessionTask to be responsible for the specified item.
Clone this wiki locally