One Logo Pool Ball
ShazamKit · IOS API REFERENCE

SHMediaItem

class · iOS 15.0+ · SDK 27.1

class SHMediaItem

Members (21)

static · iOS 15.0+

fetch

TypeScript
static fetch(shazamID: string, completionHandler: ((arg0: (SHMediaItem) | null, arg1: (NativeError) | null) => void)): void
Swift declaration
class func fetch(shazamID: String) async throws -> SHMediaItem
subscript · iOS 15.0+

subscript

TypeScript
subscript(key: SHMediaItemProperty): unknown
Swift declaration
subscript(key: SHMediaItemProperty) -> Any { get }
get · iOS 15.0+

appleMusicID

TypeScript
get appleMusicID(): (string) | null
Swift declaration
var appleMusicID: String? { get }
get · iOS 15.0+

appleMusicURL

TypeScript
get appleMusicURL(): (string) | null
Swift declaration
var appleMusicURL: URL? { get }
get · iOS 15.0+

artist

TypeScript
get artist(): (string) | null
Swift declaration
var artist: String? { get }
get · iOS 15.0+

artworkURL

TypeScript
get artworkURL(): (string) | null
Swift declaration
var artworkURL: URL? { get }
get · iOS 17.0+

creationDate

TypeScript
get creationDate(): (globalThis.Date) | null
Swift declaration
var creationDate: Date? { get }
get · iOS 15.0+

explicitContent

TypeScript
get explicitContent(): boolean
Swift declaration
var explicitContent: Bool { get }
get · iOS 15.0+

genres

TypeScript
get genres(): Array<string>
Swift declaration
var genres: [String] { get }
get · iOS 15.0+

isrc

TypeScript
get isrc(): (string) | null
Swift declaration
var isrc: String? { get }
get · iOS 15.0+

shazamID

TypeScript
get shazamID(): (string) | null
Swift declaration
var shazamID: String? { get }
get · iOS 15.0+

subtitle

TypeScript
get subtitle(): (string) | null
Swift declaration
var subtitle: String? { get }
get · iOS 15.0+

title

TypeScript
get title(): (string) | null
Swift declaration
var title: String? { get }
get · iOS 15.0+

videoURL

TypeScript
get videoURL(): (string) | null
Swift declaration
var videoURL: URL? { get }
get · iOS 15.0+

webURL

TypeScript
get webURL(): (string) | null
Swift declaration
var webURL: URL? { get }
init · iOS 15.0+

init

TypeScript
static init(properties: NativeMap<SHMediaItemProperty, unknown>): SHMediaItem
Swift declaration
convenience init(properties: [SHMediaItemProperty : Any])
get · iOS 16.0+

timeRanges

TypeScript
get timeRanges(): Array<SDKHandle>
Swift declaration
var timeRanges: [Range<TimeInterval>] { get }
get · iOS 16.0+

frequencySkewRanges

TypeScript
get frequencySkewRanges(): Array<SDKHandle>
Swift declaration
var frequencySkewRanges: [Range<Float>] { get }
get · iOS 17.0+

id

TypeScript
get id(): string
Swift declaration
var id: UUID { get }

A unique identifier for this media item.

get · iOS 15.0+ · Deprecated in iOS 27.0

songs

TypeScript
get songs(): Array<_MusicKit_Song>
Swift declaration
var songs: [Song] { get }

An array of MusicKit song objects that represent the media item. For more information about the MusicKit song object, see <doc://com.apple.documentation/documentation/musickit/song>.

method · iOS 27.0+

songs

TypeScript
songs2497(): Promise<Array<_MusicKit_Song>>
Swift declaration
func songs() async throws -> [Song]

An array of MusicKit song objects that represent the media item. For more information about the MusicKit song object, see <doc://com.apple.documentation/documentation/musickit/song>.

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

SHMediaItem.init()

inherited init: cannot prove legal (class declares 1 custom initializer)

All ShazamKit types →