Instance Property

userGrouping

Grouping information for the media item.

Declaration

var userGrouping: String? { get }

Discussion

Corresponds to the “Grouping” field in the Info tab in the Get Info dialog in iTunes.

See Also

Media Item Properties

var albumArtist: String?

The primary performing artist for an album as a whole.

var albumArtistPersistentID: MPMediaEntityPersistentID

The persistent identifier for the primary performing artist for an album as a whole.

var albumPersistentID: MPMediaEntityPersistentID

The persistent identifier for an album.

var albumTitle: String?

The title of an album, such as “Live On Mars”, as opposed to the title of an individual song on the album, such as “Crater Dance (radio edit)”.

var albumTrackCount: Int

The number of tracks in the album that contains the media item.

var albumTrackNumber: Int

The track number of the media item, for a media item that is part of an album.

var artist: String?

The performing artist(s) for a media item—which may vary from the primary artist for the album that a media item belongs to.

var artistPersistentID: MPMediaEntityPersistentID

The persistent identifier for an artist.

var artwork: MPMediaItemArtwork?

The artwork image for the media item.

var assetURL: URL?

The URL pointing to the media item.

var beatsPerMinute: Int

The number of musical beats per minute for the media item.

var bookmarkTime: TimeInterval

The user’s place in the media item the most recent time it was played.

var isCloudItem: Bool

A Boolean value indicating whether the media item is an iCloud Music Library item.

var comments: String?

Textual information about the media item.

var isCompilation: Bool

A Boolean value indicating whether the media item is part of a compilation.

var composer: String?

The musical composer for the media item.

var composerPersistentID: MPMediaEntityPersistentID

The persistent identifier for a composer.

var dateAdded: Date

The date the item was added to the library.

var discCount: Int

The number of discs in the album that contains the media item.

var discNumber: Int

The disc number of the media item, for a media item that is part of a multi-disc album.

var isExplicitItem: Bool

A Boolean value that indicates whether the item has explicit (adult) lyrics or language.

var genre: String?

The musical or film genre of the media item.

var genrePersistentID: MPMediaEntityPersistentID

The persistent identifier for a genre.

var lastPlayedDate: Date?

The date a media item was last played.

var lyrics: String?

The lyrics for the media item.

var mediaType: MPMediaType

The media type of the media item.

var persistentID: MPMediaEntityPersistentID

The persistent identifier for the media item.

var playCount: Int

The number of times the user has played the media item.

var playbackDuration: TimeInterval

The playback duration of the media item.

var playbackStoreID: String

The non-library identifier for a media item.

var podcastPersistentID: MPMediaEntityPersistentID

The persistent identifier for an audio podcast.

var podcastTitle: String?

The title of a podcast, such as “This Martian Drudgery”, as opposed to the title of an individual episode of a podcast such as “Episode 12: Another Cold Day At The Pole”.

var hasProtectedAsset: Bool

A Boolean indicating whether the media item has a protected asset.

var rating: Int

The user-specified rating of the object in the range [0...5], where a value of 5 indicates the most favorable rating.

var releaseDate: Date?

The date on which the media item was first publicly released.

var skipCount: Int

The number of times the user has skipped playing the item.

var title: String?

The title (or name) of the media item.