Skip to content

CoreData iOS xcode15.0 b1

Manuel de la Pena edited this page Aug 26, 2023 · 3 revisions

#CoreData.framework https://github.com/xamarin/xamarin-macios/pull/18837

diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreData.apinotes /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreData.apinotes
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreData.apinotes	2023-03-04 19:26:28
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreData.apinotes	2023-05-19 20:38:24
@@ -184,4 +184,5 @@
   SwiftName: UUIDAttributeType
 - Name: NSURIAttributeType
   SwiftName: URIAttributeType
-
+- Name: NSCompositeAttributeType
+  SwiftName: compositeAttributeType
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreData.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreData.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreData.h	2023-03-04 19:24:27
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreData.h	2023-05-25 00:04:19
@@ -12,6 +12,7 @@
 
 #import <CoreData/NSAttributeDescription.h>
 #import <CoreData/NSDerivedAttributeDescription.h>
+#import <CoreData/NSCompositeAttributeDescription.h>
 #import <CoreData/NSEntityDescription.h>
 #import <CoreData/NSFetchedPropertyDescription.h>
 #import <CoreData/NSPropertyDescription.h>
@@ -63,6 +64,12 @@
 #import <CoreData/NSPersistentCloudKitContainerOptions.h>
 #import <CoreData/NSPersistentCloudKitContainerEvent.h>
 #import <CoreData/NSPersistentCloudKitContainerEventRequest.h>
+
+#import <CoreData/NSStagedMigrationManager.h>
+#import <CoreData/NSMigrationStage.h>
+#import <CoreData/NSCustomMigrationStage.h>
+#import <CoreData/NSLightweightMigrationStage.h>
+#import <CoreData/NSManagedObjectModelReference.h>
 
 #if (TARGET_OS_OSX || TARGET_OS_IOS || TARGET_OS_MACCATALYST)
 #import <CoreData/NSCoreDataCoreSpotlightDelegate.h>
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreDataErrors.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreDataErrors.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreDataErrors.h	2023-03-09 23:50:38
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreDataErrors.h	2023-05-25 00:02:25
@@ -83,7 +83,10 @@
     NSInferredMappingModelError                      = 134190, // inferred mapping model creation error
     NSExternalRecordImportError                      = 134200, // general error encountered while importing external records
     
-    NSPersistentHistoryTokenExpiredError             = 134301  // The history token passed to NSPersistentChangeRequest was invalid
+    NSPersistentHistoryTokenExpiredError             = 134301, // The history token passed to NSPersistentChangeRequest was invalid
+    NSManagedObjectModelReferenceNotFoundError       = 134504, // the referenced model could not be found or instantiated
+    NSStagedMigrationFrameworkVersionMismatchError   = 134505, // the metadata of this store file has to be updated to use Staged Migration
+    NSStagedMigrationBackwardMigrationError          = 134506  // the migration failed due to migration attempting to migrate backwards
 };
 
 NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSAttributeDescription.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSAttributeDescription.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSAttributeDescription.h	2023-03-09 23:53:43
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSAttributeDescription.h	2023-05-25 00:04:21
@@ -30,7 +30,8 @@
     NSUUIDAttributeType API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0)) = 1100,
     NSURIAttributeType API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0)) = 1200,
     NSTransformableAttributeType API_AVAILABLE(macosx(10.5), ios(3.0)) = 1800, // If your attribute is of NSTransformableAttributeType, the attributeValueClassName must be set or attribute value class must implement NSCopying.
-    NSObjectIDAttributeType API_AVAILABLE(macosx(10.6), ios(3.0)) = 2000
+    NSObjectIDAttributeType API_AVAILABLE(macosx(10.6), ios(3.0)) = 2000,
+    NSCompositeAttributeType API_AVAILABLE(macosx(14.0), ios(17.0), tvos(17.0), watchos(10.0)) = 2100
  };
 
 // Attributes represent individual values like strings, numbers, dates, etc.
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSCompositeAttributeDescription.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSCompositeAttributeDescription.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSCompositeAttributeDescription.h	1969-12-31 19:00:00
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSCompositeAttributeDescription.h	2023-05-25 00:04:22
@@ -0,0 +1,23 @@
+/*
+    NSCompositeAttributeDescription.h
+    Core Data
+    Copyright (c) 2023, Apple Inc.
+    All rights reserved.
+*/
+
+#import <CoreData/NSAttributeDescription.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+API_AVAILABLE(macosx(14.0), ios(17.0), tvos(17.0), watchos(10.0))
+@interface NSCompositeAttributeDescription : NSAttributeDescription {
+}
+
+/*  Elements expects an Attribute or an Array of Attributes
+    Will throw if the new value is invalid (ie includes NSRelationshipDescription).
+*/
+@property (copy) NSArray *elements;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSCustomMigrationStage.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSCustomMigrationStage.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSCustomMigrationStage.h	1969-12-31 19:00:00
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSCustomMigrationStage.h	2023-05-25 00:04:21
@@ -0,0 +1,46 @@
+/*
+    NSCustomMigrationStage.h
+    Core Data
+    Copyright (c) 2023, Apple Inc.
+    All rights reserved.
+*/
+
+#import <CoreData/NSManagedObjectModel.h>
+#import <CoreData/NSMigrationStage.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@class NSManagedObjectModelReference;
+@class NSCustomMigrationStage;
+@class NSStagedMigrationManager;
+
+/*
+ * Each decomposed version of the app's model should be represented using an NSCustomMigrationStage and contain
+ * a source model reference and a destination model reference. NSCustomMigrationStage provides optional handlers
+ * that run immediately prior to and after the migration stage.
+ */
+API_AVAILABLE(macosx(14.0),ios(17.0),tvos(17.0),watchos(10.0))
+@interface NSCustomMigrationStage : NSMigrationStage
+
+@property (readonly, strong) NSManagedObjectModelReference *currentModel;
+@property (readonly, strong) NSManagedObjectModelReference *nextModel;
+
+/*
+ * This handler will be called immediately prior to migrating the store schema. Use this handler to
+ * execute any tasks your app may need. Access to the persistent container may be obtained from the NSStagedMigrationManager.
+ */
+@property (nullable, copy) BOOL (^willMigrateHandler)(NSStagedMigrationManager *migrationManager, NSCustomMigrationStage *migrationStage, NSError * _Nullable *outError) NS_REFINED_FOR_SWIFT;
+
+/*
+ * This handler will be called immediately after to migrating the store schema. Use this handler to
+ * execute any tasks your app may need. Access to the persistent container may be obtained from the NSStagedMigrationManager.
+ */
+@property (nullable, copy) BOOL (^didMigrateHandler)(NSStagedMigrationManager *migrationManager, NSCustomMigrationStage *migrationStage, NSError * _Nullable *outError) NS_REFINED_FOR_SWIFT;
+
+- (instancetype)init NS_UNAVAILABLE;
+- (instancetype)initWithCurrentModelReference:(NSManagedObjectModelReference *)currentModel
+                           nextModelReference:(NSManagedObjectModelReference *)nextModel NS_DESIGNATED_INITIALIZER NS_REFINED_FOR_SWIFT;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSLightweightMigrationStage.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSLightweightMigrationStage.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSLightweightMigrationStage.h	1969-12-31 19:00:00
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSLightweightMigrationStage.h	2023-05-25 00:04:22
@@ -0,0 +1,28 @@
+/*
+    NSLightweightMigrationStage.h
+    Core Data
+    Copyright (c) 2023, Apple Inc.
+    All rights reserved.
+*/
+
+#import <Foundation/NSArray.h>
+#import <CoreData/NSMigrationStage.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+/*
+ * NSLightweightMigrationStage describes a series of models that did not require decomposition and that were lightweight
+ * migration eligible. These lightweight migration stages are used to supplement the total ordering of models described
+ * to Core Data in your app. All lightweight model versions must be represented in one or more NSLightweightMigrationStages.
+ */
+API_AVAILABLE(macosx(14.0),ios(17.0),tvos(17.0),watchos(10.0))
+@interface NSLightweightMigrationStage : NSMigrationStage
+
+@property (readonly, strong) NSArray<NSString *> *versionChecksums;
+
+- (instancetype)init NS_UNAVAILABLE;
+- (instancetype)initWithVersionChecksums:(NSArray<NSString *> *)versionChecksums NS_DESIGNATED_INITIALIZER NS_REFINED_FOR_SWIFT;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObjectID.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObjectID.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObjectID.h	2023-03-09 23:53:44
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObjectID.h	2023-05-25 00:04:22
@@ -16,7 +16,7 @@
 @class NSURL;
 
 // Managed object IDs are opaque identifiers for managed objects.
-API_AVAILABLE(macosx(10.4),ios(3.0))
+API_AVAILABLE(macosx(10.4),ios(3.0)) NS_SWIFT_SENDABLE
 @interface NSManagedObjectID : NSObject <NSCopying> {
 }
 
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObjectModel.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObjectModel.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObjectModel.h	2023-03-09 19:17:17
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObjectModel.h	2023-05-19 20:41:26
@@ -87,6 +87,11 @@
 */
 @property (readonly, copy) NSDictionary<NSString *, NSData *> *entityVersionHashesByName API_AVAILABLE(macosx(10.5),ios(3.0));
 
+/*
+ * Returns a Base-64 encoded string representation of the entity version hashes.
+ */
+@property (readonly, copy) NSString *versionChecksum API_AVAILABLE(macosx(14.0),ios(17.0),tvos(17.0),watchos(10.0));
+
 @end
 
 NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObjectModelReference.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObjectModelReference.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObjectModelReference.h	1969-12-31 19:00:00
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObjectModelReference.h	2023-05-25 00:04:22
@@ -0,0 +1,43 @@
+/*
+    NSManagedObjectModelReference.h
+    Core Data
+    Copyright (c) 2023, Apple Inc.
+    All rights reserved.
+*/
+
+#import <CoreData/NSManagedObjectModel.h>
+#import <Foundation/NSBundle.h>
+#import <Foundation/NSData.h>
+#import <Foundation/NSString.h>
+#import <Foundation/NSURL.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+/*
+ * NSManagedObjectModelReference represents a promise of an NSManagedObjectMOdel. During migration Core Data
+ * will fulfill this promise. Every NSManagedObjectModelReference instance requires to be initialized with a
+ * "version checksum". This is to validate the model hasn't changed. The checksum can be obtained from
+ * the NSManagedObjectModel's versionChecksum property. Alternatively it can be retrieved from the Xcode build
+ * log or a versioned model's VersionInfo.plist.
+ */
+API_AVAILABLE(macosx(14.0),ios(17.0),tvos(17.0),watchos(10.0))
+@interface NSManagedObjectModelReference : NSObject
+
+@property (readonly, strong) NSManagedObjectModel *resolvedModel;
+@property (readonly, strong) NSString *versionChecksum;
+
+- (instancetype)init NS_UNAVAILABLE;
+- (instancetype)initWithModel:(NSManagedObjectModel *)model
+              versionChecksum:(NSString *)versionChecksum;
+- (instancetype)initWithFileURL:(NSURL *)fileURL
+                versionChecksum:(NSString *)versionChecksum;
+- (instancetype)initWithEntityVersionHashes:(NSDictionary *)versionHash
+                                   inBundle:(nullable NSBundle *)bundle
+                            versionChecksum:(NSString *)versionChecksum;
+- (instancetype)initWithName:(NSString *)modelName
+                    inBundle:(nullable NSBundle *)bundle
+             versionChecksum:(NSString *)versionChecksum;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSMigrationStage.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSMigrationStage.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSMigrationStage.h	1969-12-31 19:00:00
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSMigrationStage.h	2023-05-25 00:04:21
@@ -0,0 +1,27 @@
+/*
+    NSMigrationStage.h
+    Core Data
+    Copyright (c) 2023, Apple Inc.
+    All rights reserved.
+*/
+
+#import <Foundation/NSString.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+/*
+ * NSMigrationStage forms the basis for migrating between version of a model in staged migration. Each model version
+ * in your app will be described with an NSMigrationStage.
+ */
+API_AVAILABLE(macosx(14.0),ios(17.0),tvos(17.0),watchos(10.0))
+@interface NSMigrationStage : NSObject
+
+/*
+ * Describe the purpose of this migration stage. This label will be available when accessing persistent history
+ * for the store
+ */
+@property (nonatomic, null_resettable, copy) NSString *label;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentCloudKitContainer.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentCloudKitContainer.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentCloudKitContainer.h	2023-03-09 23:50:38
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentCloudKitContainer.h	2023-05-19 20:28:20
@@ -43,7 +43,7 @@
 @class CKRecordID;
 #endif
 
-API_AVAILABLE(macosx(10.15),ios(13.0),tvos(13.0),watchos(6.0))
+API_AVAILABLE(macosx(10.15),ios(13.0),tvos(13.0),watchos(6.0)) NS_SWIFT_SENDABLE
 @interface NSPersistentCloudKitContainer : NSPersistentContainer
 
 /*
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentContainer.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentContainer.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentContainer.h	2023-03-09 23:53:44
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentContainer.h	2023-05-25 00:04:21
@@ -18,7 +18,7 @@
 NS_ASSUME_NONNULL_BEGIN
 
 // An instance of NSPersistentContainer includes all objects needed to represent a functioning Core Data stack, and provides convenience methods and properties for common patterns.
-API_AVAILABLE(macosx(10.12),ios(10.0),tvos(10.0),watchos(3.0))
+API_AVAILABLE(macosx(10.12),ios(10.0),tvos(10.0),watchos(3.0)) NS_SWIFT_SENDABLE
 @interface NSPersistentContainer : NSObject {
 }
 
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentStoreCoordinator.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentStoreCoordinator.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentStoreCoordinator.h	2023-03-09 23:50:37
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentStoreCoordinator.h	2023-05-19 20:31:20
@@ -114,7 +114,16 @@
 
 COREDATA_EXTERN NSString * const NSCoreDataCoreSpotlightExporter API_AVAILABLE(macosx(10.13),ios(11.0)) API_UNAVAILABLE(tvos,watchos);
 
+/*
+ * To perform a staged lightweight migration, this key must be set with an NSStagedMigrationManager.
+ * This class encapsulates developer-described NSCustomMigrationStage's and supplementary NSLightweightMigrationStage's.
+ * The NSCustomMigrationStage's will be applied in the order in which they are indexed in the .stages property at the
+ * appropriate time (when the model matches the stage model references). The stages array must contain a total ordering
+ * of all models to be applied to the store using the aforementioned sub-classes.
+ */
+COREDATA_EXTERN NSString * const NSPersistentStoreStagedMigrationManagerOptionKey API_AVAILABLE(macosx(14.0),ios(17.0),tvos(17.0),watchos(10.0));
 
+
 /* store option for the destroy... and replace... to indicate that the store file should be destroyed even if the operation might be unsafe (overriding locks
  */
 COREDATA_EXTERN NSString * const NSPersistentStoreForceDestroyOption API_AVAILABLE(macosx(10.8),ios(6.0));
@@ -154,7 +163,24 @@
 COREDATA_EXTERN NSString * const NSPersistentStoreURLKey API_AVAILABLE(macosx(10.14),ios(12.0),tvos(12.0),watchos(5.0));
 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))
+/*
+  
+  During a Lightweight Migration, an Entity that has a migration transformation that requires dropping a column in
+  a table would require a copy of the old table into a new table.  If NSPersistentStoreDeferredLightweightMigrationOptionKey
+  is set to @YES, this table transformation can be delayed until the developer deems that the resources are available
+  to perform the table transformation.
+ 
+  Examples of Lightweight Migration Scenarios that can be delayed:
+       An Entitiy removed Attributes/Relationships
+       Relationships where a ForeignEntityKey is no longer needed
+ 
+  The Persistent Store's metadata contains the key - NSPersistentStoreDeferredLightweightMigrationOptionKey - to signal to the developer that work needs to be done.  The delayed
+  table transformations can be processed by invoking finishDeferredLightweightMigration on the Persistent Store Coordinator.
+ 
+ */
+COREDATA_EXTERN NSString * const NSPersistentStoreDeferredLightweightMigrationOptionKey API_AVAILABLE(macosx(11.0),ios(14.0),tvos(14.0),watchos(7.0));
+
+API_AVAILABLE(macosx(10.4),ios(3.0)) NS_SWIFT_SENDABLE
 #if (TARGET_OS_OSX || TARGET_OS_IOS || TARGET_OS_MACCATALYST)
 @interface NSPersistentStoreCoordinator : NSObject <NSLocking> {
 #else
@@ -239,6 +265,12 @@
 
 /* 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));
+
+// Finish deferred work from lightweight migration
+- (BOOL)finishDeferredLightweightMigration:(NSError **)error API_AVAILABLE(macosx(11.0),ios(14.0),tvos(14.0),watchos(7.0));
+
+// Finish deferred work from lightweight migration for a single table
+- (BOOL)finishDeferredLightweightMigrationTask:(NSError **)error API_AVAILABLE(macosx(11.0),ios(14.0),tvos(14.0),watchos(7.0));
 
 #if (TARGET_OS_OSX || TARGET_OS_IOS || TARGET_OS_MACCATALYST)
  /*
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSStagedMigrationManager.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSStagedMigrationManager.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSStagedMigrationManager.h	1969-12-31 19:00:00
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSStagedMigrationManager.h	2023-05-25 00:04:22
@@ -0,0 +1,43 @@
+/*
+    NSStagedMigrationManager.h
+    Core Data
+    Copyright (c) 2023, Apple Inc.
+    All rights reserved.
+*/
+
+#import <Foundation/NSArray.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@class NSMigrationStage;
+
+/*
+ * The NSStagedMigrationManager class encapsulates a developer-described total ordering of NSCustomMigrationStage's
+ * and supplementary NSLightweightMigrationStage's. The NSStagedMigrationManager will apply the stages in the order
+ * in which they are indexed in the .stages property at the appropriate time during staged migration. The
+ * NSStagedMigrationManager also manages the migration event loop and provides access to the migrating store via
+ * an NSPersistentContainer. A NSStagedMigrationManager should be added to store options using
+ * NSPersistentStoreStagedMigrationManagerOptionKey.
+ */
+API_AVAILABLE(macosx(14.0),ios(17.0),tvos(17.0),watchos(10.0))
+@interface NSStagedMigrationManager : NSObject
+
+/*
+ * To perform staged migration, a total ordering of models must be described to Core Data. The models in the
+ * .stages property should match the order of models for the app.
+ */
+@property (readonly, strong) NSArray<__kindof NSMigrationStage *> *stages;
+
+/*
+ * During migration, access to the migrating store can be obtained from this property. The NSPersistentContainer
+ * will be configured with the appropriate model in the willMigrateHandler and didMigrateHandler of an
+ * NSCustomMigrationStage.
+ */
+@property (readonly, strong, nullable) NSPersistentContainer *container;
+
+- (instancetype)init NS_UNAVAILABLE;
+- (instancetype)initWithMigrationStages:(NSArray<__kindof NSMigrationStage *> *)stages NS_DESIGNATED_INITIALIZER NS_REFINED_FOR_SWIFT;
+
+@end
+
+NS_ASSUME_NONNULL_END
Clone this wiki locally