One Logo Pool Ball
MusicKit · IOS API REFERENCE

MusicSubscription.Error

enum · iOS 15.0+ · SDK 27.1

enum Error

An error that MusicKit can throw upon requesting the current music subscription of the user.

Members (7)

get · iOS 15.0+

helpAnchor

TypeScript
getHelpAnchor($self: MusicSubscription_Error): (string) | null
Swift declaration
var helpAnchor: String? { get }

A localized message providing "help" text if the user requests help.

get · iOS 15.0+

description

TypeScript
getDescription($self: MusicSubscription_Error): 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+

failureReason

TypeScript
getFailureReason($self: MusicSubscription_Error): (string) | null
Swift declaration
var failureReason: String? { get }

A localized message describing the reason for the failure.

get · iOS 15.0+

errorDescription

TypeScript
getErrorDescription($self: MusicSubscription_Error): (string) | null
Swift declaration
var errorDescription: String? { get }

A localized message describing what error occurred.

get · iOS 15.0+

recoverySuggestion

TypeScript
getRecoverySuggestion($self: MusicSubscription_Error): (string) | null
Swift declaration
var recoverySuggestion: String? { get }

A localized message describing how one might recover from the failure.

init · iOS 15.0+

init

TypeScript
init(rawValue: string): (MusicSubscription_Error) | null
Swift declaration
init?(rawValue: String)

Creates a new instance with the specified raw value. If there is no value of the type that corresponds with the specified raw value, this initializer returns `nil`. For example: enum PaperSize: String { case A4, A5, Letter, Legal } print(PaperSize(rawValue: "Legal")) // Prints "Optional(PaperSize.Legal)" print(PaperSize(rawValue: "Tabloid")) // Prints "nil" - Parameter rawValue: The raw value to use for the new instance.

get · iOS 15.0+

rawValue

TypeScript
getRawValue($self: MusicSubscription_Error): string
Swift declaration
var rawValue: String { get }

The corresponding value of the raw type. A new instance initialized with `rawValue` will be equivalent to this instance. For example: enum PaperSize: String { case A4, A5, Letter, Legal } let selectedSize = PaperSize.Letter print(selectedSize.rawValue) // Prints "Letter" print(selectedSize == PaperSize(rawValue: selectedSize.rawValue)!) // Prints "true"

Skipped declarations

No declarations were skipped in this snapshot.

All MusicKit types →