Skip to content

Commit

Permalink
[CloudKit] Remove API that no longer exists in the headers from .NET.
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfbjarne committed Feb 23, 2022
1 parent 4fd770c commit 4511490
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 2 additions & 0 deletions src/CloudKit/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.")]
Expand All @@ -175,6 +176,7 @@ public enum CKSubscriptionOptions : ulong {
FiresOnRecordDeletion = 1 << 2,
FiresOnce = 1 << 3,
}
#endif

[Watch (3,0)]
[iOS (10,0), Mac (10,12)]
Expand Down
8 changes: 8 additions & 0 deletions src/cloudkit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.")]
Expand All @@ -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.")]
Expand All @@ -449,6 +452,7 @@ interface CKDiscoveredUserInfo : NSCoding, NSCopying, NSSecureCoding {
[Export ("userRecordID", ArgumentSemantic.Copy)]
CKRecordID UserRecordId { get; }
}
#endif // !NET

// CKError.h Fields
[Watch (3,0)]
Expand Down Expand Up @@ -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; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 4511490

Please sign in to comment.