From 9a29652e554d7d698642de86e35331b428ab4f99 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Wed, 10 Jul 2024 18:48:50 +0200 Subject: [PATCH 1/9] [CloudKit] Implement Xcode 16.0 beta 1, beta 2 and beta 3 changes. The bindings that have been removed haven't fully been removed from the headers, but it looks like they will be soon. These bindings have also been deprecated since before the earliest OS versions we support, so there should be no need to keep them around. Removing them preemptively also lessens the risk of running into App Store rejections in the future. Note: there were no changes in beta 2 or beta 3. --- src/CloudKit/CKCompat.cs | 9 -- .../CKFetchNotificationChangesOperation.cs | 95 +++++++++++++++ .../CKMarkNotificationsReadOperation.cs | 67 +++++++++++ src/CloudKit/CKModifyBadgeOperation.cs | 69 +++++++++++ src/cloudkit.cs | 108 ++---------------- src/frameworks.sources | 3 + .../Documentation.KnownFailures.txt | 14 ++- ...CKFetchNotificationChangesOperationTest.cs | 56 --------- .../CKMarkNotificationsReadOperationTest.cs | 37 ------ .../CloudKit/CKModifyBadgeOperationTest.cs | 48 -------- .../api-annotations-dotnet/iOS-CloudKit.todo | 5 - .../macOS-CloudKit.todo | 5 - .../api-annotations-dotnet/tvOS-CloudKit.todo | 4 - tests/xtro-sharpie/iOS-CloudKit.todo | 5 - tests/xtro-sharpie/macOS-CloudKit.todo | 5 - tests/xtro-sharpie/tvOS-CloudKit.todo | 4 - tests/xtro-sharpie/watchOS-CloudKit.todo | 5 - 17 files changed, 253 insertions(+), 286 deletions(-) create mode 100644 src/CloudKit/CKFetchNotificationChangesOperation.cs create mode 100644 src/CloudKit/CKMarkNotificationsReadOperation.cs create mode 100644 src/CloudKit/CKModifyBadgeOperation.cs delete mode 100644 tests/monotouch-test/CloudKit/CKFetchNotificationChangesOperationTest.cs delete mode 100644 tests/monotouch-test/CloudKit/CKMarkNotificationsReadOperationTest.cs delete mode 100644 tests/monotouch-test/CloudKit/CKModifyBadgeOperationTest.cs delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/iOS-CloudKit.todo delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/macOS-CloudKit.todo delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/tvOS-CloudKit.todo delete mode 100644 tests/xtro-sharpie/iOS-CloudKit.todo delete mode 100644 tests/xtro-sharpie/macOS-CloudKit.todo delete mode 100644 tests/xtro-sharpie/tvOS-CloudKit.todo delete mode 100644 tests/xtro-sharpie/watchOS-CloudKit.todo diff --git a/src/CloudKit/CKCompat.cs b/src/CloudKit/CKCompat.cs index c3fb92a09a88..efb6bdcef65a 100644 --- a/src/CloudKit/CKCompat.cs +++ b/src/CloudKit/CKCompat.cs @@ -162,15 +162,6 @@ public virtual string? LastName { #endif #if WATCH - - public partial class CKModifyBadgeOperation { - - // `init` does not work on watchOS but we can keep compatibility with a different init - public CKModifyBadgeOperation () : this (0) - { - } - } - public partial class CKModifyRecordZonesOperation { // `init` does not work on watchOS but we can keep compatibility with a different init diff --git a/src/CloudKit/CKFetchNotificationChangesOperation.cs b/src/CloudKit/CKFetchNotificationChangesOperation.cs new file mode 100644 index 000000000000..caa5d98f76b2 --- /dev/null +++ b/src/CloudKit/CKFetchNotificationChangesOperation.cs @@ -0,0 +1,95 @@ +#if !XAMCORE_5_0 + +using System; +using System.ComponentModel; +using System.Runtime.Versioning; +using System.Diagnostics.CodeAnalysis; + +using Foundation; +using ObjCRuntime; + +#nullable enable + +#if !NET +using NativeHandle = System.IntPtr; +#endif + +namespace CloudKit { + [Register ("CKFetchNotificationChangesOperation", SkipRegistration = true)] +#if NET + [UnsupportedOSPlatform ("ios", "Use 'CKDatabaseSubscription', 'CKFetchDatabaseChangesOperation' and 'CKFetchRecordZoneChangesOperation' instead.")] + [UnsupportedOSPlatform ("macos", "Use 'CKDatabaseSubscription', 'CKFetchDatabaseChangesOperation' and 'CKFetchRecordZoneChangesOperation' instead.")] + [UnsupportedOSPlatform ("tvos", "Use 'CKDatabaseSubscription', 'CKFetchDatabaseChangesOperation' and 'CKFetchRecordZoneChangesOperation' instead.")] + [UnsupportedOSPlatform ("maccatalyst", "Use 'CKDatabaseSubscription', 'CKFetchDatabaseChangesOperation' and 'CKFetchRecordZoneChangesOperation' instead.")] +#endif + [EditorBrowsable (EditorBrowsableState.Never)] + public unsafe partial class CKFetchNotificationChangesOperation : CKOperation { + public override NativeHandle ClassHandle { get => throw new PlatformNotSupportedException (Constants.TypeRemovedAllPlatforms); } + + protected CKFetchNotificationChangesOperation (NSObjectFlag t) : base (t) + { + throw new PlatformNotSupportedException (Constants.TypeRemovedAllPlatforms); + } + + protected internal CKFetchNotificationChangesOperation (NativeHandle handle) : base (handle) + { + throw new PlatformNotSupportedException (Constants.TypeRemovedAllPlatforms); + } + + public CKFetchNotificationChangesOperation () + : base (NSObjectFlag.Empty) + { + throw new PlatformNotSupportedException (Constants.TypeRemovedAllPlatforms); + } + + public CKFetchNotificationChangesOperation (CKServerChangeToken? previousServerChangeToken) + : base (NSObjectFlag.Empty) + { + throw new PlatformNotSupportedException (Constants.TypeRemovedAllPlatforms); + } + + public unsafe virtual global::System.Action? Completed { + get { + throw new PlatformNotSupportedException (Constants.TypeRemovedAllPlatforms); + } + set { + throw new PlatformNotSupportedException (Constants.TypeRemovedAllPlatforms); + } + } + + public virtual bool MoreComing { + get { + throw new PlatformNotSupportedException (Constants.TypeRemovedAllPlatforms); + } + } + + public unsafe virtual global::System.Action? NotificationChanged { + get { + throw new PlatformNotSupportedException (Constants.TypeRemovedAllPlatforms); + } + set { + throw new PlatformNotSupportedException (Constants.TypeRemovedAllPlatforms); + } + } + + public virtual CKServerChangeToken? PreviousServerChangeToken { + get { + throw new PlatformNotSupportedException (Constants.TypeRemovedAllPlatforms); + } + set { + throw new PlatformNotSupportedException (Constants.TypeRemovedAllPlatforms); + } + } + + public virtual nuint ResultsLimit { + get { + throw new PlatformNotSupportedException (Constants.TypeRemovedAllPlatforms); + } + set { + throw new PlatformNotSupportedException (Constants.TypeRemovedAllPlatforms); + } + } + } /* class CKFetchNotificationChangesOperation */ +} + +#endif // !XAMCORE_5_0 diff --git a/src/CloudKit/CKMarkNotificationsReadOperation.cs b/src/CloudKit/CKMarkNotificationsReadOperation.cs new file mode 100644 index 000000000000..440416a5df09 --- /dev/null +++ b/src/CloudKit/CKMarkNotificationsReadOperation.cs @@ -0,0 +1,67 @@ +#if !XAMCORE_5_0 + +using System; +using System.ComponentModel; +using System.Runtime.Versioning; +using System.Diagnostics.CodeAnalysis; + +using Foundation; +using ObjCRuntime; + +#nullable enable + +#if !NET +using NativeHandle = System.IntPtr; +#endif + +namespace CloudKit { + [Register ("CKMarkNotificationsReadOperation", SkipRegistration = true)] +#if NET + [UnsupportedOSPlatform ("ios", "Use 'CKDatabaseSubscription', 'CKFetchDatabaseChangesOperation' and 'CKFetchRecordZoneChangesOperation' instead.")] + [UnsupportedOSPlatform ("macos", "Use 'CKDatabaseSubscription', 'CKFetchDatabaseChangesOperation' and 'CKFetchRecordZoneChangesOperation' instead.")] + [UnsupportedOSPlatform ("tvos", "Use 'CKDatabaseSubscription', 'CKFetchDatabaseChangesOperation' and 'CKFetchRecordZoneChangesOperation' instead.")] + [UnsupportedOSPlatform ("maccatalyst", "Use 'CKDatabaseSubscription', 'CKFetchDatabaseChangesOperation' and 'CKFetchRecordZoneChangesOperation' instead.")] +#endif + [EditorBrowsable (EditorBrowsableState.Never)] + public unsafe partial class CKMarkNotificationsReadOperation : CKOperation { + public override NativeHandle ClassHandle { get => throw new PlatformNotSupportedException (Constants.TypeRemovedAllPlatforms); } + + protected CKMarkNotificationsReadOperation (NSObjectFlag t) : base (t) + { + throw new PlatformNotSupportedException (Constants.TypeRemovedAllPlatforms); + } + + protected internal CKMarkNotificationsReadOperation (NativeHandle handle) : base (handle) + { + throw new PlatformNotSupportedException (Constants.TypeRemovedAllPlatforms); + } + + public CKMarkNotificationsReadOperation (CKNotificationID [] notificationIds) + : base (NSObjectFlag.Empty) + { + throw new PlatformNotSupportedException (Constants.TypeRemovedAllPlatforms); + } + + public unsafe virtual CKMarkNotificationsReadHandler? Completed { + get { + throw new PlatformNotSupportedException (Constants.TypeRemovedAllPlatforms); + } + set { + throw new PlatformNotSupportedException (Constants.TypeRemovedAllPlatforms); + } + } + + public virtual CKNotificationID []? NotificationIds { + get { + throw new PlatformNotSupportedException (Constants.TypeRemovedAllPlatforms); + } + set { + throw new PlatformNotSupportedException (Constants.TypeRemovedAllPlatforms); + } + } + } /* class CKMarkNotificationsReadOperation */ + + [EditorBrowsable (EditorBrowsableState.Never)] + public delegate void CKMarkNotificationsReadHandler (CKNotificationID [] notificationIDsMarkedRead, NSError operationError); +} +#endif // !XAMCORE_5_0 diff --git a/src/CloudKit/CKModifyBadgeOperation.cs b/src/CloudKit/CKModifyBadgeOperation.cs new file mode 100644 index 000000000000..2495b8d08415 --- /dev/null +++ b/src/CloudKit/CKModifyBadgeOperation.cs @@ -0,0 +1,69 @@ +#if !XAMCORE_5_0 + +using System; +using System.ComponentModel; +using System.Runtime.Versioning; +using System.Diagnostics.CodeAnalysis; + +using Foundation; +using ObjCRuntime; + +#nullable enable + +#if !NET +using NativeHandle = System.IntPtr; +#endif + +namespace CloudKit { + [Register ("CKModifyBadgeOperation", SkipRegistration = true)] +#if NET + [UnsupportedOSPlatform ("ios", "Modifying badge counts is no longer supported.")] + [UnsupportedOSPlatform ("macos", "Modifying badge counts is no longer supported.")] + [UnsupportedOSPlatform ("tvos", "Modifying badge counts is no longer supported.")] + [UnsupportedOSPlatform ("maccatalyst", "Modifying badge counts is no longer supported.")] +#endif + [EditorBrowsable (EditorBrowsableState.Never)] + public class CKModifyBadgeOperation : CKOperation { + public override NativeHandle ClassHandle { get => throw new PlatformNotSupportedException (Constants.TypeRemovedAllPlatforms); } + + public CKModifyBadgeOperation () : base (NSObjectFlag.Empty) + { + throw new PlatformNotSupportedException (Constants.TypeRemovedAllPlatforms); + } + + protected CKModifyBadgeOperation (NSObjectFlag t) : base (t) + { + throw new PlatformNotSupportedException (Constants.TypeRemovedAllPlatforms); + } + + protected internal CKModifyBadgeOperation (NativeHandle handle) : base (handle) + { + throw new PlatformNotSupportedException (Constants.TypeRemovedAllPlatforms); + } + + public CKModifyBadgeOperation (nuint badgeValue) + : base (NSObjectFlag.Empty) + { + throw new PlatformNotSupportedException (Constants.TypeRemovedAllPlatforms); + } + + public virtual nuint BadgeValue { + get { + throw new PlatformNotSupportedException (Constants.TypeRemovedAllPlatforms); + } + set { + throw new PlatformNotSupportedException (Constants.TypeRemovedAllPlatforms); + } + } + + public unsafe virtual global::System.Action? Completed { + get { + throw new PlatformNotSupportedException (Constants.TypeRemovedAllPlatforms); + } + set { + throw new PlatformNotSupportedException (Constants.TypeRemovedAllPlatforms); + } + } + } /* class CKModifyBadgeOperation */ +} +#endif // !XAMCORE_5_0 diff --git a/src/cloudkit.cs b/src/cloudkit.cs index bc21df90ac7a..ca88782131d0 100644 --- a/src/cloudkit.cs +++ b/src/cloudkit.cs @@ -79,6 +79,11 @@ interface CKUserIdentity : NSSecureCoding, NSCopying { [NoTV] [MacCatalyst (13, 1)] + [Deprecated (PlatformName.WatchOS, 11, 0, message: "Please read Apple's document about 'Sharing CloudKit Data with Other iCloud Users'.")] + [Deprecated (PlatformName.TvOS, 18, 0, message: "Please read Apple's document about 'Sharing CloudKit Data with Other iCloud Users'.")] + [Deprecated (PlatformName.iOS, 18, 0, message: "Please read Apple's document about 'Sharing CloudKit Data with Other iCloud Users'.")] + [Deprecated (PlatformName.MacCatalyst, 18, 0, message: "Please read Apple's document about 'Sharing CloudKit Data with Other iCloud Users'.")] + [Deprecated (PlatformName.MacOSX, 15, 0, message: "Please read Apple's document about 'Sharing CloudKit Data with Other iCloud Users'.")] [Export ("contactIdentifiers", ArgumentSemantic.Copy)] string [] ContactIdentifiers { get; } } @@ -217,6 +222,10 @@ interface CKShareParticipant : NSSecureCoding, NSCopying { [Export ("permission", ArgumentSemantic.Assign)] CKShareParticipantPermission Permission { get; set; } + + // This showed up in Xcode 16's b1 headers, but according to the availability attributes it's always been available. + [Export ("participantID", ArgumentSemantic.Copy)] + string ParticipantId { get; } } [MacCatalyst (13, 1)] @@ -525,48 +534,6 @@ interface CKErrorFields { NSString UserDidResetEncryptedDataKey { get; } } - [BaseType (typeof (CKOperation))] - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'CKDatabaseSubscription', 'CKFetchDatabaseChangesOperation' and 'CKFetchRecordZoneChangesOperation' instead.")] - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'CKDatabaseSubscription', 'CKFetchDatabaseChangesOperation' and 'CKFetchRecordZoneChangesOperation' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'CKDatabaseSubscription', 'CKFetchDatabaseChangesOperation' and 'CKFetchRecordZoneChangesOperation' instead.")] - [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'CKDatabaseSubscription', 'CKFetchDatabaseChangesOperation' and 'CKFetchRecordZoneChangesOperation' instead.")] - [MacCatalyst (13, 1)] - [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'CKDatabaseSubscription', 'CKFetchDatabaseChangesOperation' and 'CKFetchRecordZoneChangesOperation' instead.")] - [DisableDefaultCtor] // designated - interface CKFetchNotificationChangesOperation { - - [DesignatedInitializer] - [Export ("init")] - NativeHandle Constructor (); - - [Export ("initWithPreviousServerChangeToken:")] - NativeHandle Constructor ([NullAllowed] CKServerChangeToken previousServerChangeToken); - - [NullAllowed] // by default this property is null - [Export ("previousServerChangeToken", ArgumentSemantic.Copy)] - CKServerChangeToken PreviousServerChangeToken { get; set; } - - [Export ("resultsLimit")] - nuint ResultsLimit { get; set; } - - [Export ("moreComing")] - bool MoreComing { get; } - - [NullAllowed] // by default this property is null - [Export ("notificationChangedBlock", ArgumentSemantic.Copy)] - Action NotificationChanged { - get; - set; - } - - [NullAllowed] // by default this property is null - [Export ("fetchNotificationChangesCompletionBlock", ArgumentSemantic.Copy)] - Action Completed { - get; - set; - } - } - [MacCatalyst (13, 1)] [DisableDefaultCtor] // Objective-C exception thrown. Name: CKException Reason: You can't call init on CKServerChangeToken [BaseType (typeof (NSObject))] @@ -890,63 +857,6 @@ interface CKLocationSortDescriptor : NSSecureCoding { CLLocation RelativeLocation { get; } } - [MacCatalyst (13, 1)] - delegate void CKMarkNotificationsReadHandler (CKNotificationID [] notificationIDsMarkedRead, NSError operationError); - - [BaseType (typeof (CKOperation))] - [DisableDefaultCtor] // NSInvalidArgumentException Reason: You must call -[CKMarkNotificationsReadOperation initWithNotificationIDsToMarkRead:] - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'CKDatabaseSubscription', 'CKFetchDatabaseChangesOperation' and 'CKFetchRecordZoneChangesOperation' instead.")] - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'CKDatabaseSubscription', 'CKFetchDatabaseChangesOperation' and 'CKFetchRecordZoneChangesOperation' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'CKDatabaseSubscription', 'CKFetchDatabaseChangesOperation' and 'CKFetchRecordZoneChangesOperation' instead.")] - [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'CKDatabaseSubscription', 'CKFetchDatabaseChangesOperation' and 'CKFetchRecordZoneChangesOperation' instead.")] - [MacCatalyst (13, 1)] - [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'CKDatabaseSubscription', 'CKFetchDatabaseChangesOperation' and 'CKFetchRecordZoneChangesOperation' instead.")] - interface CKMarkNotificationsReadOperation { - - [DesignatedInitializer] - [Export ("initWithNotificationIDsToMarkRead:")] - NativeHandle Constructor (CKNotificationID [] notificationIds); - - [NullAllowed] - [Export ("notificationIDs", ArgumentSemantic.Copy)] - CKNotificationID [] NotificationIds { get; set; } - - [NullAllowed] - [Export ("markNotificationsReadCompletionBlock", ArgumentSemantic.Copy)] - CKMarkNotificationsReadHandler Completed { - get; - set; - } - } - -#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)] - [Deprecated (PlatformName.WatchOS, 4, 0)] - [Deprecated (PlatformName.TvOS, 11, 0)] - [MacCatalyst (13, 1)] - [Deprecated (PlatformName.MacCatalyst, 13, 1)] - interface CKModifyBadgeOperation { - - [Export ("initWithBadgeValue:")] - NativeHandle Constructor (nuint badgeValue); - - [Export ("badgeValue", ArgumentSemantic.UnsafeUnretained)] - nuint BadgeValue { get; set; } - - [NullAllowed] // by default this property is null - [Export ("modifyBadgeCompletionBlock", ArgumentSemantic.Copy)] - Action Completed { - get; - set; - } - } - [MacCatalyst (13, 1)] delegate void CKModifyRecordsOperationHandler (CKRecord [] savedRecords, CKRecordID [] deletedRecordIds, NSError operationError); diff --git a/src/frameworks.sources b/src/frameworks.sources index 1aabd8437b2e..4b4c58462581 100644 --- a/src/frameworks.sources +++ b/src/frameworks.sources @@ -372,6 +372,9 @@ CLOUDKIT_API_SOURCES = \ CLOUDKIT_SOURCES = \ CloudKit/CKCompat.cs \ + CloudKit/CKFetchNotificationChangesOperation.cs \ + CloudKit/CKMarkNotificationsReadOperation.cs \ + CloudKit/CKModifyBadgeOperation.cs \ CloudKit/CKRecord.cs \ CloudKit/CKRecordID.cs \ CloudKit/CKRecordZoneID.cs \ diff --git a/tests/cecil-tests/Documentation.KnownFailures.txt b/tests/cecil-tests/Documentation.KnownFailures.txt index af9bc49c35a3..47c7272979c5 100644 --- a/tests/cecil-tests/Documentation.KnownFailures.txt +++ b/tests/cecil-tests/Documentation.KnownFailures.txt @@ -28098,12 +28098,19 @@ M:CloudKit.CKDatabaseSubscription.Copy(Foundation.NSZone) M:CloudKit.CKDatabaseSubscription.EncodeTo(Foundation.NSCoder) M:CloudKit.CKFetchNotificationChangesOperation.#ctor M:CloudKit.CKFetchNotificationChangesOperation.#ctor(CloudKit.CKServerChangeToken) +M:CloudKit.CKFetchNotificationChangesOperation.#ctor(Foundation.NSObjectFlag) +M:CloudKit.CKFetchNotificationChangesOperation.#ctor(ObjCRuntime.NativeHandle) M:CloudKit.CKFetchRecordZoneChangesConfiguration.Copy(Foundation.NSZone) M:CloudKit.CKFetchRecordZoneChangesConfiguration.EncodeTo(Foundation.NSCoder) M:CloudKit.CKFetchRecordZoneChangesOptions.Copy(Foundation.NSZone) M:CloudKit.CKFetchRecordZoneChangesOptions.EncodeTo(Foundation.NSCoder) M:CloudKit.CKLocationSortDescriptor.EncodeTo(Foundation.NSCoder) M:CloudKit.CKMarkNotificationsReadOperation.#ctor(CloudKit.CKNotificationID[]) +M:CloudKit.CKMarkNotificationsReadOperation.#ctor(Foundation.NSObjectFlag) +M:CloudKit.CKMarkNotificationsReadOperation.#ctor(ObjCRuntime.NativeHandle) +M:CloudKit.CKModifyBadgeOperation.#ctor +M:CloudKit.CKModifyBadgeOperation.#ctor(Foundation.NSObjectFlag) +M:CloudKit.CKModifyBadgeOperation.#ctor(ObjCRuntime.NativeHandle) M:CloudKit.CKModifyBadgeOperation.#ctor(System.UIntPtr) M:CloudKit.CKNotification.EncodeTo(Foundation.NSCoder) M:CloudKit.CKNotificationID.Copy(Foundation.NSZone) @@ -58221,14 +58228,17 @@ P:CloudKit.CKErrorFields.RecordChangedErrorAncestorRecordKey P:CloudKit.CKErrorFields.RecordChangedErrorClientRecordKey P:CloudKit.CKErrorFields.RecordChangedErrorServerRecordKey P:CloudKit.CKErrorFields.UserDidResetEncryptedDataKey +P:CloudKit.CKFetchNotificationChangesOperation.ClassHandle P:CloudKit.CKFetchNotificationChangesOperation.Completed P:CloudKit.CKFetchNotificationChangesOperation.MoreComing P:CloudKit.CKFetchNotificationChangesOperation.NotificationChanged P:CloudKit.CKFetchNotificationChangesOperation.PreviousServerChangeToken P:CloudKit.CKFetchNotificationChangesOperation.ResultsLimit +P:CloudKit.CKMarkNotificationsReadOperation.ClassHandle P:CloudKit.CKMarkNotificationsReadOperation.Completed P:CloudKit.CKMarkNotificationsReadOperation.NotificationIds P:CloudKit.CKModifyBadgeOperation.BadgeValue +P:CloudKit.CKModifyBadgeOperation.ClassHandle P:CloudKit.CKModifyBadgeOperation.Completed P:CloudKit.CKOperation.LongLived P:CloudKit.CKOperationConfiguration.LongLived @@ -77924,7 +77934,6 @@ T:CloudKit.CKAcceptPerShareCompletionHandler T:CloudKit.CKDatabaseDeleteSubscriptionHandler T:CloudKit.CKErrorFields T:CloudKit.CKFetchDatabaseChangesCompletionHandler -T:CloudKit.CKFetchNotificationChangesOperation T:CloudKit.CKFetchPerShareMetadataHandler T:CloudKit.CKFetchRecordChangesHandler T:CloudKit.CKFetchRecordsCompletedHandler @@ -77936,9 +77945,6 @@ T:CloudKit.CKFetchShareParticipantsOperationPerShareParticipantCompletionHandler T:CloudKit.CKFetchSubscriptionsCompleteHandler T:CloudKit.CKFetchSubscriptionsPerSubscriptionCompletionHandler T:CloudKit.CKFetchWebAuthTokenOperationHandler -T:CloudKit.CKMarkNotificationsReadHandler -T:CloudKit.CKMarkNotificationsReadOperation -T:CloudKit.CKModifyBadgeOperation T:CloudKit.CKModifyRecordsOperationHandler T:CloudKit.CKModifyRecordsOperationPerRecordDeleteHandler T:CloudKit.CKModifyRecordsOperationPerRecordSaveHandler diff --git a/tests/monotouch-test/CloudKit/CKFetchNotificationChangesOperationTest.cs b/tests/monotouch-test/CloudKit/CKFetchNotificationChangesOperationTest.cs deleted file mode 100644 index 387ac3079a8d..000000000000 --- a/tests/monotouch-test/CloudKit/CKFetchNotificationChangesOperationTest.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using NUnit.Framework; -using Foundation; -using CloudKit; -using ObjCRuntime; -using Xamarin.Utils; - -namespace MonoTouchFixtures.CloudKit { - - [TestFixture] - [Preserve (AllMembers = true)] - public class CKFetchNotificationChangesOperationTest { - CKServerChangeToken token = null; - CKFetchNotificationChangesOperation op = null; - - [SetUp] - public void SetUp () - { - TestRuntime.AssertXcodeVersion (6, 0); - TestRuntime.AssertSystemVersion (ApplePlatform.MacOSX, 10, 10, throwIfOtherPlatform: false); - op = new CKFetchNotificationChangesOperation (token); - } - - [TearDown] - public void TearDown () - { - op?.Dispose (); - } - - [Test] - public void TestNotificationChangedSetter () - { - op.NotificationChanged = (obj) => { Console.WriteLine ("Notification"); }; - Assert.NotNull (op.NotificationChanged); - } - - [Test] - public void TestCompletedSetter () - { - op.Completed = (arg1, arg2) => { Console.WriteLine ("Completed"); }; - Assert.NotNull (op.Completed); - } - - [Test] - public void Default () - { - // watchOS does not allow `init` so we need to ensure that our default .ctor - // match the existing `init*` with null values (so we can remove it) - using (var mrzo = new CKFetchNotificationChangesOperation ()) { - Assert.That (op.PreviousServerChangeToken, Is.EqualTo (mrzo.PreviousServerChangeToken), "PreviousServerChangeToken"); - Assert.That (op.Completed, Is.EqualTo (mrzo.Completed), "Completed"); - Assert.That (op.NotificationChanged, Is.EqualTo (mrzo.NotificationChanged), "NotificationChanged"); - } - } - } -} diff --git a/tests/monotouch-test/CloudKit/CKMarkNotificationsReadOperationTest.cs b/tests/monotouch-test/CloudKit/CKMarkNotificationsReadOperationTest.cs deleted file mode 100644 index 8b988b89ec14..000000000000 --- a/tests/monotouch-test/CloudKit/CKMarkNotificationsReadOperationTest.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using NUnit.Framework; -using Foundation; -using CloudKit; -using ObjCRuntime; -using Xamarin.Utils; - -namespace MonoTouchFixtures.CloudKit { - - [TestFixture] - [Preserve (AllMembers = true)] - public class CKMarkNotificationsReadOperationTest { - CKNotificationID [] notificationIDs = new CKNotificationID [0]; - CKMarkNotificationsReadOperation op = null; - - [SetUp] - public void SetUp () - { - TestRuntime.AssertXcodeVersion (6, 0); - TestRuntime.AssertSystemVersion (ApplePlatform.MacOSX, 10, 10, throwIfOtherPlatform: false); - op = new CKMarkNotificationsReadOperation (notificationIDs); - } - - [TearDown] - public void TearDown () - { - op?.Dispose (); - } - - [Test] - public void TestCompletedSetter () - { - op.Completed = (idDict, e) => { Console.WriteLine ("Completed"); }; - Assert.NotNull (op.Completed); - } - } -} diff --git a/tests/monotouch-test/CloudKit/CKModifyBadgeOperationTest.cs b/tests/monotouch-test/CloudKit/CKModifyBadgeOperationTest.cs deleted file mode 100644 index c30e69600e99..000000000000 --- a/tests/monotouch-test/CloudKit/CKModifyBadgeOperationTest.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using NUnit.Framework; -using Foundation; -using CloudKit; -using ObjCRuntime; -using Xamarin.Utils; - -namespace MonoTouchFixtures.CloudKit { - - [TestFixture] - [Preserve (AllMembers = true)] - public class CKModifyBadgeOperationTest { - CKModifyBadgeOperation op = null; - - [SetUp] - public void SetUp () - { - TestRuntime.AssertXcodeVersion (6, 0); - TestRuntime.AssertSystemVersion (ApplePlatform.MacOSX, 10, 10, throwIfOtherPlatform: false); - op = new CKModifyBadgeOperation (3); - } - - [TearDown] - public void TearDown () - { - op?.Dispose (); - } - - [Test] - public void TestCompletedSetter () - { - op.Completed = (e) => { Console.WriteLine ("Completed"); }; - Assert.NotNull (op.Completed); - } - - [Test] - public void Default () - { - // watchOS does not allow `init` so we need to ensure that our default .ctor - // match the existing `init*` with null values (so we can remove it) - using (var def = new CKModifyBadgeOperation ()) - using (var zr0 = new CKModifyBadgeOperation (0)) { - Assert.That (def.BadgeValue, Is.EqualTo (zr0.BadgeValue), "BadgeValue"); - Assert.That (def.Completed, Is.EqualTo (zr0.Completed), "Completed"); - } - } - } -} diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-CloudKit.todo b/tests/xtro-sharpie/api-annotations-dotnet/iOS-CloudKit.todo deleted file mode 100644 index 26152e355d54..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-CloudKit.todo +++ /dev/null @@ -1,5 +0,0 @@ -!deprecated-attribute-missing! CKUserIdentity::contactIdentifiers missing a [Deprecated] attribute -!missing-selector! CKShareParticipant::participantID not bound -!unknown-type! CKFetchNotificationChangesOperation bound -!unknown-type! CKMarkNotificationsReadOperation bound -!unknown-type! CKModifyBadgeOperation bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-CloudKit.todo b/tests/xtro-sharpie/api-annotations-dotnet/macOS-CloudKit.todo deleted file mode 100644 index 26152e355d54..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-CloudKit.todo +++ /dev/null @@ -1,5 +0,0 @@ -!deprecated-attribute-missing! CKUserIdentity::contactIdentifiers missing a [Deprecated] attribute -!missing-selector! CKShareParticipant::participantID not bound -!unknown-type! CKFetchNotificationChangesOperation bound -!unknown-type! CKMarkNotificationsReadOperation bound -!unknown-type! CKModifyBadgeOperation bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-CloudKit.todo b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-CloudKit.todo deleted file mode 100644 index a4fc2c943a96..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-CloudKit.todo +++ /dev/null @@ -1,4 +0,0 @@ -!missing-selector! CKShareParticipant::participantID not bound -!unknown-type! CKFetchNotificationChangesOperation bound -!unknown-type! CKMarkNotificationsReadOperation bound -!unknown-type! CKModifyBadgeOperation bound diff --git a/tests/xtro-sharpie/iOS-CloudKit.todo b/tests/xtro-sharpie/iOS-CloudKit.todo deleted file mode 100644 index 26152e355d54..000000000000 --- a/tests/xtro-sharpie/iOS-CloudKit.todo +++ /dev/null @@ -1,5 +0,0 @@ -!deprecated-attribute-missing! CKUserIdentity::contactIdentifiers missing a [Deprecated] attribute -!missing-selector! CKShareParticipant::participantID not bound -!unknown-type! CKFetchNotificationChangesOperation bound -!unknown-type! CKMarkNotificationsReadOperation bound -!unknown-type! CKModifyBadgeOperation bound diff --git a/tests/xtro-sharpie/macOS-CloudKit.todo b/tests/xtro-sharpie/macOS-CloudKit.todo deleted file mode 100644 index 26152e355d54..000000000000 --- a/tests/xtro-sharpie/macOS-CloudKit.todo +++ /dev/null @@ -1,5 +0,0 @@ -!deprecated-attribute-missing! CKUserIdentity::contactIdentifiers missing a [Deprecated] attribute -!missing-selector! CKShareParticipant::participantID not bound -!unknown-type! CKFetchNotificationChangesOperation bound -!unknown-type! CKMarkNotificationsReadOperation bound -!unknown-type! CKModifyBadgeOperation bound diff --git a/tests/xtro-sharpie/tvOS-CloudKit.todo b/tests/xtro-sharpie/tvOS-CloudKit.todo deleted file mode 100644 index a4fc2c943a96..000000000000 --- a/tests/xtro-sharpie/tvOS-CloudKit.todo +++ /dev/null @@ -1,4 +0,0 @@ -!missing-selector! CKShareParticipant::participantID not bound -!unknown-type! CKFetchNotificationChangesOperation bound -!unknown-type! CKMarkNotificationsReadOperation bound -!unknown-type! CKModifyBadgeOperation bound diff --git a/tests/xtro-sharpie/watchOS-CloudKit.todo b/tests/xtro-sharpie/watchOS-CloudKit.todo deleted file mode 100644 index 26152e355d54..000000000000 --- a/tests/xtro-sharpie/watchOS-CloudKit.todo +++ /dev/null @@ -1,5 +0,0 @@ -!deprecated-attribute-missing! CKUserIdentity::contactIdentifiers missing a [Deprecated] attribute -!missing-selector! CKShareParticipant::participantID not bound -!unknown-type! CKFetchNotificationChangesOperation bound -!unknown-type! CKMarkNotificationsReadOperation bound -!unknown-type! CKModifyBadgeOperation bound From 7c51840c4fea45bf8756acbdd80a2aed16b98e9b Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Wed, 10 Jul 2024 19:07:09 +0200 Subject: [PATCH 2/9] [tests] Adjust the AllAttributedItemsMustIncludeCurrentPlatform to allow for only UnsupportedOSPlatform attributes with no versions. --- tests/cecil-tests/AttributeTest.cs | 33 +++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/tests/cecil-tests/AttributeTest.cs b/tests/cecil-tests/AttributeTest.cs index b9ccaa05017a..ac5f96558590 100644 --- a/tests/cecil-tests/AttributeTest.cs +++ b/tests/cecil-tests/AttributeTest.cs @@ -448,6 +448,9 @@ IEnumerable GetAllTypeMembers (TypeDefinition type) // public static void Extension () { } // } // + // Special case: it's allowed to not have an introduced if the only other attribute is an + // UnsupportedOSPlatform with no version. + // // When run against mac, this fails as Extension does not include a mac supported of any kind attribute [TestCaseSource (typeof (Helper), nameof (Helper.NetPlatformAssemblyDefinitions))] public void AllAttributedItemsMustIncludeCurrentPlatform (AssemblyInfo info) @@ -474,7 +477,7 @@ public void AllAttributedItemsMustIncludeCurrentPlatform (AssemblyInfo info) void CheckCurrentPlatformIncludedIfAny (ICustomAttributeProvider item, string platformName, string fullName, TypeDefinition parent, HashSet found) { - if (HasAnyAvailabilityAttribute (item)) { + if (HasAnyAvailabilityAttribute (item, onlyUnsupportedWithVersion: true)) { if (IgnoreCurrentPlatform (fullName)) { return; } @@ -572,12 +575,36 @@ IEnumerable GetAvailabilityAttributesCore (IEnumerable return null; } - bool HasAnyAvailabilityAttribute (ICustomAttributeProvider provider) => provider.CustomAttributes.Any (a => IsAvailabilityAttribute (a)); + bool HasAnyAvailabilityAttribute (ICustomAttributeProvider provider, bool onlyUnsupportedWithVersion = false) + { + return provider.CustomAttributes.Any (a => IsAvailabilityAttribute (a, onlyUnsupportedWithVersion)); + } + bool HasAnySupportedAttribute (ICustomAttributeProvider provider) => provider.CustomAttributes.Any (a => IsSupportedAttribute (a)); - bool IsAvailabilityAttribute (CustomAttribute attribute) => IsSupportedAttribute (attribute) || attribute.AttributeType.Name == "UnsupportedOSPlatformAttribute"; + bool IsAvailabilityAttribute (CustomAttribute attribute) => IsAvailabilityAttribute (attribute, false); + bool IsAvailabilityAttribute (CustomAttribute attribute, bool onlyUnsupportedWithVersion) + { + if (IsSupportedAttribute (attribute)) + return true; + + return IsUnsupportedAttribute (attribute, onlyUnsupportedWithVersion); + } + bool IsSupportedAttribute (CustomAttribute attribute) => attribute.AttributeType.Name == "SupportedOSPlatformAttribute"; + static char[] versionCharacters = new char [] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '.' }; + bool IsUnsupportedAttribute (CustomAttribute attribute, bool onlyWithVersion = false) + { + if (attribute.AttributeType.Name != "UnsupportedOSPlatformAttribute") + return false; + if (onlyWithVersion) { + var hasVersion = ((string) attribute.ConstructorArguments [0].Value).IndexOfAny (versionCharacters) > -1; + return hasVersion; + } + return true; + } + [TestCaseSource (typeof (Helper), nameof (Helper.NetPlatformAssemblyDefinitions))] public void ModelMustBeProtocol (AssemblyInfo info) { From d1f8deb98fad094955927af74020b2181555c59f Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Wed, 10 Jul 2024 19:58:26 +0200 Subject: [PATCH 3/9] [tests] Adjust introspection to not test ctors that are both hidden and unsupported. --- tests/introspection/ApiBaseTest.cs | 33 ++++++++++++++++++++++++++ tests/introspection/ApiCtorInitTest.cs | 4 ++++ 2 files changed, 37 insertions(+) diff --git a/tests/introspection/ApiBaseTest.cs b/tests/introspection/ApiBaseTest.cs index 8a2667384236..d204f331b3c2 100644 --- a/tests/introspection/ApiBaseTest.cs +++ b/tests/introspection/ApiBaseTest.cs @@ -20,6 +20,7 @@ // using System; +using System.ComponentModel; using System.IO; using System.Reflection; using System.Runtime.InteropServices; @@ -143,6 +144,20 @@ protected virtual bool Skip (Attribute attribute) return false; } + protected bool SkipDueToInvisibleAndUnsupported (MemberInfo member) + { + if (member is null) + return false; + + if (SkipDueToInvisibleAndUnsupported (member.DeclaringType)) + return true; + + if (!MemberHasUnsupported (member)) + return false; + + return MemberHasEditorBrowsableNever (member); + } + protected virtual bool SkipDueToAttribute (MemberInfo member) { if (member is null) @@ -202,6 +217,24 @@ public bool MemberHasObsolete (MemberInfo member) #endif } + public bool MemberHasUnsupported (MemberInfo member) + { +#if NET + return member.GetCustomAttributes (false).Any (); +#else + return member.GetCustomAttribute () is not null; +#endif + } + + public bool MemberHasEditorBrowsableNever (MemberInfo member) + { + var attribute = member.GetCustomAttribute (false); + if (attribute is null) + return false; + + return attribute.State == EditorBrowsableState.Never; + } + /// /// Gets the assembly on which the test fixture will reflect the NSObject-derived types. /// The default implementation returns the assembly where NSObject is defined, e.g. diff --git a/tests/introspection/ApiCtorInitTest.cs b/tests/introspection/ApiCtorInitTest.cs index 12f1d8684db0..8f5557fa0502 100644 --- a/tests/introspection/ApiCtorInitTest.cs +++ b/tests/introspection/ApiCtorInitTest.cs @@ -275,6 +275,10 @@ public void DefaultCtorAllowed () if (SkipDueToAttribute (ctor)) continue; + // Don't test methods that have [UnsupportedOSPlatform] + [EditorBrowsable (Never)] + if (SkipDueToInvisibleAndUnsupported (ctor)) + continue; + if ((ctor is null) || ctor.IsAbstract) { if (LogUntestedTypes) Console.WriteLine ("[WARNING] {0} was skipped because it had no default constructor", t); From 52da0832971948799b0bff6a9e6c2178e5b25523 Mon Sep 17 00:00:00 2001 From: GitHub Actions Autoformatter Date: Wed, 10 Jul 2024 19:32:16 +0000 Subject: [PATCH 4/9] Auto-format source code --- tests/cecil-tests/AttributeTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cecil-tests/AttributeTest.cs b/tests/cecil-tests/AttributeTest.cs index ac5f96558590..ba399a76c344 100644 --- a/tests/cecil-tests/AttributeTest.cs +++ b/tests/cecil-tests/AttributeTest.cs @@ -593,7 +593,7 @@ bool IsAvailabilityAttribute (CustomAttribute attribute, bool onlyUnsupportedWit bool IsSupportedAttribute (CustomAttribute attribute) => attribute.AttributeType.Name == "SupportedOSPlatformAttribute"; - static char[] versionCharacters = new char [] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '.' }; + static char [] versionCharacters = new char [] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '.' }; bool IsUnsupportedAttribute (CustomAttribute attribute, bool onlyWithVersion = false) { if (attribute.AttributeType.Name != "UnsupportedOSPlatformAttribute") From 3ea208f7e8ccd5789e2c5346b02e4cfcad64fc3f Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Mon, 12 Aug 2024 17:47:19 +0200 Subject: [PATCH 5/9] Update tests/introspection/ApiBaseTest.cs Co-authored-by: Manuel de la Pena --- tests/introspection/ApiBaseTest.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/introspection/ApiBaseTest.cs b/tests/introspection/ApiBaseTest.cs index d204f331b3c2..f39126432519 100644 --- a/tests/introspection/ApiBaseTest.cs +++ b/tests/introspection/ApiBaseTest.cs @@ -229,10 +229,7 @@ public bool MemberHasUnsupported (MemberInfo member) public bool MemberHasEditorBrowsableNever (MemberInfo member) { var attribute = member.GetCustomAttribute (false); - if (attribute is null) - return false; - - return attribute.State == EditorBrowsableState.Never; + return attribute?.State == EditorBrowsableState.Never; } /// From e10a918dcbe246301fd53d8e40ac1085c3483bd1 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Tue, 13 Aug 2024 15:15:25 +0200 Subject: [PATCH 6/9] misc fixes --- src/CloudKit/CKFetchNotificationChangesOperation.cs | 2 ++ .../api-annotations-dotnet/MacCatalyst-CloudKit.todo | 5 ----- 2 files changed, 2 insertions(+), 5 deletions(-) delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-CloudKit.todo diff --git a/src/CloudKit/CKFetchNotificationChangesOperation.cs b/src/CloudKit/CKFetchNotificationChangesOperation.cs index caa5d98f76b2..16c1dfc567aa 100644 --- a/src/CloudKit/CKFetchNotificationChangesOperation.cs +++ b/src/CloudKit/CKFetchNotificationChangesOperation.cs @@ -21,6 +21,8 @@ namespace CloudKit { [UnsupportedOSPlatform ("macos", "Use 'CKDatabaseSubscription', 'CKFetchDatabaseChangesOperation' and 'CKFetchRecordZoneChangesOperation' instead.")] [UnsupportedOSPlatform ("tvos", "Use 'CKDatabaseSubscription', 'CKFetchDatabaseChangesOperation' and 'CKFetchRecordZoneChangesOperation' instead.")] [UnsupportedOSPlatform ("maccatalyst", "Use 'CKDatabaseSubscription', 'CKFetchDatabaseChangesOperation' and 'CKFetchRecordZoneChangesOperation' instead.")] +#else + [Obsolete ("Use 'CKDatabaseSubscription', 'CKFetchDatabaseChangesOperation' and 'CKFetchRecordZoneChangesOperation' instead.")] #endif [EditorBrowsable (EditorBrowsableState.Never)] public unsafe partial class CKFetchNotificationChangesOperation : CKOperation { diff --git a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-CloudKit.todo b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-CloudKit.todo deleted file mode 100644 index 26152e355d54..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-CloudKit.todo +++ /dev/null @@ -1,5 +0,0 @@ -!deprecated-attribute-missing! CKUserIdentity::contactIdentifiers missing a [Deprecated] attribute -!missing-selector! CKShareParticipant::participantID not bound -!unknown-type! CKFetchNotificationChangesOperation bound -!unknown-type! CKMarkNotificationsReadOperation bound -!unknown-type! CKModifyBadgeOperation bound From e3630740c9bcf830d27e5020de528900593d5b48 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Wed, 14 Aug 2024 16:08:18 +0200 Subject: [PATCH 7/9] Add more availability attributes. --- src/CloudKit/CKModifyBadgeOperation.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/CloudKit/CKModifyBadgeOperation.cs b/src/CloudKit/CKModifyBadgeOperation.cs index 2495b8d08415..e59880e2f3b6 100644 --- a/src/CloudKit/CKModifyBadgeOperation.cs +++ b/src/CloudKit/CKModifyBadgeOperation.cs @@ -21,6 +21,11 @@ namespace CloudKit { [UnsupportedOSPlatform ("macos", "Modifying badge counts is no longer supported.")] [UnsupportedOSPlatform ("tvos", "Modifying badge counts is no longer supported.")] [UnsupportedOSPlatform ("maccatalyst", "Modifying badge counts is no longer supported.")] +#else + [Deprecated (PlatformName.MacOSX, 15, 0, message : "Modifying badge counts is no longer supported.")] + [Deprecated (PlatformName.iOS, 18, 0, message : "Modifying badge counts is no longer supported.")] + [Deprecated (PlatformName.WatchOS, 11, 0, message : "Modifying badge counts is no longer supported.")] + [Deprecated (PlatformName.TvOS, 18, 0, message : "Modifying badge counts is no longer supported.")] #endif [EditorBrowsable (EditorBrowsableState.Never)] public class CKModifyBadgeOperation : CKOperation { From b079d78bb4b2547dacd532fc408360c796ceea81 Mon Sep 17 00:00:00 2001 From: GitHub Actions Autoformatter Date: Wed, 14 Aug 2024 14:23:17 +0000 Subject: [PATCH 8/9] Auto-format source code --- src/CloudKit/CKModifyBadgeOperation.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/CloudKit/CKModifyBadgeOperation.cs b/src/CloudKit/CKModifyBadgeOperation.cs index e59880e2f3b6..c20549aa732c 100644 --- a/src/CloudKit/CKModifyBadgeOperation.cs +++ b/src/CloudKit/CKModifyBadgeOperation.cs @@ -22,10 +22,10 @@ namespace CloudKit { [UnsupportedOSPlatform ("tvos", "Modifying badge counts is no longer supported.")] [UnsupportedOSPlatform ("maccatalyst", "Modifying badge counts is no longer supported.")] #else - [Deprecated (PlatformName.MacOSX, 15, 0, message : "Modifying badge counts is no longer supported.")] - [Deprecated (PlatformName.iOS, 18, 0, message : "Modifying badge counts is no longer supported.")] - [Deprecated (PlatformName.WatchOS, 11, 0, message : "Modifying badge counts is no longer supported.")] - [Deprecated (PlatformName.TvOS, 18, 0, message : "Modifying badge counts is no longer supported.")] + [Deprecated (PlatformName.MacOSX, 15, 0, message: "Modifying badge counts is no longer supported.")] + [Deprecated (PlatformName.iOS, 18, 0, message: "Modifying badge counts is no longer supported.")] + [Deprecated (PlatformName.WatchOS, 11, 0, message: "Modifying badge counts is no longer supported.")] + [Deprecated (PlatformName.TvOS, 18, 0, message: "Modifying badge counts is no longer supported.")] #endif [EditorBrowsable (EditorBrowsableState.Never)] public class CKModifyBadgeOperation : CKOperation { From ef1181dfa7f258c9d112cfef7759a11f7513566f Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Wed, 14 Aug 2024 19:44:28 +0200 Subject: [PATCH 9/9] Fix intro --- tests/introspection/ApiCtorInitTest.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/introspection/ApiCtorInitTest.cs b/tests/introspection/ApiCtorInitTest.cs index 8f5557fa0502..a0049668c80d 100644 --- a/tests/introspection/ApiCtorInitTest.cs +++ b/tests/introspection/ApiCtorInitTest.cs @@ -118,6 +118,7 @@ protected virtual bool Skip (Type type) return true; case "MPSImageArithmetic": // Cannot directly initialize MPSImageArithmetic. Use one of the sub-classes of MPSImageArithmetic. return true; + case "CKModifyBadgeOperation": case "CKDiscoverUserInfosOperation": // deprecated, throws exception case "CKSubscription": case "MPSCnnConvolutionState":