Skip to content

ShazamKit macOS xcode26.4 b2

Rolf Bjarne Kvinge edited this page Feb 27, 2026 · 1 revision

#ShazamKit.framework

diff -ruN /Applications/Xcode_26.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHSession.h /Applications/Xcode_26.4.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHSession.h
--- /Applications/Xcode_26.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHSession.h	2025-11-09 05:09:11
+++ /Applications/Xcode_26.4.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHSession.h	2026-02-16 10:24:15
@@ -55,7 +55,9 @@
 ///
 /// Searching the catalog is asynchronous. The session calls your delegate methods with the result.
 ///
-/// Matching songs in Shazam music requires enabling your app to access the catalog. For more information on enabling your app, see [Enable ShazamKit for an App ID](https://developer.apple.com/help/account/configure-app-services/shazamkit).
+/// Matching audio against the Shazam catalog requires enabling your app to access the catalog. If you are
+/// using a custom catalog, you don't need to enable ShazamKit. For more information on enabling your app,
+/// see [Enable ShazamKit for an App ID](https://developer.apple.com/help/account/configure-app-services/shazamkit).
 ///
 /// The code below shows searching for a match in the Shazam catalog using an existing audio buffer:
 ///
@@ -119,8 +121,32 @@
 
 /// Searches for the query signature in the reference signatures that the session catalog contains.
 ///
-///- Parameters:
-///  - signature: The signature for searching the catalog of reference signatures.
+/// - Parameters:
+///   - signature: The signature for searching the catalog of reference signatures.
+///
+/// The signature duration should be between ``SHCatalog/minimumQuerySignatureDuration`` and
+/// ``SHCatalog/maximumQuerySignatureDuration``.  For audio longer than the maximum duration,
+/// use ``SHSignature/slices(from:duration:stride:)`` to create multiple slices from the
+/// signature.
+///
+/// The code below creates slices from a signature and uses the first three slices to find a match:
+///
+///  ```swift
+/// let signature = try await SHSignatureGenerator.signature(from: audioAsset)
+/// let slices = try signature.slices(from: 2.0, duration: 10.0, stride: 5.0)
+///
+/// // Use the first 3 slices to find a match.
+/// for try await slice in slices.prefix(3) {
+///     session.match(slice)
+/// }
+/// ```
+///
+/// You can use AsyncSequence operators like <doc://com.apple.documentation/documentation/swift/asyncsequence/prefix(_:)>
+/// or <doc://com.apple.documentation/documentation/swift/asyncsequence/first(where:)>
+/// to choose which slices are processed.
+///
+/// For continuous matching as audio becomes available, use ``matchStreamingBuffer(_:at:)``,
+/// which automatically generates and matches signatures from audio buffers.
 - (void)matchSignature:(SHSignature *)signature;
 
 @end
diff -ruN /Applications/Xcode_26.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHSignature.h /Applications/Xcode_26.4.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHSignature.h
--- /Applications/Xcode_26.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHSignature.h	2025-11-09 05:55:25
+++ /Applications/Xcode_26.4.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/ShazamKit.framework/Headers/SHSignature.h	2026-02-16 07:18:56
@@ -12,9 +12,14 @@
 
 /// An object that contains the opaque data and other information for a signature.
 ///
-/// Save your signature to a file and share it with others by writing the data to a file. You can use the saved signatures of reference recordings to populate a custom catalog.
+/// You can save signatures to files and share them with others. Use saved signatures
+/// to populate a custom catalog.
 ///
-/// Check whether your captured query signature is long enough to search for a match by comparing ``duration`` to the ``SHCatalog/minimumQuerySignatureDuration`` and ``SHCatalog/maximumQuerySignatureDuration`` of a catalog.
+/// Check whether your captured query signature is long enough to search for a match by comparing
+/// ``duration`` to the ``SHCatalog/minimumQuerySignatureDuration`` and ``SHCatalog/maximumQuerySignatureDuration`` of a catalog.
+///
+/// For signatures longer than ``SHCatalog/maximumQuerySignatureDuration``, use
+/// ``slices(from:duration:stride:)`` to create multiple segments that meet the duration requirement.
 SH_EXPORT NS_SWIFT_SENDABLE API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0))
 @interface SHSignature : NSObject <NSSecureCoding, NSCopying>
 

Clone this wiki locally