One Logo Pool Ball
_MusicKit_SwiftUI · IOS API REFERENCE

MusicSubscriptionOffer.Action

struct · iOS 15.0+ · SDK 27.1

struct Action

A representation of the entry point for the sheet with subscription offers for Apple Music.

Members (5)

get · iOS 15.0+

description

TypeScript
getDescription($self: MusicSubscriptionOffer_Action): 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.

init · iOS 15.0+

init

TypeScript
initRawValue(rawValue: string): MusicSubscriptionOffer_Action
Swift declaration
init(rawValue: String)

Creates an action with the specified raw value.

get · iOS 15.0+

rawValue

TypeScript
getRawValue($self: MusicSubscriptionOffer_Action): string
Swift declaration
let rawValue: String

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"

get · iOS 15.0+

subscribe

TypeScript
get subscribe(): MusicSubscriptionOffer_Action
Swift declaration
static let subscribe: MusicSubscriptionOffer.Action

An action for inviting the user to subscribe to Apple Music.

init · iOS 15.0+

init

TypeScript
init(rawValue: string): MusicSubscriptionOffer_Action
Swift declaration
init(_ rawValue: String)

Creates an action with the specified raw value.

Skipped declarations

No declarations were skipped in this snapshot.

All _MusicKit_SwiftUI types →