Skip to content

ShazamKit watchOS xcode15.0 b1

Haritha Mohan edited this page Sep 12, 2023 · 3 revisions

#ShazamKit.framework https://github.com/xamarin/xamarin-macios/pull/19005

diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHError.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHError.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHError.h	2023-03-09 19:24:55
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHError.h	2023-05-19 21:49:56
@@ -47,12 +47,15 @@
     SHErrorCodeCustomCatalogInvalidURL = 301,
     
     /// Failed to sync some content to the user's library
-    /// @discussion Failed to add some items to the user's library, trying again may result in success
+    /// @discussion Failed to sync the user's library, trying again may result in success
     /// Underlying error may contain more details about the failure
     SHErrorCodeMediaLibrarySyncFailed = 400,
     
     /// Internal Error
     /// @discussion ShazamKit encountered an internal error
-    SHErrorCodeInternalError API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0), watchos(9.0)) = 500
-       
+    SHErrorCodeInternalError API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0), watchos(9.0)) = 500,
+    
+    /// Failed to fetch @c SHMediaItem
+    /// @discussion There was an error fetching the @c SHMediaItem or the provided @c shazamID is invalid.
+    SHErrorCodeMediaItemFetchFailed API_AVAILABLE(macos(14.0), ios(17.0), tvos(17.0), watchos(10.0)) = 600
 };
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHMediaItem.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHMediaItem.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHMediaItem.h	2023-03-09 19:15:08
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHMediaItem.h	2023-05-19 21:49:56
@@ -68,6 +68,9 @@
 /// The frequency skew ranges that are described by this @c SHMediaItem
 SH_EXPORT SHMediaItemProperty const SHMediaItemFrequencySkewRanges API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0), watchos(9.0)) NS_REFINED_FOR_SWIFT;
 
+/// The date when the media item was created
+SH_EXPORT SHMediaItemProperty const SHMediaItemCreationDate API_AVAILABLE(macos(14.0), ios(17.0), tvos(17.0), watchos(10.0));
+
 /// @brief @c SHMediaItem represents metadata associated with a @c SHSignature
 /// @discussion A @c SHMediaItem is used in two distinct ways
 ///     1. As the base class of a @c SHMatchedMediaItem, and therefore as the result of a match
@@ -135,6 +138,10 @@
 /// @brief An array of @c SHRange that indicate the frequency skews in the reference signature that this media item describes
 @property (NS_NONATOMIC_IOSONLY, strong, readonly, nonnull) NSArray<SHRange *> *frequencySkewRanges API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0), watchos(9.0)) NS_REFINED_FOR_SWIFT;
 
+/// @brief The date when the @c SHMediaItem was created
+/// @note This may be fetched using the key @c SHMediaItemCreationDate
+@property (NS_NONATOMIC_IOSONLY, strong, readonly, nullable) NSDate *creationDate API_AVAILABLE(macos(14.0), ios(17.0), tvos(17.0), watchos(10.0));
+
 /// Construct a new instance with the provided dictionary
 /// @param properties A dictionary of @c SHMediaItemProperty and their values
 /// @discussion You may add your own keys here to return custom data, custom data should conform to NSCoding
@@ -142,7 +149,7 @@
 
 /// @brief Fetch a @c SHMediaItem by Shazam ID
 /// @discussion The completionHandler will contain a @c SHMediaItem if the ShazamID is valid, otherwise nil and an error
-+ (void)fetchMediaItemWithShazamID:(NSString *)shazamID completionHandler:(void (^)(SHMediaItem * __nullable mediaItem, NSError * __nullable error))completionHandler NS_SWIFT_NAME(fetch(shazamID:completionHandler:));
++ (void)fetchMediaItemWithShazamID:(NSString *)shazamID completionHandler:(void (NS_SWIFT_SENDABLE ^)(SHMediaItem * __nullable mediaItem, NSError * __nullable error))completionHandler NS_SWIFT_NAME(fetch(shazamID:completionHandler:));
 
 /// Retrieve a value using a known key
 /// @param property The `SHMediaItemProperty` for a value
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHMediaLibrary.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHMediaLibrary.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHMediaLibrary.h	2023-03-09 19:24:55
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHMediaLibrary.h	2023-05-19 21:49:56
@@ -13,8 +13,7 @@
 
 /// @brief @c SHMediaLibrary represents the user's synced Shazam library.
 /// @discussion You can add new @c SHMediaItem instances to the user's library.
-/// Before using any @c SHMediaLibrary method, you must obtain permission from the user to use their Media Library by calling - [MPMediaLibrary requestAuthorization:].
-SH_EXPORT API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0))
+SH_EXPORT API_DEPRECATED("Use SHLibrary instead", macos(12.0, API_TO_BE_DEPRECATED), ios(15.0, API_TO_BE_DEPRECATED), tvos(15.0, API_TO_BE_DEPRECATED), watchos(8.0, API_TO_BE_DEPRECATED))
 @interface SHMediaLibrary : NSObject
 
 /// @brief Returns an instance of the default Shazam library.
@@ -31,7 +30,7 @@
 ///
 /// @param mediaItems An array containing the @c SHMediaItem objects to be added to the library.
 /// @param completionHandler A block called after all valid @c SHMediaItem objects have been added to the library. If an error occurred, the error parameter will be populated.
-- (void)addMediaItems:(NSArray<SHMediaItem *> *)mediaItems completionHandler:(void (^)(NSError * __nullable error))completionHandler;
+- (void)addMediaItems:(NSArray<SHMediaItem *> *)mediaItems completionHandler:(void (NS_SWIFT_SENDABLE ^)(NSError * __nullable error))completionHandler;
 
 - (instancetype)init NS_UNAVAILABLE;
 + (instancetype)new NS_UNAVAILABLE;
Clone this wiki locally