-
Notifications
You must be signed in to change notification settings - Fork 518
ShazamKit tvOS xcode14.0 beta1
tj_devel709 edited this page Jul 18, 2022
·
3 revisions
#ShazamKit.framework https://github.com/xamarin/xamarin-macios/pull/15539
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHCatalog.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHCatalog.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHCatalog.h 2022-02-23 07:11:23.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHCatalog.h 2022-06-03 18:08:04.000000000 -0400
@@ -8,7 +8,7 @@
#import <Foundation/Foundation.h>
#import <ShazamKit/SHDefines.h>
-NS_ASSUME_NONNULL_BEGIN
+NS_HEADER_AUDIT_BEGIN(nullability, sendability)
/// @brief An abstract base class for storing signatures
///
@@ -34,4 +34,4 @@
@end
-NS_ASSUME_NONNULL_END
+NS_HEADER_AUDIT_END(nullability, sendability)
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHCustomCatalog.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHCustomCatalog.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHCustomCatalog.h 2022-02-23 07:11:23.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHCustomCatalog.h 2022-06-03 18:08:04.000000000 -0400
@@ -11,7 +11,7 @@
#import <ShazamKit/SHMediaItem.h>
#import <ShazamKit/SHCatalog.h>
-NS_ASSUME_NONNULL_BEGIN
+NS_HEADER_AUDIT_BEGIN(nullability, sendability)
/// @brief Configure a custom catalog of @c SHSignature objects to match against
/// @discussion Use a custom catalog if you intend to search against reference signatures that you have provided yourself. All matches will be performed locally on the device against the signatures added to this Catalog.
@@ -24,14 +24,16 @@
/// @param signature The reference to match against
/// @param mediaItems The metadata associated with the @c SHSignature
/// @discussion Once the @c SHCatalog had been added to a @c SHSession further calls to this method will be ignored
+/// @return YES if the data was successfully added, NO on failure with a populated error parameter
- (BOOL)addReferenceSignature:(SHSignature *)signature representingMediaItems:(NSArray<SHMediaItem *> *)mediaItems error:(NSError **)error;
-/// Load a pre made Custom catalog from disk
-/// @param customCatalogURL The path to the assets
-/// @param error An error if the bundle could not be loaded
+/// Load a `shazamcatalog` file from a file path URL
+/// @param customCatalogURL The path to the `shazamcatalog` file.
+/// @param error An error if the catalog could not be loaded
+/// @return YES if the data was successfully added, NO on failure with a populated error parameter
- (BOOL)addCustomCatalogFromURL:(NSURL *)customCatalogURL error:(NSError **)error;
-/// Write this Catalog to disk
+/// Write this Catalog to a URL
/// @discussion A Catalog can safely be shared among devices
/// @note If the `destinationURL` is a directory, a file named Signatures.shazamcatalog will be created
/// @param destinationURL The location to write to
@@ -44,5 +46,4 @@
@end
-
-NS_ASSUME_NONNULL_END
+NS_HEADER_AUDIT_END(nullability, sendability)
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHError.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHError.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHError.h 2022-02-23 07:11:23.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHError.h 2022-06-03 18:08:04.000000000 -0400
@@ -49,6 +49,10 @@
/// 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
/// Underlying error may contain more details about the failure
- SHErrorCodeMediaLibrarySyncFailed = 400
+ 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
};
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHMatch.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHMatch.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHMatch.h 2022-02-23 07:11:23.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHMatch.h 2022-06-03 18:08:04.000000000 -0400
@@ -10,12 +10,14 @@
#import <ShazamKit/SHSignature.h>
#import <ShazamKit/SHMatchedMediaItem.h>
-NS_ASSUME_NONNULL_BEGIN
+NS_HEADER_AUDIT_BEGIN(nullability, sendability)
/// @brief A @c SHMatch indicates that a Signature matched a reference Signature in the target @c SHCatalog
/// @discussion A @c SHSignature can match many reference Signatures in a catalog and in turn a Signature can map to
/// many @c SHMediaItem. Therefore a match encapsulates the query signature and all of the various @c SHMediaItem it matched
-SH_EXPORT API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0))
+///
+/// @note @c SHMatch is not intended to be subclassed
+SH_EXPORT NS_SWIFT_SENDABLE API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0))
@interface SHMatch : NSObject <NSSecureCoding>
/// @brief The @c SHMatchedMediaItem belonging to the instance of @c SHSignature that we matched
@@ -33,4 +35,4 @@
@end
-NS_ASSUME_NONNULL_END
+NS_HEADER_AUDIT_END(nullability, sendability)
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHMatchedMediaItem.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHMatchedMediaItem.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHMatchedMediaItem.h 2022-02-23 07:11:23.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHMatchedMediaItem.h 2022-06-03 18:08:04.000000000 -0400
@@ -7,19 +7,23 @@
#import <ShazamKit/SHMediaItem.h>
-NS_ASSUME_NONNULL_BEGIN
+NS_HEADER_AUDIT_BEGIN(nullability, sendability)
/// How far in seconds is this match from the start of the reference audio
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0))
SH_EXPORT SHMediaItemProperty const SHMediaItemMatchOffset;
/// How much the match differs in frequency from reference material
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0))
SH_EXPORT SHMediaItemProperty const SHMediaItemFrequencySkew;
/// @brief @c SHMatchedMediaItem represents metadata that has been matched against a @c SHCatalog
/// @discussion Extra information is presented that can only be generated from a match. The properties provided here
/// that are not available on @c SHMediaItem are ephemeral and can differ each time there is a match of the @c SHSignature that this
/// object represents
-SH_EXPORT API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0))
+///
+/// @note @c SHMatchedMediaItem is not intended to be subclassed
+SH_EXPORT NS_SWIFT_SENDABLE API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0))
@interface SHMatchedMediaItem : SHMediaItem <NSSecureCoding>
/// The frequency difference between the reference and sample audio
@@ -36,4 +40,4 @@
@end
-NS_ASSUME_NONNULL_END
+NS_HEADER_AUDIT_END(nullability, sendability)
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHMediaItem.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHMediaItem.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHMediaItem.h 2022-02-23 07:57:39.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHMediaItem.h 2022-05-31 15:03:03.000000000 -0400
@@ -7,56 +7,73 @@
#import <Foundation/Foundation.h>
#import <ShazamKit/SHDefines.h>
+#import <ShazamKit/SHRange.h>
-NS_ASSUME_NONNULL_BEGIN
+NS_HEADER_AUDIT_BEGIN(nullability, sendability)
API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0))
typedef NSString * SHMediaItemProperty NS_TYPED_EXTENSIBLE_ENUM;
/// The Shazam media ID
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0))
SH_EXPORT SHMediaItemProperty const SHMediaItemShazamID;
/// Title
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0))
SH_EXPORT SHMediaItemProperty const SHMediaItemTitle;
/// Subtitle
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0))
SH_EXPORT SHMediaItemProperty const SHMediaItemSubtitle;
/// Artist
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0))
SH_EXPORT SHMediaItemProperty const SHMediaItemArtist;
/// A web URL representing this result
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0))
SH_EXPORT SHMediaItemProperty const SHMediaItemWebURL;
/// The AppleMusic ID
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0))
SH_EXPORT SHMediaItemProperty const SHMediaItemAppleMusicID;
/// A link to this media on Apple Music
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0))
SH_EXPORT SHMediaItemProperty const SHMediaItemAppleMusicURL;
/// A URL to the artwork
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0))
SH_EXPORT SHMediaItemProperty const SHMediaItemArtworkURL;
/// A URL for a Video associated with the media
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0))
SH_EXPORT SHMediaItemProperty const SHMediaItemVideoURL;
/// Is this content explicit
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0))
SH_EXPORT SHMediaItemProperty const SHMediaItemExplicitContent;
/// An array of strings representing the genres of the media item
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0))
SH_EXPORT SHMediaItemProperty const SHMediaItemGenres;
/// The International Standard Recording Code
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0))
SH_EXPORT SHMediaItemProperty const SHMediaItemISRC;
+/// The time ranges in the represented media that are described by this @c SHMediaItem
+SH_EXPORT SHMediaItemProperty const SHMediaItemTimeRanges API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0), watchos(9.0)) NS_REFINED_FOR_SWIFT;
+
/// @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 SHMatchedMedia item, and therefore as the result of a match
+/// 1. As the base class of a @c SHMatchedMediaItem, and therefore as the result of a match
/// 2. As a way of associating metadata with reference signatures in a @c SHCustomCatalog
///
/// A SHMediaItem contains no required fields and may be entirely blank, they can also contain custom data set with custom keys when making a @c SHCustomCatalog.
-///
-SH_EXPORT API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0))
+///
+/// @note @c SHMediaItem is not intended to be subclassed further.
+SH_EXPORT NS_SWIFT_SENDABLE API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0))
@interface SHMediaItem : NSObject <NSSecureCoding, NSCopying>
/// The Shazam Media ID
@@ -109,9 +126,16 @@
/// @note This may be fetched using the key @c SHMediaItemISRC
@property (NS_NONATOMIC_IOSONLY, copy, readonly, nullable) NSString *isrc;
+/// @brief An array of @c SHRange that indicate the offsets within the reference signature that this media item describes
+@property (NS_NONATOMIC_IOSONLY, strong, readonly, nonnull) NSArray<SHRange *> *timeRanges API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0), watchos(9.0)) NS_REFINED_FOR_SWIFT;
+
+/// @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;
+
/// 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
-+ (instancetype)mediaItemWithProperties:(NSDictionary<SHMediaItemProperty, id> *)properties;
++ (instancetype)mediaItemWithProperties:(NSDictionary<SHMediaItemProperty, id> *)properties NS_REFINED_FOR_SWIFT;
/// @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
@@ -130,4 +154,4 @@
@end
-NS_ASSUME_NONNULL_END
+NS_HEADER_AUDIT_END(nullability, sendability)
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHMediaLibrary.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHMediaLibrary.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHMediaLibrary.h 2022-02-23 07:11:23.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHMediaLibrary.h 2022-06-03 18:08:05.000000000 -0400
@@ -9,7 +9,7 @@
#import <ShazamKit/SHDefines.h>
#import <ShazamKit/SHMediaItem.h>
-NS_ASSUME_NONNULL_BEGIN
+NS_HEADER_AUDIT_BEGIN(nullability, sendability)
/// @brief @c SHMediaLibrary represents the user's synced Shazam library.
/// @discussion You can add new @c SHMediaItem instances to the user's library.
@@ -38,4 +38,4 @@
@end
-NS_ASSUME_NONNULL_END
+NS_HEADER_AUDIT_END(nullability, sendability)
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHRange.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHRange.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHRange.h 1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHRange.h 2022-06-03 18:08:04.000000000 -0400
@@ -0,0 +1,40 @@
+//
+// SHRange.h
+// ShazamKit
+//
+// Copyright © 2022 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <ShazamKit/SHDefines.h>
+
+NS_HEADER_AUDIT_BEGIN(nullability, sendability)
+
+/// A half-open interval from a lower bound up to, but not including, an upper bound.
+SH_EXPORT NS_SWIFT_SENDABLE API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0), watchos(9.0)) NS_REFINED_FOR_SWIFT
+@interface SHRange : NSObject <NSSecureCoding, NSCopying>
+
+/// The lowerBound of this time range
+@property (NS_NONATOMIC_IOSONLY, assign, readonly) double lowerBound;
+
+/// The upperBound of this time range, not included in this range
+@property (NS_NONATOMIC_IOSONLY, assign, readonly) double upperBound;
+
+/// Convenience constructor for creating a range
+/// @param lowerBound The lower bound of this range
+/// @param upperBound The upper bound of this range
+/// @note lowerBound should be less than or equal to upperBound
++ (instancetype)rangeWithLowerBound:(double)lowerBound upperBound:(double)upperBound;
+
+/// Convenience constructor for creating a range
+/// @param lowerBound The lower bound of this range
+/// @param upperBound The upper bound of this range
+/// @note lowerBound should be less than or equal to upperBound
+- (instancetype)initWithLowerBound:(double)lowerBound upperBound:(double)upperBound NS_DESIGNATED_INITIALIZER;
+
+- (instancetype)init NS_UNAVAILABLE;
++ (instancetype)new NS_UNAVAILABLE;
+
+@end
+
+NS_HEADER_AUDIT_END(nullability, sendability)
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHSession.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHSession.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHSession.h 2022-02-23 07:11:23.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHSession.h 2022-05-31 14:53:12.000000000 -0400
@@ -12,7 +12,7 @@
#import <ShazamKit/SHSignature.h>
#import <ShazamKit/SHMatch.h>
-NS_ASSUME_NONNULL_BEGIN
+NS_HEADER_AUDIT_BEGIN(nullability, sendability)
@class SHSession;
@@ -63,7 +63,7 @@
- (instancetype)initWithCatalog:(SHCatalog *)catalog;
/// @brief Flow audio buffers for matching into the session
-/// @discussion Audio will be converted into signatures and matched against the store. Results are communicated through the delegate.
+/// @discussion Audio will be converted into signatures and matched against the @c SHCatalog. Results are communicated through the delegate.
/// The initial buffer specifies the @c AVAudioFormat and all subsequent buffers must contain the same format otherwise an error will be communicated through
/// the delegate.
///
@@ -80,4 +80,4 @@
@end
-NS_ASSUME_NONNULL_END
+NS_HEADER_AUDIT_END(nullability, sendability)
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHSignature.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHSignature.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHSignature.h 2022-02-23 07:11:23.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHSignature.h 2022-06-03 18:08:04.000000000 -0400
@@ -8,7 +8,7 @@
#import <Foundation/Foundation.h>
#import <ShazamKit/SHDefines.h>
-NS_ASSUME_NONNULL_BEGIN
+NS_HEADER_AUDIT_BEGIN(nullability, sendability)
/// @brief The @c SHSignature class is an opaque data container that can be used to store recognition data.
/// @discussion Signatures are a compact lossy representation of the original audio. The original audio cannot
@@ -21,7 +21,8 @@
///
/// There are exceptions to the requirement for exactly matching audio, a signature is robust against slight changes in frequency and speed.
///
-SH_EXPORT API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0))
+/// @note @c SHSignature is not intended to be subclassed
+SH_EXPORT NS_SWIFT_SENDABLE API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0))
@interface SHSignature : NSObject <NSSecureCoding, NSCopying>
/// @brief The duration of the input audio that this signature is derived from
@@ -47,4 +48,4 @@
@end
-NS_ASSUME_NONNULL_END
+NS_HEADER_AUDIT_END(nullability, sendability)
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHSignatureGenerator.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHSignatureGenerator.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHSignatureGenerator.h 2022-02-23 07:11:23.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHSignatureGenerator.h 2022-06-03 18:08:04.000000000 -0400
@@ -6,15 +6,22 @@
//
#import <Foundation/Foundation.h>
-#import <AVFAudio/AVFAudio.h>
+#import <AVFoundation/AVFoundation.h>
#import <ShazamKit/SHSignature.h>
-NS_ASSUME_NONNULL_BEGIN
+NS_HEADER_AUDIT_BEGIN(nullability, sendability)
/// @brief @c SHSignatureGenerator provides a way to convert audio data into instances of @c SHSignature
SH_EXPORT API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0))
@interface SHSignatureGenerator : NSObject
+/// Create a `SHSignature` from an @c AVAsset.
+/// @param asset An AVAsset that contains audio you would like to convert to a Signature
+/// @discussion The asset can be any type of media that has a audio tracks. If the asset has multiple tracks, they
+/// will be mixed into one @c SHSignature
+/// @param completionHandler A block called with the created @c SHSignature or nil and a populated error parameter if a signature could not be created.
++ (void)generateSignatureFromAsset:(AVAsset *)asset completionHandler:(void (^)(SHSignature * __nullable signature, NSError * __nullable error))completionHandler API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0), watchos(9.0)) NS_SWIFT_ASYNC_NAME(signature(from:));
+
/// @brief Add audio to the generator
/// @discussion Audio passed to the generator should be contiguous, passing non contiguous data will affect the quality of the @c SHSignature
/// produced. Passing the @c AVAudioTime is not required but recommended, it allows the generator to detect when the audio is not contiguous.
@@ -31,4 +38,4 @@
@end
-NS_ASSUME_NONNULL_END
+NS_HEADER_AUDIT_END(nullability, sendability)
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/ShazamKit.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/ShazamKit.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/ShazamKit.h 2022-02-15 07:43:21.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/ShazamKit.h 2022-05-25 21:45:16.000000000 -0400
@@ -19,6 +19,7 @@
#import <ShazamKit/SHMatchedMediaItem.h>
#import <ShazamKit/SHMediaItem.h>
#import <ShazamKit/SHMediaLibrary.h>
+#import <ShazamKit/SHRange.h>
#import <ShazamKit/SHSession.h>
#import <ShazamKit/SHSignature.h>
#import <ShazamKit/SHSignatureGenerator.h>
- README
- xcode13.0 Binding Status
- xcode13.1 Binding Status
- xcode13.2 Binding Status
- xcode13.3 Binding Status
- xcode13.4 Binding Status
- xcode14.0 Binding Status
- xcode14.1 Binding Status
- xcode14.2 Binding Status
- xcode14.3 Binding Status
- xcode15.0 Binding Status
- xcode15.1 Binding Status
- xcode15.3 Binding Status
- xcode15.4 Binding Status
- xcode16.0 Binding Status
- xcode16.1 Binding Status
- xcode16.2 Binding Status