A representation of the current state of the user’s subscription
to Apple Music.
Members (6)
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+
canBecomeSubscriber
TypeScript
get canBecomeSubscriber(): boolean
Swift declaration
let canBecomeSubscriber: Bool
A capability that allows your app to present subscription offers
for Apple Music.
get · iOS 15.0+
subscriptionUpdates
TypeScript
static get subscriptionUpdates(): MusicSubscription_Updates
Swift declaration
static var subscriptionUpdates: MusicSubscription.Updates { get }
An asynchronous sequence to use for observing updates to
the current state of the user’s subscription to Apple Music.
get · iOS 15.0+
canPlayCatalogContent
TypeScript
get canPlayCatalogContent(): boolean
Swift declaration
let canPlayCatalogContent: Bool
A capability that allows your app to play subscription content
using a music player.
get · iOS 15.0+
hasCloudLibraryEnabled
TypeScript
get hasCloudLibraryEnabled(): boolean
Swift declaration
let hasCloudLibraryEnabled: Bool
A capability that allows your app to perform modifications to the
user’s iCloud Music Library.
get · iOS 15.0+
current
TypeScript
static get current(): Promise<MusicSubscription>
Swift declaration
static var current: MusicSubscription { get async throws }
The current state of the user’s subscription to Apple Music.