Skip to content

CoreData watchOS xcode14.0 beta2

Alex Soto edited this page Jun 24, 2022 · 3 revisions

#CoreData.framework

diff -ruN /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreData.h /Applications/Xcode_14.0.0-beta2.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreData.h
--- /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreData.h	2022-05-21 05:05:42.000000000 -0400
+++ /Applications/Xcode_14.0.0-beta2.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreData.h	2022-06-12 23:16:34.000000000 -0400
@@ -64,3 +64,6 @@
 #import <CoreData/NSPersistentCloudKitContainerEvent.h>
 #import <CoreData/NSPersistentCloudKitContainerEventRequest.h>
 
+#if (TARGET_OS_OSX || TARGET_OS_IOS || TARGET_OS_MACCATALYST)
+#import <CoreData/NSCoreDataCoreSpotlightDelegate.h>
+#endif
diff -ruN /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObjectContext.h /Applications/Xcode_14.0.0-beta2.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObjectContext.h
--- /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObjectContext.h	2022-06-03 18:09:39.000000000 -0400
+++ /Applications/Xcode_14.0.0-beta2.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObjectContext.h	2022-06-17 14:49:15.000000000 -0400
@@ -81,7 +81,11 @@
 } API_AVAILABLE(macosx(10.7), ios(5.0));
 
 API_AVAILABLE(macosx(10.4),ios(3.0))
+#if (TARGET_OS_OSX || TARGET_OS_IOS || TARGET_OS_MACCATALYST)
+@interface NSManagedObjectContext : NSObject <NSCoding, NSLocking> {
+#else
 @interface NSManagedObjectContext : NSObject <NSCoding> {
+#endif
 }
 
 + (instancetype)new API_DEPRECATED( "Use -initWithConcurrencyType: instead", macosx(10.4,10.11), ios(3.0,9.0));
@@ -163,6 +167,11 @@
 /* calls -refreshObject:mergeChanges: on all currently registered objects with this context.  It handles dirtied objects and clearing the context reference queue */
 - (void)refreshAllObjects API_AVAILABLE(macosx(10.11),ios(8.3));
 
+#if (TARGET_OS_OSX || TARGET_OS_IOS || TARGET_OS_MACCATALYST)
+- (void)lock API_DEPRECATED( "Use a queue style context and -performBlockAndWait: instead", macosx(10.4,10.10), ios(3.0,8.0));
+- (void)unlock API_DEPRECATED( "Use a queue style context and -performBlockAndWait: instead", macosx(10.4,10.10), ios(3.0,8.0));
+- (BOOL)tryLock API_DEPRECATED( "Use a queue style context and -performBlock: instead", macosx(10.4,10.10), ios(3.0,8.0));
+#endif
     
 // whether or not the context propagates deletes to related objects at the end of the event, or only at save time
 @property (nonatomic) BOOL propagatesDeletesAtEndOfEvent;   // The default is YES.
diff -ruN /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentStore.h /Applications/Xcode_14.0.0-beta2.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentStore.h
--- /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentStore.h	2022-05-31 15:04:31.000000000 -0400
+++ /Applications/Xcode_14.0.0-beta2.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentStore.h	2022-06-17 14:30:20.000000000 -0400
@@ -22,6 +22,9 @@
 @class NSPersistentStoreRequest;
 @class NSPersistentStoreCoordinator;
 
+#if (TARGET_OS_OSX || TARGET_OS_IOS || TARGET_OS_MACCATALYST)
+@class NSCoreDataCoreSpotlightDelegate;
+#endif
 
 API_AVAILABLE(macosx(10.5),ios(3.0))
 @interface NSPersistentStore : NSObject {
@@ -71,6 +74,11 @@
 // before removal.
 - (void)willRemoveFromPersistentStoreCoordinator:(nullable NSPersistentStoreCoordinator *)coordinator;
 
+#if (TARGET_OS_OSX || TARGET_OS_IOS || TARGET_OS_MACCATALYST)
+/* Return the Core Spotlight exporter if one exists for this store. The exporter
+    can be set as part of the store options when it is added to the coordinator. */
+@property (nonatomic, readonly) NSCoreDataCoreSpotlightDelegate *coreSpotlightExporter API_AVAILABLE(macosx(10.13),ios(11.0)) API_UNAVAILABLE(tvos,watchos);
+#endif
 
 @end
 
diff -ruN /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentStoreCoordinator.h /Applications/Xcode_14.0.0-beta2.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentStoreCoordinator.h
--- /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentStoreCoordinator.h	2022-06-03 18:07:22.000000000 -0400
+++ /Applications/Xcode_14.0.0-beta2.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentStoreCoordinator.h	2022-06-17 14:51:30.000000000 -0400
@@ -155,7 +155,11 @@
 COREDATA_EXTERN NSString * const NSPersistentHistoryTokenKey API_AVAILABLE(macosx(10.14),ios(12.0),tvos(12.0),watchos(5.0));
 
 API_AVAILABLE(macosx(10.4),ios(3.0))
+#if (TARGET_OS_OSX || TARGET_OS_IOS || TARGET_OS_MACCATALYST)
+@interface NSPersistentStoreCoordinator : NSObject <NSLocking> {
+#else
 @interface NSPersistentStoreCoordinator : NSObject {
+#endif
 }
 
 - (instancetype)initWithManagedObjectModel:(NSManagedObjectModel *)model NS_DESIGNATED_INITIALIZER;
@@ -236,17 +240,89 @@
 /* Constructs a combined NSPersistentHistoryToken given an array of persistent stores. If stores is nil or an empty array, the NSPersistentHistoryToken will be constructed with all of the persistent stores in the coordinator. */
 - (nullable NSPersistentHistoryToken *)currentPersistentHistoryTokenFromStores:(nullable NSArray*)stores API_AVAILABLE(macosx(10.14),ios(12.0),tvos(12.0),watchos(5.0));
 
+#if (TARGET_OS_OSX || TARGET_OS_IOS || TARGET_OS_MACCATALYST)
+ /*
+  *   DEPRECATED
+  */
+#endif
     
     
+#if (TARGET_OS_OSX || TARGET_OS_IOS || TARGET_OS_MACCATALYST)
+- (void)lock API_DEPRECATED( "Use -performBlockAndWait: instead", macosx(10.4,10.10), ios(3.0,8.0));
+- (void)unlock API_DEPRECATED( "Use -performBlockAndWait: instead", macosx(10.4,10.10), ios(3.0,8.0));
+- (BOOL)tryLock API_DEPRECATED( "Use -performBlock: instead", macosx(10.4,10.10), ios(3.0,8.0));
+#endif
     
 + (nullable NSDictionary<NSString *, id> *)metadataForPersistentStoreOfType:(nullable NSString *)storeType URL:(NSURL *)url error:(NSError **)error API_DEPRECATED("Use -metadataForPersistentStoreOfType:URL:options:error: and pass in an options dictionary matching addPersistentStoreWithType", macosx(10.5,10.11), ios(3.0,9.0));
 
 + (BOOL)setMetadata:(nullable NSDictionary<NSString *, id> *)metadata forPersistentStoreOfType:(nullable NSString *)storeType URL:(NSURL*)url error:(NSError **)error API_DEPRECATED("Use  -setMetadata:forPersistentStoreOfType:URL:options:error: and pass in an options dictionary matching addPersistentStoreWithType", macosx(10.5,10.11), ios(3.0,9.0));
 
+#if (TARGET_OS_OSX || TARGET_OS_IOS || TARGET_OS_MACCATALYST)
+/*
+ Delete all ubiquitous content for all peers for the persistent store at the given URL and also delete the local store file. storeOptions should contain the options normally passed to addPersistentStoreWithType:URL:options:error. Errors may be returned as a result of file I/O, iCloud network or iCloud account issues.
+ */
++ (BOOL)removeUbiquitousContentAndPersistentStoreAtURL:(NSURL *)storeURL options:(nullable NSDictionary *)options error:(NSError**)error API_DEPRECATED("Please see the release notes and Core Data documentation.", macosx(10.7,10.12), ios(5.0,10.0));
+
+#endif
 
 @end
 
+#if (TARGET_OS_OSX || TARGET_OS_IOS || TARGET_OS_MACCATALYST)
+/*
+ NSPersistentStoreUbiquitousTransitionTypeAccountAdded
+ This value indicates that a new iCloud account is available, and the persistent store in use will / did transition to the new account.
+ It is only possible to discern this state when the application is running, and therefore this transition type will only be posted if the account changes while the application is running or in the background.
+ 
+ NSPersistentStoreUbiquitousTransitionTypeAccountRemoved
+ This value indicates that no iCloud account is available, and the persistent store in use will / did transition to the “local” store.
+ It is only possible to discern this state when the application is running, and therefore this transition type will only be posted if the account is removed while the application is running or in the background.
+ 
+ NSPersistentStoreUbiquitousTransitionTypeContentRemoved
+ This value indicates that the user has wiped the contents of the iCloud account, usually using Delete All from Documents & Data in Settings. The Core Data integration will transition to an empty store file as a result of this event.
+ 
+ NSPersistentStoreUbiquitousTransitionTypeInitialImportCompleted
+ This value indicates that the Core Data integration has finished building a store file that is consistent with the contents of the iCloud account, and is readyto replace the fallback store with that file.
+ */
+typedef NS_ENUM(NSUInteger, NSPersistentStoreUbiquitousTransitionType) {
+    NSPersistentStoreUbiquitousTransitionTypeAccountAdded = 1,
+    NSPersistentStoreUbiquitousTransitionTypeAccountRemoved,
+    NSPersistentStoreUbiquitousTransitionTypeContentRemoved,
+    NSPersistentStoreUbiquitousTransitionTypeInitialImportCompleted
+} API_DEPRECATED("Please see the release notes and Core Data documentation.", macosx(10.9,10.12), ios(7.0,10.0));
+#endif
+
+#if (TARGET_OS_OSX || TARGET_OS_IOS || TARGET_OS_MACCATALYST)
+/* option indicating that a persistent store has a given name in ubiquity, this option is required for ubiquity to function  */
+COREDATA_EXTERN NSString * const NSPersistentStoreUbiquitousContentNameKey API_DEPRECATED("Please see the release notes and Core Data documentation.", macosx(10.7,10.12), ios(5.0,10.0));
+
+/* option indicating the log path to use for ubiquity logs, this option is optional for ubiquity, a default path will be generated for the store if none is provided */
+COREDATA_EXTERN NSString * const NSPersistentStoreUbiquitousContentURLKey API_DEPRECATED("Please see the release notes and Core Data documentation.", macosx(10.7,10.12), ios(5.0,10.0));
+
+/* Notification sent after records are imported from the ubiquity store. The notification is sent with the object set to the NSPersistentStoreCoordinator instance which registered the store. */
+COREDATA_EXTERN NSString * const NSPersistentStoreDidImportUbiquitousContentChangesNotification API_DEPRECATED("Please see the release notes and Core Data documentation.", macosx(10.7,10.12), ios(5.0,10.0));
+
+/*
+ In the NSPersistentStoreCoordinatorStoresWillChangeNotification / NSPersistentStoreCoordinatorStoresDidChangeNotification userInfo dictionaries, this identifies the type of event. This could be one of the NSPersistentStoreUbiquitousTransitionType enum values as an NSNumber
+ */
+COREDATA_EXTERN NSString * const NSPersistentStoreUbiquitousTransitionTypeKey API_DEPRECATED("Please see the release notes and Core Data documentation.", macosx(10.9,10.12), ios(7.0,10.0));
+
+/*
+ Optionally specified string which will be mixed in to Core Data’s identifier for each iCloud peer. The value must be an alphanumeric string without any special characters, whitespace or punctuation.  The primary use for this option is to allow multiple applications on the same peer (device) to share a Core Data store integrated with iCloud. Each application will require its own store file.
+ */
+COREDATA_EXTERN NSString * const NSPersistentStoreUbiquitousPeerTokenOption API_DEPRECATED("Please see the release notes and Core Data documentation.", macosx(10.9,10.12), ios(7.0,10.0));
+
+/* NSNumber boolean indicating that the receiver should remove all associated ubiquity metadata from a persistent store. This is mostly used during migration or copying to disassociate a persistent store file from an iCloud account
+ */
+COREDATA_EXTERN NSString * const NSPersistentStoreRemoveUbiquitousMetadataOption API_DEPRECATED("Please see the release notes and Core Data documentation.", macosx(10.9,10.12), ios(7.0,10.0));
 
+/* NSString specifying the iCloud container identifier Core Data should pass to  -URLForUbiquitousContainerIdentifier:
+ */
+COREDATA_EXTERN NSString * const NSPersistentStoreUbiquitousContainerIdentifierKey API_DEPRECATED("Please see the release notes and Core Data documentation.", macosx(10.9,10.12), ios(7.0,10.0));
+
+/* NSNumber boolean indicating that the receiver should erase the local store file and rebuild it from the iCloud data in Mobile Documents.
+ */
+COREDATA_EXTERN NSString * const NSPersistentStoreRebuildFromUbiquitousContentOption API_DEPRECATED("Please see the release notes and Core Data documentation.", macosx(10.9,10.12), ios(7.0,10.0));
+#endif
     
 
 NS_ASSUME_NONNULL_END
Clone this wiki locally