From 5fd8ea4b65f6a6cabfb903e51a69637e7f6d2fd8 Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Saenz Date: Sat, 26 Aug 2023 16:35:06 -0400 Subject: [PATCH 1/5] [CoreData] Add support for xcode 15 berta6. --- src/CoreData/Enums.cs | 4 +- src/coredata.cs | 119 ++++++++++++++++++ tests/introspection/iOS/iOSApiProtocolTest.cs | 3 + .../api-annotations-dotnet/iOS-CoreData.todo | 35 ------ .../macOS-CoreData.todo | 35 ------ .../api-annotations-dotnet/tvOS-CoreData.todo | 35 ------ tests/xtro-sharpie/iOS-CoreData.todo | 35 ------ tests/xtro-sharpie/macOS-CoreData.todo | 35 ------ tests/xtro-sharpie/tvOS-CoreData.todo | 35 ------ tests/xtro-sharpie/watchOS-CoreData.todo | 35 ------ 10 files changed, 125 insertions(+), 246 deletions(-) delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/iOS-CoreData.todo delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/macOS-CoreData.todo delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/tvOS-CoreData.todo delete mode 100644 tests/xtro-sharpie/iOS-CoreData.todo delete mode 100644 tests/xtro-sharpie/macOS-CoreData.todo delete mode 100644 tests/xtro-sharpie/tvOS-CoreData.todo delete mode 100644 tests/xtro-sharpie/watchOS-CoreData.todo diff --git a/src/CoreData/Enums.cs b/src/CoreData/Enums.cs index 783f46b6f8d5..5fd4c3feed59 100644 --- a/src/CoreData/Enums.cs +++ b/src/CoreData/Enums.cs @@ -58,7 +58,9 @@ public enum NSAttributeType : ulong { [MacCatalyst (13, 1)] Uri = 1200, Transformable = 1800, - ObjectID = 2000 + ObjectID = 2000, + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0), MacCatalyst (17,0)] + CompositeAttributeType = 2100, } // NUInteger -> NSFetchRequest.h diff --git a/src/coredata.cs b/src/coredata.cs index cef3ce115f2b..cbb3a6eb152b 100644 --- a/src/coredata.cs +++ b/src/coredata.cs @@ -56,6 +56,14 @@ interface UserInfoKeys { [Field ("NSAffectedStoresErrorKey")] NSString AffectedStoresForErrorKey { get; } + + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17,0)] + [Field ("NSPersistentStoreStagedMigrationManagerOptionKey")] + NSString StagedMigrationManagerOptionKey { get; } + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0), MacCatalyst (17,0)] + [Field ("NSPersistentStoreDeferredLightweightMigrationOptionKey")] + NSString DeferredLightweightMigrationOptionKey { get; } } [NoWatch] @@ -1371,6 +1379,16 @@ interface NSManagedObjectModel : NSCoding, NSCopying { #else NSDictionary EntityVersionHashesByName { get; } #endif + + [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0)] + [Static] + [Export ("checksumsForVersionedModelAtURL:error:")] + [return: NullAllowed] + NSDictionary ChecksumsForVersionedModel (NSUrl modelUrl, [NullAllowed] out NSError error); + + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17,0)] + [Export ("versionChecksum")] + string VersionChecksum { get; } } [BaseType (typeof (NSObject))] @@ -2346,6 +2364,14 @@ partial interface NSPersistentStoreCoordinator [Export ("currentPersistentHistoryTokenFromStores:")] [return: NullAllowed] NSPersistentHistoryToken GetCurrentPersistentHistoryToken ([NullAllowed] NSObject [] stores); + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Export ("finishDeferredLightweightMigration:")] + bool FinishDeferredLightweightMigration ([NullAllowed] out NSError error); + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Export ("finishDeferredLightweightMigrationTask:")] + bool FinishDeferredLightweightMigrationTask ([NullAllowed] out NSError error); } interface NSPersistentStoreCoordinatorStoreChangeEventArgs { @@ -2973,4 +2999,97 @@ interface NSPersistentCloudKitContainerEventResult { NSPersistentCloudKitContainerEventResultType ResultType { get; } } + [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0), MacCatalyst (17,0)] + [BaseType (typeof(NSObject))] + [DisableDefaultCtor] + interface NSStagedMigrationManager + { + [Export ("stages", ArgumentSemantic.Strong)] + NSMigrationStage[] Stages { get; } + + [NullAllowed, Export ("container", ArgumentSemantic.Strong)] + NSPersistentContainer Container { get; } + + [Export ("initWithMigrationStages:")] + [DesignatedInitializer] + NativeHandle Constructor (NSMigrationStage[] stages); + } + + [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0), MacCatalyst (17,0)] + [BaseType (typeof(NSObject))] + interface NSMigrationStage + { + [NullAllowed, Export ("label")] + string Label { get; set; } + } + + [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0), MacCatalyst (17,0)] + [BaseType (typeof(NSObject))] + [DisableDefaultCtor] + interface NSManagedObjectModelReference + { + [Export ("resolvedModel", ArgumentSemantic.Strong)] + NSManagedObjectModel ResolvedModel { get; } + + [Export ("versionChecksum", ArgumentSemantic.Strong)] + string VersionChecksum { get; } + + [Export ("initWithModel:versionChecksum:")] + NativeHandle Constructor (NSManagedObjectModel model, string versionChecksum); + + [Export ("initWithFileURL:versionChecksum:")] + NativeHandle Constructor (NSUrl fileUrl, string versionChecksum); + + [Export ("initWithEntityVersionHashes:inBundle:versionChecksum:")] + NativeHandle Constructor (NSDictionary versionHash, [NullAllowed] NSBundle bundle, string versionChecksum); + + [Export ("initWithName:inBundle:versionChecksum:")] + NativeHandle Constructor (string modelName, [NullAllowed] NSBundle bundle, string versionChecksum); + } + + [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0), MacCatalyst (17,0)] + [BaseType (typeof(NSMigrationStage))] + [DisableDefaultCtor] + interface NSLightweightMigrationStage + { + [Export ("versionChecksums", ArgumentSemantic.Strong)] + string[] VersionChecksums { get; } + + [Export ("initWithVersionChecksums:")] + [DesignatedInitializer] + NativeHandle Constructor (string[] versionChecksums); + } + + [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0), MacCatalyst (17,0)] + [BaseType (typeof(NSAttributeDescription))] + interface NSCompositeAttributeDescription + { + [Export ("elements", ArgumentSemantic.Copy)] + NSAttributeDescription[] Elements { get; set; } + } + + [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0), MacCatalyst (17,0)] + [BaseType (typeof(NSMigrationStage))] + [DisableDefaultCtor] + interface NSCustomMigrationStage + { + [Export ("currentModel", ArgumentSemantic.Strong)] + NSManagedObjectModelReference CurrentModel { get; } + + [Export ("nextModel", ArgumentSemantic.Strong)] + NSManagedObjectModelReference NextModel { get; } + + [NullAllowed] + [Export ("willMigrateHandler", ArgumentSemantic.Copy)] + Func WillMigrateHandler { get; set; } + + [NullAllowed] + [Export ("didMigrateHandler", ArgumentSemantic.Copy)] + Func DidMigrateHandler { get; set; } + + [Export ("initWithCurrentModelReference:nextModelReference:")] + [DesignatedInitializer] + NativeHandle Constructor (NSManagedObjectModelReference currentModel, NSManagedObjectModelReference nextModel); + } } + diff --git a/tests/introspection/iOS/iOSApiProtocolTest.cs b/tests/introspection/iOS/iOSApiProtocolTest.cs index c26864f2cad0..f43312ca05c8 100644 --- a/tests/introspection/iOS/iOSApiProtocolTest.cs +++ b/tests/introspection/iOS/iOSApiProtocolTest.cs @@ -754,6 +754,9 @@ protected override bool Skip (Type type, string protocolName) case "VSUserAccount": // Conformance not in headers case "PKInk": return true; + // Xcode 15 + case "NSCompositeAttributeDescription": + return true; } break; case "NSCopying": diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-CoreData.todo b/tests/xtro-sharpie/api-annotations-dotnet/iOS-CoreData.todo deleted file mode 100644 index 2da40c6eba39..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-CoreData.todo +++ /dev/null @@ -1,35 +0,0 @@ -!missing-enum-value! NSAttributeType native value NSCompositeAttributeType = 2100 not bound -!missing-field! NSPersistentStoreDeferredLightweightMigrationOptionKey not bound -!missing-field! NSPersistentStoreStagedMigrationManagerOptionKey not bound -!missing-selector! NSCompositeAttributeDescription::elements not bound -!missing-selector! NSCompositeAttributeDescription::setElements: not bound -!missing-selector! NSCustomMigrationStage::currentModel not bound -!missing-selector! NSCustomMigrationStage::didMigrateHandler not bound -!missing-selector! NSCustomMigrationStage::initWithCurrentModelReference:nextModelReference: not bound -!missing-selector! NSCustomMigrationStage::nextModel not bound -!missing-selector! NSCustomMigrationStage::setDidMigrateHandler: not bound -!missing-selector! NSCustomMigrationStage::setWillMigrateHandler: not bound -!missing-selector! NSCustomMigrationStage::willMigrateHandler not bound -!missing-selector! NSLightweightMigrationStage::initWithVersionChecksums: not bound -!missing-selector! NSLightweightMigrationStage::versionChecksums not bound -!missing-selector! NSManagedObjectModel::versionChecksum not bound -!missing-selector! NSManagedObjectModelReference::initWithEntityVersionHashes:inBundle:versionChecksum: not bound -!missing-selector! NSManagedObjectModelReference::initWithFileURL:versionChecksum: not bound -!missing-selector! NSManagedObjectModelReference::initWithModel:versionChecksum: not bound -!missing-selector! NSManagedObjectModelReference::initWithName:inBundle:versionChecksum: not bound -!missing-selector! NSManagedObjectModelReference::resolvedModel not bound -!missing-selector! NSManagedObjectModelReference::versionChecksum not bound -!missing-selector! NSMigrationStage::label not bound -!missing-selector! NSMigrationStage::setLabel: not bound -!missing-selector! NSPersistentStoreCoordinator::finishDeferredLightweightMigration: not bound -!missing-selector! NSPersistentStoreCoordinator::finishDeferredLightweightMigrationTask: not bound -!missing-selector! NSStagedMigrationManager::container not bound -!missing-selector! NSStagedMigrationManager::initWithMigrationStages: not bound -!missing-selector! NSStagedMigrationManager::stages not bound -!missing-type! NSCompositeAttributeDescription not bound -!missing-type! NSCustomMigrationStage not bound -!missing-type! NSLightweightMigrationStage not bound -!missing-type! NSManagedObjectModelReference not bound -!missing-type! NSMigrationStage not bound -!missing-type! NSStagedMigrationManager not bound -!missing-selector! +NSManagedObjectModel::checksumsForVersionedModelAtURL:error: not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-CoreData.todo b/tests/xtro-sharpie/api-annotations-dotnet/macOS-CoreData.todo deleted file mode 100644 index 2da40c6eba39..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-CoreData.todo +++ /dev/null @@ -1,35 +0,0 @@ -!missing-enum-value! NSAttributeType native value NSCompositeAttributeType = 2100 not bound -!missing-field! NSPersistentStoreDeferredLightweightMigrationOptionKey not bound -!missing-field! NSPersistentStoreStagedMigrationManagerOptionKey not bound -!missing-selector! NSCompositeAttributeDescription::elements not bound -!missing-selector! NSCompositeAttributeDescription::setElements: not bound -!missing-selector! NSCustomMigrationStage::currentModel not bound -!missing-selector! NSCustomMigrationStage::didMigrateHandler not bound -!missing-selector! NSCustomMigrationStage::initWithCurrentModelReference:nextModelReference: not bound -!missing-selector! NSCustomMigrationStage::nextModel not bound -!missing-selector! NSCustomMigrationStage::setDidMigrateHandler: not bound -!missing-selector! NSCustomMigrationStage::setWillMigrateHandler: not bound -!missing-selector! NSCustomMigrationStage::willMigrateHandler not bound -!missing-selector! NSLightweightMigrationStage::initWithVersionChecksums: not bound -!missing-selector! NSLightweightMigrationStage::versionChecksums not bound -!missing-selector! NSManagedObjectModel::versionChecksum not bound -!missing-selector! NSManagedObjectModelReference::initWithEntityVersionHashes:inBundle:versionChecksum: not bound -!missing-selector! NSManagedObjectModelReference::initWithFileURL:versionChecksum: not bound -!missing-selector! NSManagedObjectModelReference::initWithModel:versionChecksum: not bound -!missing-selector! NSManagedObjectModelReference::initWithName:inBundle:versionChecksum: not bound -!missing-selector! NSManagedObjectModelReference::resolvedModel not bound -!missing-selector! NSManagedObjectModelReference::versionChecksum not bound -!missing-selector! NSMigrationStage::label not bound -!missing-selector! NSMigrationStage::setLabel: not bound -!missing-selector! NSPersistentStoreCoordinator::finishDeferredLightweightMigration: not bound -!missing-selector! NSPersistentStoreCoordinator::finishDeferredLightweightMigrationTask: not bound -!missing-selector! NSStagedMigrationManager::container not bound -!missing-selector! NSStagedMigrationManager::initWithMigrationStages: not bound -!missing-selector! NSStagedMigrationManager::stages not bound -!missing-type! NSCompositeAttributeDescription not bound -!missing-type! NSCustomMigrationStage not bound -!missing-type! NSLightweightMigrationStage not bound -!missing-type! NSManagedObjectModelReference not bound -!missing-type! NSMigrationStage not bound -!missing-type! NSStagedMigrationManager not bound -!missing-selector! +NSManagedObjectModel::checksumsForVersionedModelAtURL:error: not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-CoreData.todo b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-CoreData.todo deleted file mode 100644 index 2da40c6eba39..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-CoreData.todo +++ /dev/null @@ -1,35 +0,0 @@ -!missing-enum-value! NSAttributeType native value NSCompositeAttributeType = 2100 not bound -!missing-field! NSPersistentStoreDeferredLightweightMigrationOptionKey not bound -!missing-field! NSPersistentStoreStagedMigrationManagerOptionKey not bound -!missing-selector! NSCompositeAttributeDescription::elements not bound -!missing-selector! NSCompositeAttributeDescription::setElements: not bound -!missing-selector! NSCustomMigrationStage::currentModel not bound -!missing-selector! NSCustomMigrationStage::didMigrateHandler not bound -!missing-selector! NSCustomMigrationStage::initWithCurrentModelReference:nextModelReference: not bound -!missing-selector! NSCustomMigrationStage::nextModel not bound -!missing-selector! NSCustomMigrationStage::setDidMigrateHandler: not bound -!missing-selector! NSCustomMigrationStage::setWillMigrateHandler: not bound -!missing-selector! NSCustomMigrationStage::willMigrateHandler not bound -!missing-selector! NSLightweightMigrationStage::initWithVersionChecksums: not bound -!missing-selector! NSLightweightMigrationStage::versionChecksums not bound -!missing-selector! NSManagedObjectModel::versionChecksum not bound -!missing-selector! NSManagedObjectModelReference::initWithEntityVersionHashes:inBundle:versionChecksum: not bound -!missing-selector! NSManagedObjectModelReference::initWithFileURL:versionChecksum: not bound -!missing-selector! NSManagedObjectModelReference::initWithModel:versionChecksum: not bound -!missing-selector! NSManagedObjectModelReference::initWithName:inBundle:versionChecksum: not bound -!missing-selector! NSManagedObjectModelReference::resolvedModel not bound -!missing-selector! NSManagedObjectModelReference::versionChecksum not bound -!missing-selector! NSMigrationStage::label not bound -!missing-selector! NSMigrationStage::setLabel: not bound -!missing-selector! NSPersistentStoreCoordinator::finishDeferredLightweightMigration: not bound -!missing-selector! NSPersistentStoreCoordinator::finishDeferredLightweightMigrationTask: not bound -!missing-selector! NSStagedMigrationManager::container not bound -!missing-selector! NSStagedMigrationManager::initWithMigrationStages: not bound -!missing-selector! NSStagedMigrationManager::stages not bound -!missing-type! NSCompositeAttributeDescription not bound -!missing-type! NSCustomMigrationStage not bound -!missing-type! NSLightweightMigrationStage not bound -!missing-type! NSManagedObjectModelReference not bound -!missing-type! NSMigrationStage not bound -!missing-type! NSStagedMigrationManager not bound -!missing-selector! +NSManagedObjectModel::checksumsForVersionedModelAtURL:error: not bound diff --git a/tests/xtro-sharpie/iOS-CoreData.todo b/tests/xtro-sharpie/iOS-CoreData.todo deleted file mode 100644 index 2da40c6eba39..000000000000 --- a/tests/xtro-sharpie/iOS-CoreData.todo +++ /dev/null @@ -1,35 +0,0 @@ -!missing-enum-value! NSAttributeType native value NSCompositeAttributeType = 2100 not bound -!missing-field! NSPersistentStoreDeferredLightweightMigrationOptionKey not bound -!missing-field! NSPersistentStoreStagedMigrationManagerOptionKey not bound -!missing-selector! NSCompositeAttributeDescription::elements not bound -!missing-selector! NSCompositeAttributeDescription::setElements: not bound -!missing-selector! NSCustomMigrationStage::currentModel not bound -!missing-selector! NSCustomMigrationStage::didMigrateHandler not bound -!missing-selector! NSCustomMigrationStage::initWithCurrentModelReference:nextModelReference: not bound -!missing-selector! NSCustomMigrationStage::nextModel not bound -!missing-selector! NSCustomMigrationStage::setDidMigrateHandler: not bound -!missing-selector! NSCustomMigrationStage::setWillMigrateHandler: not bound -!missing-selector! NSCustomMigrationStage::willMigrateHandler not bound -!missing-selector! NSLightweightMigrationStage::initWithVersionChecksums: not bound -!missing-selector! NSLightweightMigrationStage::versionChecksums not bound -!missing-selector! NSManagedObjectModel::versionChecksum not bound -!missing-selector! NSManagedObjectModelReference::initWithEntityVersionHashes:inBundle:versionChecksum: not bound -!missing-selector! NSManagedObjectModelReference::initWithFileURL:versionChecksum: not bound -!missing-selector! NSManagedObjectModelReference::initWithModel:versionChecksum: not bound -!missing-selector! NSManagedObjectModelReference::initWithName:inBundle:versionChecksum: not bound -!missing-selector! NSManagedObjectModelReference::resolvedModel not bound -!missing-selector! NSManagedObjectModelReference::versionChecksum not bound -!missing-selector! NSMigrationStage::label not bound -!missing-selector! NSMigrationStage::setLabel: not bound -!missing-selector! NSPersistentStoreCoordinator::finishDeferredLightweightMigration: not bound -!missing-selector! NSPersistentStoreCoordinator::finishDeferredLightweightMigrationTask: not bound -!missing-selector! NSStagedMigrationManager::container not bound -!missing-selector! NSStagedMigrationManager::initWithMigrationStages: not bound -!missing-selector! NSStagedMigrationManager::stages not bound -!missing-type! NSCompositeAttributeDescription not bound -!missing-type! NSCustomMigrationStage not bound -!missing-type! NSLightweightMigrationStage not bound -!missing-type! NSManagedObjectModelReference not bound -!missing-type! NSMigrationStage not bound -!missing-type! NSStagedMigrationManager not bound -!missing-selector! +NSManagedObjectModel::checksumsForVersionedModelAtURL:error: not bound diff --git a/tests/xtro-sharpie/macOS-CoreData.todo b/tests/xtro-sharpie/macOS-CoreData.todo deleted file mode 100644 index 2da40c6eba39..000000000000 --- a/tests/xtro-sharpie/macOS-CoreData.todo +++ /dev/null @@ -1,35 +0,0 @@ -!missing-enum-value! NSAttributeType native value NSCompositeAttributeType = 2100 not bound -!missing-field! NSPersistentStoreDeferredLightweightMigrationOptionKey not bound -!missing-field! NSPersistentStoreStagedMigrationManagerOptionKey not bound -!missing-selector! NSCompositeAttributeDescription::elements not bound -!missing-selector! NSCompositeAttributeDescription::setElements: not bound -!missing-selector! NSCustomMigrationStage::currentModel not bound -!missing-selector! NSCustomMigrationStage::didMigrateHandler not bound -!missing-selector! NSCustomMigrationStage::initWithCurrentModelReference:nextModelReference: not bound -!missing-selector! NSCustomMigrationStage::nextModel not bound -!missing-selector! NSCustomMigrationStage::setDidMigrateHandler: not bound -!missing-selector! NSCustomMigrationStage::setWillMigrateHandler: not bound -!missing-selector! NSCustomMigrationStage::willMigrateHandler not bound -!missing-selector! NSLightweightMigrationStage::initWithVersionChecksums: not bound -!missing-selector! NSLightweightMigrationStage::versionChecksums not bound -!missing-selector! NSManagedObjectModel::versionChecksum not bound -!missing-selector! NSManagedObjectModelReference::initWithEntityVersionHashes:inBundle:versionChecksum: not bound -!missing-selector! NSManagedObjectModelReference::initWithFileURL:versionChecksum: not bound -!missing-selector! NSManagedObjectModelReference::initWithModel:versionChecksum: not bound -!missing-selector! NSManagedObjectModelReference::initWithName:inBundle:versionChecksum: not bound -!missing-selector! NSManagedObjectModelReference::resolvedModel not bound -!missing-selector! NSManagedObjectModelReference::versionChecksum not bound -!missing-selector! NSMigrationStage::label not bound -!missing-selector! NSMigrationStage::setLabel: not bound -!missing-selector! NSPersistentStoreCoordinator::finishDeferredLightweightMigration: not bound -!missing-selector! NSPersistentStoreCoordinator::finishDeferredLightweightMigrationTask: not bound -!missing-selector! NSStagedMigrationManager::container not bound -!missing-selector! NSStagedMigrationManager::initWithMigrationStages: not bound -!missing-selector! NSStagedMigrationManager::stages not bound -!missing-type! NSCompositeAttributeDescription not bound -!missing-type! NSCustomMigrationStage not bound -!missing-type! NSLightweightMigrationStage not bound -!missing-type! NSManagedObjectModelReference not bound -!missing-type! NSMigrationStage not bound -!missing-type! NSStagedMigrationManager not bound -!missing-selector! +NSManagedObjectModel::checksumsForVersionedModelAtURL:error: not bound diff --git a/tests/xtro-sharpie/tvOS-CoreData.todo b/tests/xtro-sharpie/tvOS-CoreData.todo deleted file mode 100644 index 2da40c6eba39..000000000000 --- a/tests/xtro-sharpie/tvOS-CoreData.todo +++ /dev/null @@ -1,35 +0,0 @@ -!missing-enum-value! NSAttributeType native value NSCompositeAttributeType = 2100 not bound -!missing-field! NSPersistentStoreDeferredLightweightMigrationOptionKey not bound -!missing-field! NSPersistentStoreStagedMigrationManagerOptionKey not bound -!missing-selector! NSCompositeAttributeDescription::elements not bound -!missing-selector! NSCompositeAttributeDescription::setElements: not bound -!missing-selector! NSCustomMigrationStage::currentModel not bound -!missing-selector! NSCustomMigrationStage::didMigrateHandler not bound -!missing-selector! NSCustomMigrationStage::initWithCurrentModelReference:nextModelReference: not bound -!missing-selector! NSCustomMigrationStage::nextModel not bound -!missing-selector! NSCustomMigrationStage::setDidMigrateHandler: not bound -!missing-selector! NSCustomMigrationStage::setWillMigrateHandler: not bound -!missing-selector! NSCustomMigrationStage::willMigrateHandler not bound -!missing-selector! NSLightweightMigrationStage::initWithVersionChecksums: not bound -!missing-selector! NSLightweightMigrationStage::versionChecksums not bound -!missing-selector! NSManagedObjectModel::versionChecksum not bound -!missing-selector! NSManagedObjectModelReference::initWithEntityVersionHashes:inBundle:versionChecksum: not bound -!missing-selector! NSManagedObjectModelReference::initWithFileURL:versionChecksum: not bound -!missing-selector! NSManagedObjectModelReference::initWithModel:versionChecksum: not bound -!missing-selector! NSManagedObjectModelReference::initWithName:inBundle:versionChecksum: not bound -!missing-selector! NSManagedObjectModelReference::resolvedModel not bound -!missing-selector! NSManagedObjectModelReference::versionChecksum not bound -!missing-selector! NSMigrationStage::label not bound -!missing-selector! NSMigrationStage::setLabel: not bound -!missing-selector! NSPersistentStoreCoordinator::finishDeferredLightweightMigration: not bound -!missing-selector! NSPersistentStoreCoordinator::finishDeferredLightweightMigrationTask: not bound -!missing-selector! NSStagedMigrationManager::container not bound -!missing-selector! NSStagedMigrationManager::initWithMigrationStages: not bound -!missing-selector! NSStagedMigrationManager::stages not bound -!missing-type! NSCompositeAttributeDescription not bound -!missing-type! NSCustomMigrationStage not bound -!missing-type! NSLightweightMigrationStage not bound -!missing-type! NSManagedObjectModelReference not bound -!missing-type! NSMigrationStage not bound -!missing-type! NSStagedMigrationManager not bound -!missing-selector! +NSManagedObjectModel::checksumsForVersionedModelAtURL:error: not bound diff --git a/tests/xtro-sharpie/watchOS-CoreData.todo b/tests/xtro-sharpie/watchOS-CoreData.todo deleted file mode 100644 index 2da40c6eba39..000000000000 --- a/tests/xtro-sharpie/watchOS-CoreData.todo +++ /dev/null @@ -1,35 +0,0 @@ -!missing-enum-value! NSAttributeType native value NSCompositeAttributeType = 2100 not bound -!missing-field! NSPersistentStoreDeferredLightweightMigrationOptionKey not bound -!missing-field! NSPersistentStoreStagedMigrationManagerOptionKey not bound -!missing-selector! NSCompositeAttributeDescription::elements not bound -!missing-selector! NSCompositeAttributeDescription::setElements: not bound -!missing-selector! NSCustomMigrationStage::currentModel not bound -!missing-selector! NSCustomMigrationStage::didMigrateHandler not bound -!missing-selector! NSCustomMigrationStage::initWithCurrentModelReference:nextModelReference: not bound -!missing-selector! NSCustomMigrationStage::nextModel not bound -!missing-selector! NSCustomMigrationStage::setDidMigrateHandler: not bound -!missing-selector! NSCustomMigrationStage::setWillMigrateHandler: not bound -!missing-selector! NSCustomMigrationStage::willMigrateHandler not bound -!missing-selector! NSLightweightMigrationStage::initWithVersionChecksums: not bound -!missing-selector! NSLightweightMigrationStage::versionChecksums not bound -!missing-selector! NSManagedObjectModel::versionChecksum not bound -!missing-selector! NSManagedObjectModelReference::initWithEntityVersionHashes:inBundle:versionChecksum: not bound -!missing-selector! NSManagedObjectModelReference::initWithFileURL:versionChecksum: not bound -!missing-selector! NSManagedObjectModelReference::initWithModel:versionChecksum: not bound -!missing-selector! NSManagedObjectModelReference::initWithName:inBundle:versionChecksum: not bound -!missing-selector! NSManagedObjectModelReference::resolvedModel not bound -!missing-selector! NSManagedObjectModelReference::versionChecksum not bound -!missing-selector! NSMigrationStage::label not bound -!missing-selector! NSMigrationStage::setLabel: not bound -!missing-selector! NSPersistentStoreCoordinator::finishDeferredLightweightMigration: not bound -!missing-selector! NSPersistentStoreCoordinator::finishDeferredLightweightMigrationTask: not bound -!missing-selector! NSStagedMigrationManager::container not bound -!missing-selector! NSStagedMigrationManager::initWithMigrationStages: not bound -!missing-selector! NSStagedMigrationManager::stages not bound -!missing-type! NSCompositeAttributeDescription not bound -!missing-type! NSCustomMigrationStage not bound -!missing-type! NSLightweightMigrationStage not bound -!missing-type! NSManagedObjectModelReference not bound -!missing-type! NSMigrationStage not bound -!missing-type! NSStagedMigrationManager not bound -!missing-selector! +NSManagedObjectModel::checksumsForVersionedModelAtURL:error: not bound From 468393d784610661b7d08e8c09b14c8d5bf58a45 Mon Sep 17 00:00:00 2001 From: GitHub Actions Autoformatter Date: Sat, 26 Aug 2023 20:40:27 +0000 Subject: [PATCH 2/5] Auto-format source code --- src/CoreData/Enums.cs | 2 +- src/coredata.cs | 64 ++++++++++++++++++++----------------------- 2 files changed, 30 insertions(+), 36 deletions(-) diff --git a/src/CoreData/Enums.cs b/src/CoreData/Enums.cs index 5fd4c3feed59..dba491b44542 100644 --- a/src/CoreData/Enums.cs +++ b/src/CoreData/Enums.cs @@ -59,7 +59,7 @@ public enum NSAttributeType : ulong { Uri = 1200, Transformable = 1800, ObjectID = 2000, - [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0), MacCatalyst (17,0)] + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0), MacCatalyst (17, 0)] CompositeAttributeType = 2100, } diff --git a/src/coredata.cs b/src/coredata.cs index cbb3a6eb152b..562718752edb 100644 --- a/src/coredata.cs +++ b/src/coredata.cs @@ -57,11 +57,11 @@ interface UserInfoKeys { [Field ("NSAffectedStoresErrorKey")] NSString AffectedStoresForErrorKey { get; } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17,0)] + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Field ("NSPersistentStoreStagedMigrationManagerOptionKey")] NSString StagedMigrationManagerOptionKey { get; } - [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0), MacCatalyst (17,0)] + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0), MacCatalyst (17, 0)] [Field ("NSPersistentStoreDeferredLightweightMigrationOptionKey")] NSString DeferredLightweightMigrationOptionKey { get; } } @@ -1380,13 +1380,13 @@ interface NSManagedObjectModel : NSCoding, NSCopying { NSDictionary EntityVersionHashesByName { get; } #endif - [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0)] + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0)] [Static] [Export ("checksumsForVersionedModelAtURL:error:")] [return: NullAllowed] NSDictionary ChecksumsForVersionedModel (NSUrl modelUrl, [NullAllowed] out NSError error); - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17,0)] + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("versionChecksum")] string VersionChecksum { get; } } @@ -2365,11 +2365,11 @@ partial interface NSPersistentStoreCoordinator [return: NullAllowed] NSPersistentHistoryToken GetCurrentPersistentHistoryToken ([NullAllowed] NSObject [] stores); - [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] [Export ("finishDeferredLightweightMigration:")] bool FinishDeferredLightweightMigration ([NullAllowed] out NSError error); - [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] [Export ("finishDeferredLightweightMigrationTask:")] bool FinishDeferredLightweightMigrationTask ([NullAllowed] out NSError error); } @@ -2999,35 +2999,32 @@ interface NSPersistentCloudKitContainerEventResult { NSPersistentCloudKitContainerEventResultType ResultType { get; } } - [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0), MacCatalyst (17,0)] - [BaseType (typeof(NSObject))] + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface NSStagedMigrationManager - { + interface NSStagedMigrationManager { [Export ("stages", ArgumentSemantic.Strong)] - NSMigrationStage[] Stages { get; } + NSMigrationStage [] Stages { get; } [NullAllowed, Export ("container", ArgumentSemantic.Strong)] NSPersistentContainer Container { get; } [Export ("initWithMigrationStages:")] [DesignatedInitializer] - NativeHandle Constructor (NSMigrationStage[] stages); + NativeHandle Constructor (NSMigrationStage [] stages); } - [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0), MacCatalyst (17,0)] - [BaseType (typeof(NSObject))] - interface NSMigrationStage - { + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [BaseType (typeof (NSObject))] + interface NSMigrationStage { [NullAllowed, Export ("label")] string Label { get; set; } } - [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0), MacCatalyst (17,0)] - [BaseType (typeof(NSObject))] + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface NSManagedObjectModelReference - { + interface NSManagedObjectModelReference { [Export ("resolvedModel", ArgumentSemantic.Strong)] NSManagedObjectModel ResolvedModel { get; } @@ -3047,32 +3044,29 @@ interface NSManagedObjectModelReference NativeHandle Constructor (string modelName, [NullAllowed] NSBundle bundle, string versionChecksum); } - [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0), MacCatalyst (17,0)] - [BaseType (typeof(NSMigrationStage))] + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [BaseType (typeof (NSMigrationStage))] [DisableDefaultCtor] - interface NSLightweightMigrationStage - { + interface NSLightweightMigrationStage { [Export ("versionChecksums", ArgumentSemantic.Strong)] - string[] VersionChecksums { get; } + string [] VersionChecksums { get; } [Export ("initWithVersionChecksums:")] [DesignatedInitializer] - NativeHandle Constructor (string[] versionChecksums); + NativeHandle Constructor (string [] versionChecksums); } - [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0), MacCatalyst (17,0)] - [BaseType (typeof(NSAttributeDescription))] - interface NSCompositeAttributeDescription - { + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [BaseType (typeof (NSAttributeDescription))] + interface NSCompositeAttributeDescription { [Export ("elements", ArgumentSemantic.Copy)] - NSAttributeDescription[] Elements { get; set; } + NSAttributeDescription [] Elements { get; set; } } - [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0), MacCatalyst (17,0)] - [BaseType (typeof(NSMigrationStage))] + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [BaseType (typeof (NSMigrationStage))] [DisableDefaultCtor] - interface NSCustomMigrationStage - { + interface NSCustomMigrationStage { [Export ("currentModel", ArgumentSemantic.Strong)] NSManagedObjectModelReference CurrentModel { get; } From 9e1e6141276d3cbd67c7b11f193cd952b08c555b Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Mon, 28 Aug 2023 17:40:18 -0400 Subject: [PATCH 3/5] Fix missing attr. --- src/coredata.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coredata.cs b/src/coredata.cs index 562718752edb..6c438da7437a 100644 --- a/src/coredata.cs +++ b/src/coredata.cs @@ -1380,7 +1380,7 @@ interface NSManagedObjectModel : NSCoding, NSCopying { NSDictionary EntityVersionHashesByName { get; } #endif - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0)] + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17,0)] [Static] [Export ("checksumsForVersionedModelAtURL:error:")] [return: NullAllowed] From 210bdb1cf7776a454253e7a1c088b3ec9b78a2ab Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Mon, 28 Aug 2023 17:56:31 -0400 Subject: [PATCH 4/5] Address reviews. --- src/CoreData/Enums.cs | 2 +- src/coredata.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/CoreData/Enums.cs b/src/CoreData/Enums.cs index dba491b44542..9c618db9d24f 100644 --- a/src/CoreData/Enums.cs +++ b/src/CoreData/Enums.cs @@ -59,7 +59,7 @@ public enum NSAttributeType : ulong { Uri = 1200, Transformable = 1800, ObjectID = 2000, - [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0), MacCatalyst (17, 0)] + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] CompositeAttributeType = 2100, } diff --git a/src/coredata.cs b/src/coredata.cs index 6c438da7437a..b1ce92ed3382 100644 --- a/src/coredata.cs +++ b/src/coredata.cs @@ -2365,11 +2365,11 @@ partial interface NSPersistentStoreCoordinator [return: NullAllowed] NSPersistentHistoryToken GetCurrentPersistentHistoryToken ([NullAllowed] NSObject [] stores); - [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0), MacCatalyst (14, 0)] [Export ("finishDeferredLightweightMigration:")] bool FinishDeferredLightweightMigration ([NullAllowed] out NSError error); - [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0), MacCatalyst (14, 0)] [Export ("finishDeferredLightweightMigrationTask:")] bool FinishDeferredLightweightMigrationTask ([NullAllowed] out NSError error); } From fd8985ed9f81929b1cbafdbae2ddd7bff0aa652a Mon Sep 17 00:00:00 2001 From: GitHub Actions Autoformatter Date: Mon, 28 Aug 2023 22:01:26 +0000 Subject: [PATCH 5/5] Auto-format source code --- src/coredata.cs | 2 +- tests/introspection/iOS/iOSApiProtocolTest.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coredata.cs b/src/coredata.cs index b1ce92ed3382..7c024f32ab70 100644 --- a/src/coredata.cs +++ b/src/coredata.cs @@ -1380,7 +1380,7 @@ interface NSManagedObjectModel : NSCoding, NSCopying { NSDictionary EntityVersionHashesByName { get; } #endif - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17,0)] + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Static] [Export ("checksumsForVersionedModelAtURL:error:")] [return: NullAllowed] diff --git a/tests/introspection/iOS/iOSApiProtocolTest.cs b/tests/introspection/iOS/iOSApiProtocolTest.cs index 1f25ad0eae9a..d87b187a1c77 100644 --- a/tests/introspection/iOS/iOSApiProtocolTest.cs +++ b/tests/introspection/iOS/iOSApiProtocolTest.cs @@ -762,7 +762,7 @@ protected override bool Skip (Type type, string protocolName) case "PKInk": return true; // Xcode1 5 - case "NSCompositeAttributeDescription": + case "NSCompositeAttributeDescription": case "CKSyncEnginePendingDatabaseChange": case "CKSyncEnginePendingRecordZoneChange": case "CKSyncEnginePendingZoneDelete":