[cloudkit] Review missing 'init' on some types, in particular allow them outside watchOS

This commit is contained in:
Sebastien Pouliot 2018-08-22 14:56:51 -04:00
Родитель 19683847c2
Коммит 10d13cc986
8 изменённых файлов: 39 добавлений и 95 удалений

Просмотреть файл

@ -28,7 +28,8 @@ namespace CloudKit {
}
#endif
#if XAMCORE_2_0 || !MONOMAC
#if WATCH
public partial class CKModifyBadgeOperation {
// `init` does not work on watchOS but we can keep compatibility with a different init

Просмотреть файл

@ -750,16 +750,14 @@ namespace CloudKit {
delegate void CKFetchRecordsCompletedHandler (NSDictionary recordsByRecordId, NSError error);
[iOS (8,0), Watch (3,0), TV (10,0), Mac (10,10, onlyOn64 : true)]
[DisableDefaultCtor] // designated
#if WATCH
[DisableDefaultCtor] // does not work on watchOS, working stub provided to ease source compatibility
#else
[DesignatedDefaultCtor]
#endif
[BaseType (typeof (CKDatabaseOperation))]
interface CKFetchRecordsOperation {
#if !WATCH // does not work on watchOS, existiong init* does not allow null to be used to fake it
[DesignatedInitializer]
[Export ("init")]
IntPtr Constructor ();
#endif
[Export ("initWithRecordIDs:")]
IntPtr Constructor (CKRecordID [] recordIds);
@ -802,14 +800,12 @@ namespace CloudKit {
[iOS (8,0), Watch (3,0), TV (10,0), Mac (10,10, onlyOn64 : true)]
[BaseType (typeof (CKDatabaseOperation))]
[DisableDefaultCtor] // designated
interface CKFetchRecordZonesOperation {
#if !WATCH // does not work on watchOS, existiong init* does not allow null to be used to fake it
[DesignatedInitializer]
[Export ("init")]
IntPtr Constructor ();
#if WATCH
[DisableDefaultCtor] // does not work on watchOS, working stub provided to ease source compatibility
#else
[DesignatedDefaultCtor]
#endif
interface CKFetchRecordZonesOperation {
[Export ("initWithRecordZoneIDs:")]
IntPtr Constructor (CKRecordZoneID [] zoneIds);
@ -906,7 +902,11 @@ namespace CloudKit {
}
[iOS (8,0), Watch (3,0), TV (10,0), Mac (10,10, onlyOn64 : true)]
#if WATCH
[DisableDefaultCtor] // does not work on watchOS, working stub provided to ease source compatibility
#else
[DesignatedDefaultCtor]
#endif
[BaseType (typeof (CKOperation))]
[Deprecated (PlatformName.iOS, 11, 0)]
[Deprecated (PlatformName.MacOSX, 10, 13)]
@ -932,7 +932,11 @@ namespace CloudKit {
delegate void CKModifyRecordsOperationHandler (CKRecord [] savedRecords, CKRecordID [] deletedRecordIds, NSError operationError);
[iOS (8,0), Watch (3,0), TV (10,0), Mac (10,10, onlyOn64 : true)]
#if WATCH
[DisableDefaultCtor] // does not work on watchOS, working stub provided to ease source compatibility
#else
[DesignatedDefaultCtor]
#endif
[BaseType (typeof (CKDatabaseOperation))]
interface CKModifyRecordsOperation {
@ -984,7 +988,11 @@ namespace CloudKit {
delegate void CKModifyRecordZonesHandler (CKRecordZone [] savedRecordZones, CKRecordZoneID [] deletedRecordZoneIds, NSError operationError);
[iOS (8,0), Watch (3,0), TV (10,0), Mac (10,10, onlyOn64 : true)]
#if WATCH
[DisableDefaultCtor] // does not work on watchOS, working stub provided to ease source compatibility
#else
[DesignatedDefaultCtor]
#endif
[BaseType (typeof (CKDatabaseOperation))]
interface CKModifyRecordZonesOperation {
@ -1212,12 +1220,17 @@ namespace CloudKit {
[Watch (3,0)]
[iOS (8,0), Mac (10,10, onlyOn64 : true)]
[BaseType (typeof (NSOperation))]
[DisableDefaultCtor] // Assertion failure in -[CKOperation init], /SourceCache/CloudKit/CloudKit-175.3/Framework/Operations/CKOperation.m:65
[DisableDefaultCtor]
#if XAMCORE_4_0 || WATCH
[Abstract] // as per docs
#endif
interface CKOperation {
[Protected] // since it should (and will) be `abstract`
[DesignatedInitializer]
[Export ("init")]
IntPtr Constructor ();
// Apple removed, without deprecation, this property in iOS 9.3 SDK
// [Mac (10,11), iOS (9,0)]
// [Export ("activityStart")]
@ -1290,7 +1303,7 @@ namespace CloudKit {
[Watch (4,0), TV (11,0), Mac (10,13, onlyOn64 : true), iOS (11,0)]
[BaseType (typeof(NSObject))]
[DisableDefaultCtor]
[DesignatedDefaultCtor]
interface CKOperationGroup : NSSecureCoding {
[Export ("operationGroupID")]
@ -1334,14 +1347,12 @@ namespace CloudKit {
[iOS (8,0), Watch (3,0), TV (10,0), Mac (10,10, onlyOn64 : true)]
[BaseType (typeof (CKDatabaseOperation))]
[DisableDefaultCtor] // designated
interface CKQueryOperation {
#if !WATCH // does not work on watchOS, existiong init* does not allow null to be used to fake it
[DesignatedInitializer]
[Export ("init")]
IntPtr Constructor ();
#if WATCH
[DisableDefaultCtor] // does not work on watchOS, working stub provided to ease source compatibility
#else
[DesignatedDefaultCtor]
#endif
interface CKQueryOperation {
[Field ("CKQueryOperationMaximumResults")][Internal]
IntPtr _MaximumResults { get; set; }
@ -1626,7 +1637,6 @@ namespace CloudKit {
[NoWatch]
[iOS (10,0)][TV (10,0), Mac (10,12, onlyOn64 : true)]
[DisableDefaultCtor]
[BaseType (typeof(CKSubscription))]
interface CKDatabaseSubscription : NSSecureCoding, NSCopying
{

Просмотреть файл

@ -12,3 +12,6 @@
## Not intended to be used directly by client code
!missing-protocol! CKRecordKeyValueSetting not bound
!missing-protocol-conformance! CKRecord should conform to CKRecordKeyValueSetting (defined in 'CKRecordKeyValueSettingConformance' category)
## NSInvalidArgumentException Reason: You must call -[CKMarkNotificationsReadOperation initWithNotificationIDsToMarkRead:]
!missing-selector! CKMarkNotificationsReadOperation::init not bound

Просмотреть файл

@ -1,7 +0,0 @@
!missing-selector! CKDatabaseSubscription::init not bound
!missing-selector! CKMarkNotificationsReadOperation::init not bound
!missing-selector! CKModifyBadgeOperation::init not bound
!missing-selector! CKModifyRecordsOperation::init not bound
!missing-selector! CKModifyRecordZonesOperation::init not bound
!missing-selector! CKOperation::init not bound
!missing-selector! CKOperationGroup::init not bound

Просмотреть файл

@ -1,7 +0,0 @@
!missing-selector! CKDatabaseSubscription::init not bound
!missing-selector! CKMarkNotificationsReadOperation::init not bound
!missing-selector! CKModifyBadgeOperation::init not bound
!missing-selector! CKModifyRecordsOperation::init not bound
!missing-selector! CKModifyRecordZonesOperation::init not bound
!missing-selector! CKOperation::init not bound
!missing-selector! CKOperationGroup::init not bound

Просмотреть файл

@ -1,7 +0,0 @@
!missing-selector! CKDatabaseSubscription::init not bound
!missing-selector! CKMarkNotificationsReadOperation::init not bound
!missing-selector! CKModifyBadgeOperation::init not bound
!missing-selector! CKModifyRecordsOperation::init not bound
!missing-selector! CKModifyRecordZonesOperation::init not bound
!missing-selector! CKOperation::init not bound
!missing-selector! CKOperationGroup::init not bound

Просмотреть файл

@ -1,37 +0,0 @@
## Types (and members) added and deprecated in the same version (iOS headers are already cleaned in most cases)
!missing-type! CKDiscoverAllContactsOperation not bound
!missing-selector! CKDiscoverAllContactsOperation::discoverAllContactsCompletionBlock not bound
!missing-selector! CKDiscoverAllContactsOperation::setDiscoverAllContactsCompletionBlock: not bound
!missing-type! CKDiscoverUserInfosOperation not bound
!missing-selector! CKDiscoverUserInfosOperation::discoverUserInfosCompletionBlock not bound
!missing-selector! CKDiscoverUserInfosOperation::emailAddresses not bound
!missing-selector! CKDiscoverUserInfosOperation::initWithEmailAddresses:userRecordIDs: not bound
!missing-selector! CKDiscoverUserInfosOperation::setDiscoverUserInfosCompletionBlock: not bound
!missing-selector! CKDiscoverUserInfosOperation::setEmailAddresses: not bound
!missing-selector! CKDiscoverUserInfosOperation::setUserRecordIDs: not bound
!missing-selector! CKDiscoverUserInfosOperation::userRecordIDs not bound
!missing-type! CKDiscoveredUserInfo not bound
!missing-selector! CKDiscoveredUserInfo::firstName not bound
!missing-selector! CKDiscoveredUserInfo::lastName not bound
!missing-selector! CKDiscoveredUserInfo::userRecordID not bound
!missing-type! CKFetchRecordChangesOperation not bound
!missing-selector! CKFetchRecordChangesOperation::desiredKeys not bound
!missing-selector! CKFetchRecordChangesOperation::fetchRecordChangesCompletionBlock not bound
!missing-selector! CKFetchRecordChangesOperation::initWithRecordZoneID:previousServerChangeToken: not bound
!missing-selector! CKFetchRecordChangesOperation::moreComing not bound
!missing-selector! CKFetchRecordChangesOperation::previousServerChangeToken not bound
!missing-selector! CKFetchRecordChangesOperation::recordChangedBlock not bound
!missing-selector! CKFetchRecordChangesOperation::recordWithIDWasDeletedBlock not bound
!missing-selector! CKFetchRecordChangesOperation::recordZoneID not bound
!missing-selector! CKFetchRecordChangesOperation::resultsLimit not bound
!missing-selector! CKFetchRecordChangesOperation::setDesiredKeys: not bound
!missing-selector! CKFetchRecordChangesOperation::setFetchRecordChangesCompletionBlock: not bound
!missing-selector! CKFetchRecordChangesOperation::setPreviousServerChangeToken: not bound
!missing-selector! CKFetchRecordChangesOperation::setRecordChangedBlock: not bound
!missing-selector! CKFetchRecordChangesOperation::setRecordWithIDWasDeletedBlock: not bound
!missing-selector! CKFetchRecordChangesOperation::setRecordZoneID: not bound
!missing-selector! CKFetchRecordChangesOperation::setResultsLimit: not bound
!missing-selector! CKContainer::discoverAllContactUserInfosWithCompletionHandler: not bound
!missing-selector! CKContainer::discoverUserInfoWithEmailAddress:completionHandler: not bound
!missing-selector! CKContainer::discoverUserInfoWithUserRecordID:completionHandler: not bound
!missing-field! CKOwnerDefaultName not bound

Просмотреть файл

@ -1,12 +0,0 @@
!missing-selector! CKDiscoverAllContactsOperation::init not bound
!missing-selector! CKDiscoverUserInfosOperation::init not bound
!missing-selector! CKFetchRecordChangesOperation::init not bound
!missing-selector! CKFetchRecordsOperation::init not bound
!missing-selector! CKFetchRecordZonesOperation::init not bound
!missing-selector! CKMarkNotificationsReadOperation::init not bound
!missing-selector! CKModifyBadgeOperation::init not bound
!missing-selector! CKModifyRecordsOperation::init not bound
!missing-selector! CKModifyRecordZonesOperation::init not bound
!missing-selector! CKOperation::init not bound
!missing-selector! CKOperationGroup::init not bound
!missing-selector! CKQueryOperation::init not bound