Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CloudKit] Remove API that no longer exists in the headers from .NET. #14228

Merged
merged 1 commit into from
Feb 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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