One Logo Pool Ball
MusicKit · IOS API REFERENCE

Station

struct · iOS 15.0+ · SDK 27.1

struct Station

A music item that represents a station.

Members (13)

get · iOS 15.0+

description

TypeScript
get description(): string
Swift declaration
var 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 · iOS 15.0+

contentRating

TypeScript
get contentRating(): (ContentRating) | null
Swift declaration
var contentRating: ContentRating? { get }

The rating of the content that potentially plays while playing the station.

get · iOS 15.0+

episodeNumber

TypeScript
get episodeNumber(): (number) | null
Swift declaration
var episodeNumber: Int? { get }

The episode number of the station. This value appears when the station represents an episode of a show or other content.

get · iOS 15.0+

editorialNotes

TypeScript
get editorialNotes(): (EditorialNotes) | null
Swift declaration
var editorialNotes: EditorialNotes? { get }

The notes about the station that appear in the Music app.

get · iOS 15.0+

playParameters

TypeScript
get playParameters(): (PlayParameters) | null
Swift declaration
var playParameters: PlayParameters? { get }

The parameters to use to play the station.

get · iOS 15.0+

debugDescription

TypeScript
get debugDescription(): string
Swift declaration
var 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 · iOS 15.0+

stationProviderName

TypeScript
get stationProviderName(): (string) | null
Swift declaration
var stationProviderName: String? { get }

The name of the entity that provides the station.

get · iOS 15.0+

id

TypeScript
get id(): MusicItemID
Swift declaration
let id: MusicItemID

The unique identifier for the station.

get · iOS 15.0+

url

TypeScript
get url(): (string) | null
Swift declaration
var url: URL? { get }

The URL for the station.

get · iOS 15.0+

name

TypeScript
get name(): string
Swift declaration
var name: String { get }

The name of the station.

get · iOS 15.0+

isLive

TypeScript
get isLive(): boolean
Swift declaration
var isLive: Bool { get }

A Boolean value that indicates whether the station is live.

get · iOS 15.0+

artwork

TypeScript
get artwork(): (Artwork) | null
Swift declaration
var artwork: Artwork? { get }

The station artwork.

get · iOS 15.0+

duration

TypeScript
get duration(): (number) | null
Swift declaration
var duration: TimeInterval? { get }

The duration of the stream. Live and programmed stations don’t have a duration.

Skipped declarations

No declarations were skipped in this snapshot.

All MusicKit types →