SHManagedSession
An object that records and matches a recording with captured sound in the Shazam catalog or your custom catalog.
Declaration
final class SHManagedSessionOverview
This session is an alternative for SHSession if you prefer ShazamKit to manage recording.
There are two main differences between this managed session and the SHSession:
SHManagedSession performs all recording of audio and signature generation.
SHManagedSession won’t accept audio or Signatures that it didn’t generate.
Matching songs in Shazam requires enabling your app to access the catalog. For more information on enabling your app, see Enable ShazamKit for an App ID.
The code below shows searching for a match in the Shazam catalog using SHManagedSession:
// Set up the session.
let session = SHManagedSession()
// Check for a match.
let result = await session.result()
// Use the result.
switch result {
case .match(let match):
// Match found.
case .noMatch(let signature):
// No match found.
case .error(let error, let signature):
// An error occurred.
}