albumTitle
TypeScriptget albumTitle(): (string) | nullSwift declarationvar albumTitle: String? { get }The title of the album the track appears on.
enum · iOS 15.0+ · SDK 27.1
enum TrackA music item that represents a track.
get albumTitle(): (string) | nullSwift declarationvar albumTitle: String? { get }The title of the album the track appears on.
get artistName(): stringSwift declarationvar artistName: String { get }The artist’s name.
get discNumber(): (number) | nullSwift declarationvar discNumber: Int? { get }The disc number of the track.
get genreNames(): Array<string>Swift declarationvar genreNames: [String] { get }The names of the track’s associated genres.
get description(): stringSwift declarationvar description: String { get }A textual representation of this instance. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(describing:)` initializer. This initializer works with any type, and uses the custom `description` property for types that conform to `CustomStringConvertible`: struct Point: CustomStringConvertible { let x: Int, y: Int var description: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(describing: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `description` property.
get releaseDate(): (globalThis.Date) | nullSwift declarationvar releaseDate: Date? { get }The release date (or expected for pre-release) of the track.
get trackNumber(): (number) | nullSwift declarationvar trackNumber: Int? { get }The track’s number in the album’s track list.
get contentRating(): (ContentRating) | nullSwift declarationvar contentRating: ContentRating? { get }The rating of the content. A nil value means no rating is available for this track.
get previewAssets(): (Array<PreviewAsset>) | nullSwift declarationvar previewAssets: [PreviewAsset]? { get }The preview assets for the track.
get editorialNotes(): (EditorialNotes) | nullSwift declarationvar editorialNotes: EditorialNotes? { get }The editorial notes for the track.
get lastPlayedDate(): (globalThis.Date) | nullSwift declarationvar lastPlayedDate: Date? { get }The date when the user last played the track on this device.
get playParameters(): (PlayParameters) | nullSwift declarationvar playParameters: PlayParameters? { get }The parameters to use to play the track.
get debugDescription(): stringSwift declarationvar debugDescription: String { get }A textual representation of this instance, suitable for debugging. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(reflecting:)` initializer. This initializer works with any type, and uses the custom `debugDescription` property for types that conform to `CustomDebugStringConvertible`: struct Point: CustomDebugStringConvertible { let x: Int, y: Int var debugDescription: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(reflecting: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `debugDescription` property.
get libraryAddedDate(): (globalThis.Date) | nullSwift declarationvar libraryAddedDate: Date? { get }The date when the user added the track to the library.
get id(): MusicItemIDSwift declarationvar id: MusicItemID { get }The unique identifier for the track.
get url(): (string) | nullSwift declarationvar url: URL? { get }The URL for the track.
get isrc(): (string) | nullSwift declarationvar isrc: String? { get }The International Standard Recording Code (ISRC) for the track.
get title(): stringSwift declarationvar title: String { get }The title of the track.
get albums(): (MusicItemCollection<Album>) | nullSwift declarationvar albums: MusicItemCollection<Album>? { get }The track’s associated albums.
get genres(): (MusicItemCollection<Genre>) | nullSwift declarationvar genres: MusicItemCollection<Genre>? { get }The track’s associated genres.
get artists(): (MusicItemCollection<Artist>) | nullSwift declarationvar artists: MusicItemCollection<Artist>? { get }The track’s associated artists.
get artwork(): (Artwork) | nullSwift declarationvar artwork: Artwork? { get }The artwork for the track.
get endTime(): (number) | nullSwift declarationvar endTime: TimeInterval? { get }The custom end time of the track.
get duration(): (number) | nullSwift declarationvar duration: TimeInterval? { get }The duration of the track.
get workName(): (string) | nullSwift declarationvar workName: String? { get }For classical music only, the name of the associated work.
get artistURL(): (string) | nullSwift declarationvar artistURL: URL? { get }The artist’s URL.
get playCount(): (number) | nullSwift declarationvar playCount: Int? { get }The number of times the user played the track.
get startTime(): (number) | nullSwift declarationvar startTime: TimeInterval? { get }The custom start time of the track.
No declarations were skipped in this snapshot.