Skip to content
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
4 changes: 2 additions & 2 deletions src/CloudKit/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public enum CKReferenceAction : ulong {
}

// NSInteger -> CKSubscription.h
[NoWatch]
[Watch (6,0)]
[iOS (8,0)]
[Mac (10, 10)]
[Native]
Expand Down Expand Up @@ -210,7 +210,7 @@ public enum CKShareParticipantType : long
PublicUser = 4,
}

[NoWatch]
[Watch (6,0)]
[iOS (10,0), Mac(10,12)]
[Native]
public enum CKQuerySubscriptionOptions : ulong
Expand Down
34 changes: 21 additions & 13 deletions src/cloudkit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -393,22 +393,22 @@ interface CKDatabase {
void DeleteRecordZone (CKRecordZoneID zoneId, Action<CKRecordZoneID, NSError> completionHandler);

[Export ("fetchSubscriptionWithID:completionHandler:")]
[NoWatch]
[Watch (6,0)]
[Async]
void FetchSubscription (string subscriptionId, Action<CKSubscription, NSError> completionHandler);

[NoWatch]
[Watch (6,0)]
[Export ("fetchAllSubscriptionsWithCompletionHandler:")]
[Async]
void FetchAllSubscriptions (Action<CKSubscription[], NSError> completionHandler);

[NoWatch]
[Watch (6,0)]
[Export ("saveSubscription:completionHandler:")]
[Async]
void SaveSubscription (CKSubscription subscription, Action<CKSubscription, NSError> completionHandler);

[Export ("deleteSubscriptionWithID:completionHandler:")]
[NoWatch]
[Watch (6,0)]
[Async]
void DeleteSubscription (string subscriptionID, CKDatabaseDeleteSubscriptionHandler completionHandler);
}
Expand Down Expand Up @@ -832,7 +832,7 @@ CKRecordZoneCompleteHandler Completed {
delegate void CKFetchSubscriptionsCompleteHandler (NSDictionary subscriptionsBySubscriptionId, NSError operationError);

[iOS (8,0), Mac (10,10, onlyOn64 : true)]
[NoWatch]
[Watch (6,0)]
[BaseType (typeof (CKDatabaseOperation))]
[DisableDefaultCtor] // designated
interface CKFetchSubscriptionsOperation {
Expand Down Expand Up @@ -1020,7 +1020,7 @@ CKModifyRecordZonesHandler Completed {
delegate void CKModifySubscriptionsHandler (CKSubscription [] savedSubscriptions, string [] deletedSubscriptionIds, NSError operationError);

[iOS (8,0), Mac (10,10, onlyOn64 : true)]
[NoWatch]
[Watch (6,0)]
[BaseType (typeof (CKDatabaseOperation))]
[DisableDefaultCtor] // designated
interface CKModifySubscriptionsOperation {
Expand Down Expand Up @@ -1584,7 +1584,7 @@ interface CKReference : NSSecureCoding, NSCopying, CKRecordValue {
CKRecordID RecordId { get; }
}

[NoWatch]
[Watch (6,0)]
[iOS (10,0)][TV (10,0), Mac (10,12, onlyOn64 : true)]
[DisableDefaultCtor]
[BaseType (typeof(CKSubscription))]
Expand All @@ -1610,7 +1610,7 @@ interface CKQuerySubscription : NSSecureCoding, NSCopying
CKQuerySubscriptionOptions SubscriptionOptions { get; }
}

[NoWatch]
[Watch (6,0)]
[iOS (10,0)][TV (10,0), Mac (10,12, onlyOn64 : true)]
[DisableDefaultCtor]
[BaseType (typeof(CKSubscription))]
Expand All @@ -1631,7 +1631,7 @@ interface CKRecordZoneSubscription : NSSecureCoding, NSCopying
string RecordType { get; set; }
}

[NoWatch]
[Watch (6,0)]
[iOS (10,0)][TV (10,0), Mac (10,12, onlyOn64 : true)]
[BaseType (typeof(CKSubscription))]
interface CKDatabaseSubscription : NSSecureCoding, NSCopying
Expand All @@ -1644,27 +1644,31 @@ interface CKDatabaseSubscription : NSSecureCoding, NSCopying
string RecordType { get; set; }
}

[NoWatch]
[Watch (6,0)]
[iOS (8,0), Mac (10,10, onlyOn64 : true)]
[DisableDefaultCtor] // objc_exception_throw on [CKSubscription init]
[BaseType (typeof (NSObject))]
interface CKSubscription : NSSecureCoding, NSCopying {

[NoWatch]
[Deprecated (PlatformName.iOS, 10,0, message: "Use 'CKQuerySubscription'.")]
[Deprecated (PlatformName.MacOSX, 10,12, message: "Use 'CKQuerySubscription'.")]
[Export ("initWithRecordType:predicate:options:")]
IntPtr Constructor (string recordType, NSPredicate predicate, CKSubscriptionOptions subscriptionOptions);

[NoWatch]
[Deprecated (PlatformName.iOS, 10,0, message: "Use 'CKQuerySubscription'.")]
[Deprecated (PlatformName.MacOSX, 10,12, message: "Use 'CKQuerySubscription'.")]
[Export ("initWithRecordType:predicate:subscriptionID:options:")]
IntPtr Constructor (string recordType, NSPredicate predicate, string subscriptionId, CKSubscriptionOptions subscriptionOptions);

[NoWatch]
[Deprecated (PlatformName.iOS, 10,0, message: "Use 'CKRecordZoneSubscription'.")]
[Deprecated (PlatformName.MacOSX, 10,12, message: "Use 'CKRecordZoneSubscription'.")]
[Export ("initWithZoneID:options:")]
IntPtr Constructor (CKRecordZoneID zoneId, CKSubscriptionOptions subscriptionOptions);

[NoWatch]
[Deprecated (PlatformName.iOS, 10,0, message: "Use 'CKRecordZoneSubscription'.")]
[Deprecated (PlatformName.MacOSX, 10,12, message: "Use 'CKRecordZoneSubscription'.")]
[Export ("initWithZoneID:subscriptionID:options:")]
Expand All @@ -1675,33 +1679,37 @@ interface CKSubscription : NSSecureCoding, NSCopying {

[Export ("subscriptionType", ArgumentSemantic.UnsafeUnretained)]
CKSubscriptionType SubscriptionType { get; }


[NoWatch]
[Deprecated (PlatformName.iOS, 10,0, message: "Use 'CKQuerySubscription'.")]
[Deprecated (PlatformName.MacOSX, 10,12, message: "Use 'CKQuerySubscription'.")]
[Export ("recordType")]
string RecordType { get; }

[NoWatch]
[Deprecated (PlatformName.iOS, 10,0, message: "Use 'CKQuerySubscription'.")]
[Deprecated (PlatformName.MacOSX, 10,12, message: "Use 'CKQuerySubscription'.")]
[Export ("predicate", ArgumentSemantic.Copy)]
NSPredicate Predicate { get; }

[NoWatch]
[Deprecated (PlatformName.iOS, 10,0, message: "Use 'CKQuerySubscriptionOptions'.")]
[Deprecated (PlatformName.MacOSX, 10,12, message: "Use 'CKQuerySubscriptionOptions'.")]
[Export ("subscriptionOptions", ArgumentSemantic.UnsafeUnretained)]
CKSubscriptionOptions SubscriptionOptions { get; }

[TV (10,0)]
[TV (10,0), Watch (6,0)]
[Export ("notificationInfo", ArgumentSemantic.Copy)]
CKNotificationInfo NotificationInfo { get; set; }

[NoWatch]
[Deprecated (PlatformName.iOS, 10,0, message: "Use 'CKRecordZoneSubscription'.")]
[Deprecated (PlatformName.MacOSX, 10,12, message: "Use 'CKRecordZoneSubscription'.")]
[Export ("zoneID", ArgumentSemantic.Copy)]
CKRecordZoneID ZoneID { get; set; }
}

[NoWatch]
[Watch (6,0)]
[iOS (8,0)][TV (10,0), Mac (10,10, onlyOn64 : true)]
[BaseType (typeof (NSObject))]
interface CKNotificationInfo : NSSecureCoding, NSCopying, NSCoding {
Expand Down
3 changes: 3 additions & 0 deletions tests/xtro-sharpie/watchOS-CloudKit.ignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,6 @@
!missing-selector! CKModifyRecordsOperation::init not bound
!missing-selector! CKModifyRecordZonesOperation::init not bound
!missing-selector! CKQueryOperation::init not bound

## Types (and members) added and deprecated in the same version (watchOS 6,0)
!missing-selector! CKSubscription::recordType not bound
85 changes: 0 additions & 85 deletions tests/xtro-sharpie/watchOS-CloudKit.todo

This file was deleted.