From 8d7b3f8bca5a6e5f9fba507b1fcf42b26f0af826 Mon Sep 17 00:00:00 2001 From: Haritha Mohan Date: Mon, 18 Sep 2023 08:29:29 -0700 Subject: [PATCH] [ShazamKit] Add support for Xcode 15 (#19005) WatchOS todo/xtro was weird, so added it to the ignore for now..all intro tests look good though --------- Co-authored-by: GitHub Actions Autoformatter Co-authored-by: Manuel de la Pena Co-authored-by: Rolf Bjarne Kvinge --- src/shazamkit.cs | 13 +++++++++++++ .../MacCatalyst-ShazamKit.todo | 10 ---------- .../api-annotations-dotnet/iOS-ShazamKit.todo | 4 ---- .../api-annotations-dotnet/macOS-ShazamKit.todo | 4 ---- .../api-annotations-dotnet/tvOS-ShazamKit.todo | 4 ---- tests/xtro-sharpie/iOS-ShazamKit.todo | 4 ---- tests/xtro-sharpie/macOS-ShazamKit.todo | 4 ---- tests/xtro-sharpie/tvOS-ShazamKit.todo | 4 ---- ...chOS-ShazamKit.todo => watchOS-ShazamKit.ignore} | 2 ++ 9 files changed, 15 insertions(+), 34 deletions(-) delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-ShazamKit.todo delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/iOS-ShazamKit.todo delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/macOS-ShazamKit.todo delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/tvOS-ShazamKit.todo delete mode 100644 tests/xtro-sharpie/iOS-ShazamKit.todo delete mode 100644 tests/xtro-sharpie/macOS-ShazamKit.todo delete mode 100644 tests/xtro-sharpie/tvOS-ShazamKit.todo rename tests/xtro-sharpie/{watchOS-ShazamKit.todo => watchOS-ShazamKit.ignore} (93%) diff --git a/src/shazamkit.cs b/src/shazamkit.cs index 5212eec90f91..88bb8284fa19 100644 --- a/src/shazamkit.cs +++ b/src/shazamkit.cs @@ -23,6 +23,7 @@ public enum SHErrorCode : long { CustomCatalogInvalidURL = 301, MediaLibrarySyncFailed = 400, InternalError = 500, + MediaItemFetchFailed = 600, } [iOS (15, 0), Mac (12, 0), Watch (8, 0), TV (15, 0), MacCatalyst (15, 0)] @@ -62,6 +63,9 @@ enum SHMediaItemProperty { [Watch (9, 0), TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Field ("SHMediaItemFrequencySkewRanges")] FrequencySkewRanges, + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Field ("SHMediaItemCreationDate")] + CreationDate, } [iOS (15, 0), Mac (12, 0), Watch (8, 0), TV (15, 0), MacCatalyst (15, 0)] @@ -190,9 +194,18 @@ interface SHMediaItem : NSSecureCoding, NSCopying { [Watch (9, 0), TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("frequencySkewRanges", ArgumentSemantic.Strong)] SHRange [] FrequencySkewRanges { get; } + + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NullAllowed, Export ("creationDate", ArgumentSemantic.Strong)] + NSDate CreationDate { get; } } [iOS (15, 0), Mac (12, 0), Watch (8, 0), TV (15, 0), MacCatalyst (15, 0)] + [Deprecated (PlatformName.MacOSX, 14, 0, message: "Use SHLibrary instead.")] + [Deprecated (PlatformName.iOS, 17, 0, message: "Use SHLibrary instead.")] + [Deprecated (PlatformName.TvOS, 17, 0, message: "Use SHLibrary instead.")] + [Deprecated (PlatformName.WatchOS, 10, 0, message: "Use SHLibrary instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 0, message: "Use SHLibrary instead.")] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SHMediaLibrary { diff --git a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-ShazamKit.todo b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-ShazamKit.todo deleted file mode 100644 index aa8c963b8749..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-ShazamKit.todo +++ /dev/null @@ -1,10 +0,0 @@ -!missing-enum-value! SHErrorCode native value SHErrorCodeInternalError = 500 not bound -!missing-field! SHMediaItemTimeRanges not bound -!missing-selector! +SHRange::rangeWithLowerBound:upperBound: not bound -!missing-selector! +SHSignatureGenerator::generateSignatureFromAsset:completionHandler: not bound -!missing-selector! SHMediaItem::frequencySkewRanges not bound -!missing-selector! SHMediaItem::timeRanges not bound -!missing-selector! SHRange::initWithLowerBound:upperBound: not bound -!missing-selector! SHRange::lowerBound not bound -!missing-selector! SHRange::upperBound not bound -!missing-type! SHRange not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-ShazamKit.todo b/tests/xtro-sharpie/api-annotations-dotnet/iOS-ShazamKit.todo deleted file mode 100644 index 14d4e91ff1e7..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-ShazamKit.todo +++ /dev/null @@ -1,4 +0,0 @@ -!deprecated-attribute-missing! SHMediaLibrary missing a [Deprecated] attribute -!missing-enum-value! SHErrorCode native value SHErrorCodeMediaItemFetchFailed = 600 not bound -!missing-field! SHMediaItemCreationDate not bound -!missing-selector! SHMediaItem::creationDate not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-ShazamKit.todo b/tests/xtro-sharpie/api-annotations-dotnet/macOS-ShazamKit.todo deleted file mode 100644 index 14d4e91ff1e7..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-ShazamKit.todo +++ /dev/null @@ -1,4 +0,0 @@ -!deprecated-attribute-missing! SHMediaLibrary missing a [Deprecated] attribute -!missing-enum-value! SHErrorCode native value SHErrorCodeMediaItemFetchFailed = 600 not bound -!missing-field! SHMediaItemCreationDate not bound -!missing-selector! SHMediaItem::creationDate not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-ShazamKit.todo b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-ShazamKit.todo deleted file mode 100644 index 14d4e91ff1e7..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-ShazamKit.todo +++ /dev/null @@ -1,4 +0,0 @@ -!deprecated-attribute-missing! SHMediaLibrary missing a [Deprecated] attribute -!missing-enum-value! SHErrorCode native value SHErrorCodeMediaItemFetchFailed = 600 not bound -!missing-field! SHMediaItemCreationDate not bound -!missing-selector! SHMediaItem::creationDate not bound diff --git a/tests/xtro-sharpie/iOS-ShazamKit.todo b/tests/xtro-sharpie/iOS-ShazamKit.todo deleted file mode 100644 index 14d4e91ff1e7..000000000000 --- a/tests/xtro-sharpie/iOS-ShazamKit.todo +++ /dev/null @@ -1,4 +0,0 @@ -!deprecated-attribute-missing! SHMediaLibrary missing a [Deprecated] attribute -!missing-enum-value! SHErrorCode native value SHErrorCodeMediaItemFetchFailed = 600 not bound -!missing-field! SHMediaItemCreationDate not bound -!missing-selector! SHMediaItem::creationDate not bound diff --git a/tests/xtro-sharpie/macOS-ShazamKit.todo b/tests/xtro-sharpie/macOS-ShazamKit.todo deleted file mode 100644 index 14d4e91ff1e7..000000000000 --- a/tests/xtro-sharpie/macOS-ShazamKit.todo +++ /dev/null @@ -1,4 +0,0 @@ -!deprecated-attribute-missing! SHMediaLibrary missing a [Deprecated] attribute -!missing-enum-value! SHErrorCode native value SHErrorCodeMediaItemFetchFailed = 600 not bound -!missing-field! SHMediaItemCreationDate not bound -!missing-selector! SHMediaItem::creationDate not bound diff --git a/tests/xtro-sharpie/tvOS-ShazamKit.todo b/tests/xtro-sharpie/tvOS-ShazamKit.todo deleted file mode 100644 index 14d4e91ff1e7..000000000000 --- a/tests/xtro-sharpie/tvOS-ShazamKit.todo +++ /dev/null @@ -1,4 +0,0 @@ -!deprecated-attribute-missing! SHMediaLibrary missing a [Deprecated] attribute -!missing-enum-value! SHErrorCode native value SHErrorCodeMediaItemFetchFailed = 600 not bound -!missing-field! SHMediaItemCreationDate not bound -!missing-selector! SHMediaItem::creationDate not bound diff --git a/tests/xtro-sharpie/watchOS-ShazamKit.todo b/tests/xtro-sharpie/watchOS-ShazamKit.ignore similarity index 93% rename from tests/xtro-sharpie/watchOS-ShazamKit.todo rename to tests/xtro-sharpie/watchOS-ShazamKit.ignore index 8c37ca2975c5..6339e31d1dff 100644 --- a/tests/xtro-sharpie/watchOS-ShazamKit.todo +++ b/tests/xtro-sharpie/watchOS-ShazamKit.ignore @@ -1,3 +1,4 @@ +## xtro being not recognizing !unknown-field! SHErrorDomain bound !unknown-field! SHMediaItemAppleMusicID bound !unknown-field! SHMediaItemAppleMusicURL bound @@ -27,3 +28,4 @@ !unknown-type! SHSession bound !unknown-type! SHSignature bound !unknown-type! SHSignatureGenerator bound +!unknown-field! SHMediaItemCreationDate bound