From 4511490320177ca5c6abce3bb856db9b4e882bd3 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Wed, 23 Feb 2022 09:25:26 +0100 Subject: [PATCH] [CloudKit] Remove API that no longer exists in the headers from .NET. --- src/CloudKit/Enums.cs | 2 ++ src/cloudkit.cs | 8 ++++++++ .../api-annotations-dotnet/common-CloudKit.ignore | 5 ----- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/CloudKit/Enums.cs b/src/CloudKit/Enums.cs index 4e1c989ba60d..d0a9ceb0d92f 100644 --- a/src/CloudKit/Enums.cs +++ b/src/CloudKit/Enums.cs @@ -160,6 +160,7 @@ public enum CKSubscriptionType : long { // NSInteger -> CKSubscription.h +#if !NET [NoWatch] [iOS (8, 0)] [Obsoleted (PlatformName.iOS, 14, 0, message : "Use 'CKQuerySubscriptionOptions' instead.")] @@ -175,6 +176,7 @@ public enum CKSubscriptionOptions : ulong { FiresOnRecordDeletion = 1 << 2, FiresOnce = 1 << 3, } +#endif [Watch (3,0)] [iOS (10,0), Mac (10,12)] diff --git a/src/cloudkit.cs b/src/cloudkit.cs index 99ffd94b701f..0dd54b6361d0 100644 --- a/src/cloudkit.cs +++ b/src/cloudkit.cs @@ -414,6 +414,8 @@ interface CKDatabaseOperation { CKDatabase Database { get; set; } } +#if !NET + // This type is no longer in the headers. [NoWatch] [NoTV] [Obsoleted (PlatformName.iOS, 14, 0, message : "Use 'CKDiscoverAllUserIdentitiesOperation' instead.")] @@ -431,6 +433,7 @@ interface CKDiscoverAllContactsOperation { } + // This type is no longer in the headers. [Obsoleted (PlatformName.iOS, 14, 0, message : "Use 'CKUserIdentity' instead.")] [Deprecated (PlatformName.iOS, 10, 0, message : "Use 'CKUserIdentity' instead.")] [Obsoleted (PlatformName.MacOSX, 10, 16, message : "Use 'CKUserIdentity' instead.")] @@ -449,6 +452,7 @@ interface CKDiscoveredUserInfo : NSCoding, NSCopying, NSSecureCoding { [Export ("userRecordID", ArgumentSemantic.Copy)] CKRecordID UserRecordId { get; } } +#endif // !NET // CKError.h Fields [Watch (3,0)] @@ -1690,17 +1694,21 @@ interface CKDatabaseSubscription : NSSecureCoding, NSCopying [BaseType (typeof (NSObject))] interface CKSubscription : NSSecureCoding, NSCopying { +#if !NET + // This constructor does not exist in the headers (anymore?) [NoWatch] [Deprecated (PlatformName.iOS, 10,0, message: "Use 'CKQuerySubscription'.")] [Deprecated (PlatformName.MacOSX, 10,12, message: "Use 'CKQuerySubscription'.")] [Export ("initWithRecordType:predicate:options:")] NativeHandle Constructor (string recordType, NSPredicate predicate, CKSubscriptionOptions subscriptionOptions); + // This constructor does not exist in the headers (anymore?) [NoWatch] [Deprecated (PlatformName.iOS, 10,0, message: "Use 'CKQuerySubscription'.")] [Deprecated (PlatformName.MacOSX, 10,12, message: "Use 'CKQuerySubscription'.")] [Export ("initWithRecordType:predicate:subscriptionID:options:")] NativeHandle Constructor (string recordType, NSPredicate predicate, string subscriptionId, CKSubscriptionOptions subscriptionOptions); +#endif [Export ("subscriptionID")] string SubscriptionId { get; } diff --git a/tests/xtro-sharpie/api-annotations-dotnet/common-CloudKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/common-CloudKit.ignore index 9a728a421aef..8772fafbc0fb 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/common-CloudKit.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/common-CloudKit.ignore @@ -10,8 +10,3 @@ !missing-protocol! CKRecordKeyValueSetting not bound !missing-protocol-conformance! CKRecord should conform to CKRecordKeyValueSetting (defined in 'CKRecordKeyValueSettingConformance' category) !missing-selector! CKRecord::encryptedValues not bound - -# all of them deprecated and marked with the [Obsoleted] attr. -!unknown-native-enum! CKSubscriptionOptions bound -!unknown-type! CKDiscoverAllContactsOperation bound -!unknown-type! CKDiscoveredUserInfo bound