Documentation Archive Developer
Search

MediaPlayer Changes for Swift

MediaPlayer

Removed MPMediaPlaylistAttribute.init(_: UInt)
Removed MPMediaType.init(_: UInt)
Removed MPMovieLoadState.init(_: UInt)
Removed MPMovieMediaTypeMask.init(_: UInt)
Declaration
From
class MPChangePlaybackRateCommand : MPRemoteCommand {
    var supportedPlaybackRates: [AnyObject]!
}
To
class MPChangePlaybackRateCommand : MPRemoteCommand {
    var supportedPlaybackRates: [NSNumber]
}

Declaration
From
var supportedPlaybackRates: [AnyObject]!
To
var supportedPlaybackRates: [NSNumber]

Modified MPContentItem
Declaration
From
class MPContentItem : NSObject {
    var identifier: String! { get }
    var title: String!
    var subtitle: String!
    var artwork: MPMediaItemArtwork!
    var container: Bool
    var playable: Bool
    var playbackProgress: Float
    init!(identifier identifier: String!)
}
To
class MPContentItem : NSObject {
    var identifier: String { get }
    var title: String?
    var subtitle: String?
    var artwork: MPMediaItemArtwork?
    var container: Bool
    var playable: Bool
    var playbackProgress: Float
    init(identifier identifier: String)
}

Declaration
From
var artwork: MPMediaItemArtwork!
To
var artwork: MPMediaItemArtwork?

Declaration
From
var identifier: String! { get }
To
var identifier: String { get }

Declaration
From
init!(identifier identifier: String!)
To
init(identifier identifier: String)

Declaration
From
var subtitle: String!
To
var subtitle: String?

Declaration
From
var title: String!
To
var title: String?

Declaration
From
class MPFeedbackCommand : MPRemoteCommand {
    var active: Bool
    var localizedTitle: String!
    var localizedShortTitle: String!
}
To
class MPFeedbackCommand : MPRemoteCommand {
    var active: Bool
    var localizedTitle: String
    var localizedShortTitle: String
}

Declaration
From
var localizedShortTitle: String!
To
var localizedShortTitle: String

Declaration
From
var localizedTitle: String!
To
var localizedTitle: String

Modified MPMediaEntity
Declaration
From
class MPMediaEntity : NSObject, NSSecureCoding, NSCoding {
    class func canFilterByProperty(_ property: String!) -> Bool
    func enumerateValuesForProperties(_ properties: Set<NSObject>!, usingBlock block: ((String!, AnyObject!, UnsafeMutablePointer<ObjCBool>) -> Void)!)
    subscript (key: AnyObject!) -> AnyObject! { get }
    func objectForKeyedSubscript(_ key: AnyObject!) -> AnyObject!
    func valueForProperty(_ property: String!) -> AnyObject!
    var persistentID: MPMediaEntityPersistentID { get }
}
To
class MPMediaEntity : NSObject, NSSecureCoding, NSCoding {
    class func canFilterByProperty(_ property: String) -> Bool
    func enumerateValuesForProperties(_ properties: Set<String>, usingBlock block: (String, AnyObject, UnsafeMutablePointer<ObjCBool>) -> Void)
    subscript (_ key: AnyObject) -> AnyObject? { get }
    func objectForKeyedSubscript(_ key: AnyObject) -> AnyObject?
    func valueForProperty(_ property: String) -> AnyObject?
    var persistentID: MPMediaEntityPersistentID { get }
}

Declaration
From
class func canFilterByProperty(_ property: String!) -> Bool
To
class func canFilterByProperty(_ property: String) -> Bool

Declaration
From
func enumerateValuesForProperties(_ properties: Set<NSObject>!, usingBlock block: ((String!, AnyObject!, UnsafeMutablePointer<ObjCBool>) -> Void)!)
To
func enumerateValuesForProperties(_ properties: Set<String>, usingBlock block: (String, AnyObject, UnsafeMutablePointer<ObjCBool>) -> Void)

Declaration
From
subscript (key: AnyObject!) -> AnyObject! { get }
To
subscript (_ key: AnyObject) -> AnyObject? { get }

Declaration
From
func valueForProperty(_ property: String!) -> AnyObject!
To
func valueForProperty(_ property: String) -> AnyObject?

Raw Value Type
From--
ToInt

Modified MPMediaItem
Declaration
From
class MPMediaItem : MPMediaEntity {
    var persistentID: MPMediaEntityPersistentID { get }
    var mediaType: MPMediaType { get }
    var title: String! { get }
    var albumTitle: String! { get }
    var albumPersistentID: MPMediaEntityPersistentID { get }
    var artist: String! { get }
    var artistPersistentID: MPMediaEntityPersistentID { get }
    var albumArtist: String! { get }
    var albumArtistPersistentID: MPMediaEntityPersistentID { get }
    var genre: String! { get }
    var genrePersistentID: MPMediaEntityPersistentID { get }
    var composer: String! { get }
    var composerPersistentID: MPMediaEntityPersistentID { get }
    var playbackDuration: NSTimeInterval { get }
    var albumTrackNumber: Int { get }
    var albumTrackCount: Int { get }
    var discNumber: Int { get }
    var discCount: Int { get }
    var artwork: MPMediaItemArtwork! { get }
    var lyrics: String! { get }
    var compilation: Bool { get }
    var releaseDate: NSDate! { get }
    var beatsPerMinute: Int { get }
    var comments: String! { get }
    var assetURL: NSURL! { get }
    var cloudItem: Bool { get }
    var podcastTitle: String! { get }
    var podcastPersistentID: MPMediaEntityPersistentID { get }
    var playCount: Int { get }
    var skipCount: Int { get }
    var rating: Int { get }
    var lastPlayedDate: NSDate! { get }
    var userGrouping: String! { get }
    var bookmarkTime: NSTimeInterval { get }
}
extension MPMediaItem {
    class func persistentIDPropertyForGroupingType(_ groupingType: MPMediaGrouping) -> String!
    class func titlePropertyForGroupingType(_ groupingType: MPMediaGrouping) -> String!
}
To
class MPMediaItem : MPMediaEntity {
    var persistentID: MPMediaEntityPersistentID { get }
    var mediaType: MPMediaType { get }
    var title: String? { get }
    var albumTitle: String? { get }
    var albumPersistentID: MPMediaEntityPersistentID { get }
    var artist: String? { get }
    var artistPersistentID: MPMediaEntityPersistentID { get }
    var albumArtist: String? { get }
    var albumArtistPersistentID: MPMediaEntityPersistentID { get }
    var genre: String? { get }
    var genrePersistentID: MPMediaEntityPersistentID { get }
    var composer: String? { get }
    var composerPersistentID: MPMediaEntityPersistentID { get }
    var playbackDuration: NSTimeInterval { get }
    var albumTrackNumber: Int { get }
    var albumTrackCount: Int { get }
    var discNumber: Int { get }
    var discCount: Int { get }
    var artwork: MPMediaItemArtwork? { get }
    var lyrics: String? { get }
    var compilation: Bool { get }
    var releaseDate: NSDate? { get }
    var beatsPerMinute: Int { get }
    var comments: String? { get }
    var assetURL: NSURL? { get }
    var cloudItem: Bool { get }
    var podcastTitle: String? { get }
    var podcastPersistentID: MPMediaEntityPersistentID { get }
    var playCount: Int { get }
    var skipCount: Int { get }
    var rating: Int { get }
    var lastPlayedDate: NSDate? { get }
    var userGrouping: String? { get }
    var bookmarkTime: NSTimeInterval { get }
}
extension MPMediaItem {
    class func persistentIDPropertyForGroupingType(_ groupingType: MPMediaGrouping) -> String
    class func titlePropertyForGroupingType(_ groupingType: MPMediaGrouping) -> String
}

Declaration
From
var albumArtist: String! { get }
To
var albumArtist: String? { get }

Declaration
From
var albumTitle: String! { get }
To
var albumTitle: String? { get }

Declaration
From
var artist: String! { get }
To
var artist: String? { get }

Declaration
From
var artwork: MPMediaItemArtwork! { get }
To
var artwork: MPMediaItemArtwork? { get }

Declaration
From
var assetURL: NSURL! { get }
To
var assetURL: NSURL? { get }

Declaration
From
var comments: String! { get }
To
var comments: String? { get }

Declaration
From
var composer: String! { get }
To
var composer: String? { get }

Declaration
From
var genre: String! { get }
To
var genre: String? { get }

Declaration
From
var lastPlayedDate: NSDate! { get }
To
var lastPlayedDate: NSDate? { get }

Declaration
From
var lyrics: String! { get }
To
var lyrics: String? { get }

Declaration
From
class func persistentIDPropertyForGroupingType(_ groupingType: MPMediaGrouping) -> String!
To
class func persistentIDPropertyForGroupingType(_ groupingType: MPMediaGrouping) -> String

Declaration
From
var podcastTitle: String! { get }
To
var podcastTitle: String? { get }

Declaration
From
var releaseDate: NSDate! { get }
To
var releaseDate: NSDate? { get }

Declaration
From
var title: String! { get }
To
var title: String? { get }

Declaration
From
class func titlePropertyForGroupingType(_ groupingType: MPMediaGrouping) -> String!
To
class func titlePropertyForGroupingType(_ groupingType: MPMediaGrouping) -> String

Declaration
From
var userGrouping: String! { get }
To
var userGrouping: String? { get }

Declaration
From
class MPMediaItemArtwork : NSObject {
    init!(image image: UIImage!)
    func imageWithSize(_ size: CGSize) -> UIImage!
    var bounds: CGRect { get }
    var imageCropRect: CGRect { get }
}
To
class MPMediaItemArtwork : NSObject {
    init(image image: UIImage)
    func imageWithSize(_ size: CGSize) -> UIImage?
    var bounds: CGRect { get }
    var imageCropRect: CGRect { get }
}

Declaration
From
func imageWithSize(_ size: CGSize) -> UIImage!
To
func imageWithSize(_ size: CGSize) -> UIImage?

Declaration
From
init!(image image: UIImage!)
To
init(image image: UIImage)

Declaration
From
class MPMediaItemCollection : MPMediaEntity {
    init!(items items: [AnyObject]!) -> MPMediaItemCollection
    class func collectionWithItems(_ items: [AnyObject]!) -> MPMediaItemCollection!
    init!(items items: [AnyObject]!)
    var items: [AnyObject]! { get }
    var representativeItem: MPMediaItem! { get }
    var count: Int { get }
    var mediaTypes: MPMediaType { get }
}
To
class MPMediaItemCollection : MPMediaEntity {
     init(items items: [MPMediaItem])
    class func collectionWithItems(_ items: [MPMediaItem]) -> MPMediaItemCollection
    init(items items: [MPMediaItem])
    var items: [MPMediaItem] { get }
    var representativeItem: MPMediaItem? { get }
    var count: Int { get }
    var mediaTypes: MPMediaType { get }
}

Declaration
From
init!(items items: [AnyObject]!)
To
init(items items: [MPMediaItem])

Declaration
From
var items: [AnyObject]! { get }
To
var items: [MPMediaItem] { get }

Declaration
From
var representativeItem: MPMediaItem! { get }
To
var representativeItem: MPMediaItem? { get }

Declaration
From
class MPMediaLibrary : NSObject, NSSecureCoding, NSCoding {
    class func defaultMediaLibrary() -> MPMediaLibrary!
    var lastModifiedDate: NSDate! { get }
    func beginGeneratingLibraryChangeNotifications()
    func endGeneratingLibraryChangeNotifications()
}
To
class MPMediaLibrary : NSObject, NSSecureCoding, NSCoding {
    class func defaultMediaLibrary() -> MPMediaLibrary
    var lastModifiedDate: NSDate { get }
    func beginGeneratingLibraryChangeNotifications()
    func endGeneratingLibraryChangeNotifications()
}

Declaration
From
class func defaultMediaLibrary() -> MPMediaLibrary!
To
class func defaultMediaLibrary() -> MPMediaLibrary

Declaration
From
var lastModifiedDate: NSDate! { get }
To
var lastModifiedDate: NSDate { get }

Declaration
From
class MPMediaPickerController : UIViewController {
    init!(mediaTypes mediaTypes: MPMediaType)
    var mediaTypes: MPMediaType { get }
    weak var delegate: MPMediaPickerControllerDelegate!
    var allowsPickingMultipleItems: Bool
    var showsCloudItems: Bool
    var prompt: String!
}
To
class MPMediaPickerController : UIViewController {
    init(mediaTypes mediaTypes: MPMediaType)
    var mediaTypes: MPMediaType { get }
    weak var delegate: MPMediaPickerControllerDelegate?
    var allowsPickingMultipleItems: Bool
    var showsCloudItems: Bool
    var prompt: String?
}

Declaration
From
weak var delegate: MPMediaPickerControllerDelegate!
To
weak var delegate: MPMediaPickerControllerDelegate?

Declaration
From
init!(mediaTypes mediaTypes: MPMediaType)
To
init(mediaTypes mediaTypes: MPMediaType)

Declaration
From
var prompt: String!
To
var prompt: String?

Declaration
From
protocol MPMediaPickerControllerDelegate : NSObjectProtocol {
    optional func mediaPicker(_ mediaPicker: MPMediaPickerController!, didPickMediaItems mediaItemCollection: MPMediaItemCollection!)
    optional func mediaPickerDidCancel(_ mediaPicker: MPMediaPickerController!)
}
To
protocol MPMediaPickerControllerDelegate : NSObjectProtocol {
    optional func mediaPicker(_ mediaPicker: MPMediaPickerController, didPickMediaItems mediaItemCollection: MPMediaItemCollection)
    optional func mediaPickerDidCancel(_ mediaPicker: MPMediaPickerController)
}

DeclarationIntroduction
From
optional func mediaPicker(_ mediaPicker: MPMediaPickerController!, didPickMediaItems mediaItemCollection: MPMediaItemCollection!)
iOS 8.0
To
optional func mediaPicker(_ mediaPicker: MPMediaPickerController, didPickMediaItems mediaItemCollection: MPMediaItemCollection)
iOS 3.0

DeclarationIntroduction
From
optional func mediaPickerDidCancel(_ mediaPicker: MPMediaPickerController!)
iOS 8.0
To
optional func mediaPickerDidCancel(_ mediaPicker: MPMediaPickerController)
iOS 3.0

Declaration
From
class MPMediaPlaylist : MPMediaItemCollection {
    var persistentID: MPMediaEntityPersistentID { get }
    var name: String! { get }
    var playlistAttributes: MPMediaPlaylistAttribute { get }
    var seedItems: [AnyObject]! { get }
}
To
class MPMediaPlaylist : MPMediaItemCollection {
    var persistentID: MPMediaEntityPersistentID { get }
    var name: String? { get }
    var playlistAttributes: MPMediaPlaylistAttribute { get }
    var seedItems: [MPMediaItem]? { get }
}

Declaration
From
var name: String! { get }
To
var name: String? { get }

Declaration
From
var seedItems: [AnyObject]! { get }
To
var seedItems: [MPMediaItem]? { get }

DeclarationProtocols
From
struct MPMediaPlaylistAttribute : RawOptionSetType {
    init(_ rawValue: UInt)
    init(rawValue rawValue: UInt)
    static var None: MPMediaPlaylistAttribute { get }
    static var OnTheGo: MPMediaPlaylistAttribute { get }
    static var Smart: MPMediaPlaylistAttribute { get }
    static var Genius: MPMediaPlaylistAttribute { get }
}
RawOptionSetType
To
struct MPMediaPlaylistAttribute : OptionSetType {
    init(rawValue rawValue: UInt)
    static var None: MPMediaPlaylistAttribute { get }
    static var OnTheGo: MPMediaPlaylistAttribute { get }
    static var Smart: MPMediaPlaylistAttribute { get }
    static var Genius: MPMediaPlaylistAttribute { get }
}
OptionSetType

Raw Value Type
From--
ToInt

Declaration
From
class MPMediaPropertyPredicate : MPMediaPredicate {
    init!(value value: AnyObject!, forProperty property: String!) -> MPMediaPropertyPredicate
    class func predicateWithValue(_ value: AnyObject!, forProperty property: String!) -> MPMediaPropertyPredicate!
    init!(value value: AnyObject!, forProperty property: String!, comparisonType comparisonType: MPMediaPredicateComparison) -> MPMediaPropertyPredicate
    class func predicateWithValue(_ value: AnyObject!, forProperty property: String!, comparisonType comparisonType: MPMediaPredicateComparison) -> MPMediaPropertyPredicate!
    var property: String! { get }
    @NSCopying var value: AnyObject! { get }
    var comparisonType: MPMediaPredicateComparison { get }
}
To
class MPMediaPropertyPredicate : MPMediaPredicate {
     init(value value: AnyObject?, forProperty property: String)
    class func predicateWithValue(_ value: AnyObject?, forProperty property: String) -> MPMediaPropertyPredicate
     init(value value: AnyObject?, forProperty property: String, comparisonType comparisonType: MPMediaPredicateComparison)
    class func predicateWithValue(_ value: AnyObject?, forProperty property: String, comparisonType comparisonType: MPMediaPredicateComparison) -> MPMediaPropertyPredicate
    var property: String { get }
    @NSCopying var value: AnyObject? { get }
    var comparisonType: MPMediaPredicateComparison { get }
}

Declaration
From
init!(value value: AnyObject!, forProperty property: String!) -> MPMediaPropertyPredicate
To
init(value value: AnyObject?, forProperty property: String)

Declaration
From
init!(value value: AnyObject!, forProperty property: String!, comparisonType comparisonType: MPMediaPredicateComparison) -> MPMediaPropertyPredicate
To
init(value value: AnyObject?, forProperty property: String, comparisonType comparisonType: MPMediaPredicateComparison)

Declaration
From
var property: String! { get }
To
var property: String { get }

Declaration
From
@NSCopying var value: AnyObject! { get }
To
@NSCopying var value: AnyObject? { get }

Modified MPMediaQuery
Declaration
From
class MPMediaQuery : NSObject, NSSecureCoding, NSCoding, NSCopying {
    init!(filterPredicates filterPredicates: Set<NSObject>!)
    var filterPredicates: Set<NSObject>!
    func addFilterPredicate(_ predicate: MPMediaPredicate!)
    func removeFilterPredicate(_ predicate: MPMediaPredicate!)
    var items: [AnyObject]! { get }
    var collections: [AnyObject]! { get }
    var groupingType: MPMediaGrouping
    var itemSections: [AnyObject]! { get }
    var collectionSections: [AnyObject]! { get }
    class func albumsQuery() -> MPMediaQuery!
    class func artistsQuery() -> MPMediaQuery!
    class func songsQuery() -> MPMediaQuery!
    class func playlistsQuery() -> MPMediaQuery!
    class func podcastsQuery() -> MPMediaQuery!
    class func audiobooksQuery() -> MPMediaQuery!
    class func compilationsQuery() -> MPMediaQuery!
    class func composersQuery() -> MPMediaQuery!
    class func genresQuery() -> MPMediaQuery!
}
To
class MPMediaQuery : NSObject, NSSecureCoding, NSCoding, NSCopying {
    init(filterPredicates filterPredicates: Set<MPMediaPredicate>?)
    var filterPredicates: Set<MPMediaPredicate>?
    func addFilterPredicate(_ predicate: MPMediaPredicate)
    func removeFilterPredicate(_ predicate: MPMediaPredicate)
    var items: [MPMediaItem]? { get }
    var collections: [MPMediaItemCollection]? { get }
    var groupingType: MPMediaGrouping
    var itemSections: [MPMediaQuerySection]? { get }
    var collectionSections: [MPMediaQuerySection]? { get }
    class func albumsQuery() -> MPMediaQuery
    class func artistsQuery() -> MPMediaQuery
    class func songsQuery() -> MPMediaQuery
    class func playlistsQuery() -> MPMediaQuery
    class func podcastsQuery() -> MPMediaQuery
    class func audiobooksQuery() -> MPMediaQuery
    class func compilationsQuery() -> MPMediaQuery
    class func composersQuery() -> MPMediaQuery
    class func genresQuery() -> MPMediaQuery
}

Declaration
From
func addFilterPredicate(_ predicate: MPMediaPredicate!)
To
func addFilterPredicate(_ predicate: MPMediaPredicate)

Declaration
From
class func albumsQuery() -> MPMediaQuery!
To
class func albumsQuery() -> MPMediaQuery

Declaration
From
class func artistsQuery() -> MPMediaQuery!
To
class func artistsQuery() -> MPMediaQuery

Declaration
From
class func audiobooksQuery() -> MPMediaQuery!
To
class func audiobooksQuery() -> MPMediaQuery

Declaration
From
var collections: [AnyObject]! { get }
To
var collections: [MPMediaItemCollection]? { get }

Declaration
From
var collectionSections: [AnyObject]! { get }
To
var collectionSections: [MPMediaQuerySection]? { get }

Declaration
From
class func compilationsQuery() -> MPMediaQuery!
To
class func compilationsQuery() -> MPMediaQuery

Declaration
From
class func composersQuery() -> MPMediaQuery!
To
class func composersQuery() -> MPMediaQuery

Declaration
From
var filterPredicates: Set<NSObject>!
To
var filterPredicates: Set<MPMediaPredicate>?

Declaration
From
class func genresQuery() -> MPMediaQuery!
To
class func genresQuery() -> MPMediaQuery

Declaration
From
init!(filterPredicates filterPredicates: Set<NSObject>!)
To
init(filterPredicates filterPredicates: Set<MPMediaPredicate>?)

Declaration
From
var items: [AnyObject]! { get }
To
var items: [MPMediaItem]? { get }

Declaration
From
var itemSections: [AnyObject]! { get }
To
var itemSections: [MPMediaQuerySection]? { get }

Declaration
From
class func playlistsQuery() -> MPMediaQuery!
To
class func playlistsQuery() -> MPMediaQuery

Declaration
From
class func podcastsQuery() -> MPMediaQuery!
To
class func podcastsQuery() -> MPMediaQuery

Declaration
From
func removeFilterPredicate(_ predicate: MPMediaPredicate!)
To
func removeFilterPredicate(_ predicate: MPMediaPredicate)

Declaration
From
class func songsQuery() -> MPMediaQuery!
To
class func songsQuery() -> MPMediaQuery

Declaration
From
class MPMediaQuerySection : NSObject, NSSecureCoding, NSCoding, NSCopying {
    var title: String! { get }
    var range: NSRange { get }
}
To
class MPMediaQuerySection : NSObject, NSSecureCoding, NSCoding, NSCopying {
    var title: String { get }
    var range: NSRange { get }
}

Declaration
From
var title: String! { get }
To
var title: String { get }

DeclarationProtocols
From
struct MPMediaType : RawOptionSetType {
    init(_ rawValue: UInt)
    init(rawValue rawValue: UInt)
    static var Music: MPMediaType { get }
    static var Podcast: MPMediaType { get }
    static var AudioBook: MPMediaType { get }
    static var AudioITunesU: MPMediaType { get }
    static var AnyAudio: MPMediaType { get }
    static var Movie: MPMediaType { get }
    static var TVShow: MPMediaType { get }
    static var VideoPodcast: MPMediaType { get }
    static var MusicVideo: MPMediaType { get }
    static var VideoITunesU: MPMediaType { get }
    static var HomeVideo: MPMediaType { get }
    static var AnyVideo: MPMediaType { get }
    static var Any: MPMediaType { get }
}
RawOptionSetType
To
struct MPMediaType : OptionSetType {
    init(rawValue rawValue: UInt)
    static var Music: MPMediaType { get }
    static var Podcast: MPMediaType { get }
    static var AudioBook: MPMediaType { get }
    static var AudioITunesU: MPMediaType { get }
    static var AnyAudio: MPMediaType { get }
    static var Movie: MPMediaType { get }
    static var TVShow: MPMediaType { get }
    static var VideoPodcast: MPMediaType { get }
    static var MusicVideo: MPMediaType { get }
    static var VideoITunesU: MPMediaType { get }
    static var HomeVideo: MPMediaType { get }
    static var AnyVideo: MPMediaType { get }
    static var Any: MPMediaType { get }
}
OptionSetType

DeclarationIntroductionDeprecationRaw Value Type
From
enum MPMovieControlStyle : Int {
    case None
    case Embedded
    case Fullscreen
}
iOS 8.1----
To
enum MPMovieControlStyle : Int {
    case None
    case Embedded
    case Fullscreen
    static var Default: MPMovieControlStyle { get }
}
iOS 3.2iOS 9.0Int

IntroductionDeprecationRaw Value Type
FromiOS 8.1----
ToiOS 3.2iOS 9.0Int

DeclarationProtocolsIntroductionDeprecation
From
struct MPMovieLoadState : RawOptionSetType {
    init(_ rawValue: UInt)
    init(rawValue rawValue: UInt)
    static var Unknown: MPMovieLoadState { get }
    static var Playable: MPMovieLoadState { get }
    static var PlaythroughOK: MPMovieLoadState { get }
    static var Stalled: MPMovieLoadState { get }
}
RawOptionSetTypeiOS 8.1--
To
struct MPMovieLoadState : OptionSetType {
    init(rawValue rawValue: UInt)
    static var Unknown: MPMovieLoadState { get }
    static var Playable: MPMovieLoadState { get }
    static var PlaythroughOK: MPMovieLoadState { get }
    static var Stalled: MPMovieLoadState { get }
}
OptionSetTypeiOS 3.2iOS 9.0

Modified MPMovieLoadState.init(rawValue: UInt)
Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0

DeclarationProtocolsIntroductionDeprecation
From
struct MPMovieMediaTypeMask : RawOptionSetType {
    init(_ rawValue: UInt)
    init(rawValue rawValue: UInt)
    static var None: MPMovieMediaTypeMask { get }
    static var Video: MPMovieMediaTypeMask { get }
    static var Audio: MPMovieMediaTypeMask { get }
}
RawOptionSetTypeiOS 8.1--
To
struct MPMovieMediaTypeMask : OptionSetType {
    init(rawValue rawValue: UInt)
    static var None: MPMovieMediaTypeMask { get }
    static var Video: MPMovieMediaTypeMask { get }
    static var Audio: MPMovieMediaTypeMask { get }
}
OptionSetTypeiOS 3.2iOS 9.0

Deprecation
From--
ToiOS 9.0

Modified MPMovieMediaTypeMask.init(rawValue: UInt)
Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0

IntroductionDeprecationRaw Value Type
FromiOS 8.1----
ToiOS 3.2iOS 9.0Int

Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0

IntroductionDeprecation
FromiOS 8.0--
ToiOS 2.0iOS 9.0

IntroductionDeprecation
FromiOS 8.0--
ToiOS 2.0iOS 9.0

Deprecation
From--
ToiOS 9.0

IntroductionDeprecation
FromiOS 8.0--
ToiOS 2.0iOS 9.0

IntroductionDeprecation
FromiOS 8.0--
ToiOS 2.0iOS 9.0

IntroductionDeprecation
FromiOS 8.0--
ToiOS 2.0iOS 9.0

IntroductionDeprecation
FromiOS 8.0--
ToiOS 2.0iOS 9.0

IntroductionDeprecation
FromiOS 8.0--
ToiOS 2.0iOS 9.0

Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0

IntroductionDeprecationRaw Value Type
FromiOS 8.1----
ToiOS 3.2iOS 9.0Int

IntroductionDeprecationRaw Value Type
FromiOS 8.1----
ToiOS 2.0iOS 9.0Int

IntroductionDeprecationRaw Value Type
FromiOS 8.1----
ToiOS 3.2iOS 9.0Int

IntroductionDeprecationRaw Value Type
FromiOS 8.1----
ToiOS 3.2iOS 9.0Int

Raw Value Type
From--
ToInt

Declaration
From
class MPMusicPlayerController : NSObject, MPMediaPlayback {
    class func applicationMusicPlayer() -> MPMusicPlayerController!
    class func systemMusicPlayer() -> MPMusicPlayerController!
    class func iPodMusicPlayer() -> MPMusicPlayerController!
}
extension MPMusicPlayerController {
    var playbackState: MPMusicPlaybackState { get }
    var repeatMode: MPMusicRepeatMode
    var shuffleMode: MPMusicShuffleMode
    var volume: Float
    @NSCopying var nowPlayingItem: MPMediaItem!
    var indexOfNowPlayingItem: Int { get }
    func setQueueWithQuery(_ query: MPMediaQuery!)
    func setQueueWithItemCollection(_ itemCollection: MPMediaItemCollection!)
    func skipToNextItem()
    func skipToBeginning()
    func skipToPreviousItem()
    func beginGeneratingPlaybackNotifications()
    func endGeneratingPlaybackNotifications()
}
To
class MPMusicPlayerController : NSObject, MPMediaPlayback {
    class func applicationMusicPlayer() -> MPMusicPlayerController
    class func systemMusicPlayer() -> MPMusicPlayerController
    class func iPodMusicPlayer() -> MPMusicPlayerController
}
extension MPMusicPlayerController {
    var playbackState: MPMusicPlaybackState { get }
    var repeatMode: MPMusicRepeatMode
    var shuffleMode: MPMusicShuffleMode
    var volume: Float
    @NSCopying var nowPlayingItem: MPMediaItem?
    var indexOfNowPlayingItem: Int { get }
    func setQueueWithQuery(_ query: MPMediaQuery)
    func setQueueWithItemCollection(_ itemCollection: MPMediaItemCollection)
    func skipToNextItem()
    func skipToBeginning()
    func skipToPreviousItem()
    func beginGeneratingPlaybackNotifications()
    func endGeneratingPlaybackNotifications()
}

Declaration
From
class func applicationMusicPlayer() -> MPMusicPlayerController!
To
class func applicationMusicPlayer() -> MPMusicPlayerController

Declaration
From
class func iPodMusicPlayer() -> MPMusicPlayerController!
To
class func iPodMusicPlayer() -> MPMusicPlayerController

Declaration
From
@NSCopying var nowPlayingItem: MPMediaItem!
To
@NSCopying var nowPlayingItem: MPMediaItem?

Declaration
From
func setQueueWithItemCollection(_ itemCollection: MPMediaItemCollection!)
To
func setQueueWithItemCollection(_ itemCollection: MPMediaItemCollection)

Declaration
From
func setQueueWithQuery(_ query: MPMediaQuery!)
To
func setQueueWithQuery(_ query: MPMediaQuery)

Declaration
From
class func systemMusicPlayer() -> MPMusicPlayerController!
To
class func systemMusicPlayer() -> MPMusicPlayerController

Raw Value Type
From--
ToInt

Raw Value Type
From--
ToInt

Declaration
From
class MPNowPlayingInfoCenter : NSObject {
    class func defaultCenter() -> MPNowPlayingInfoCenter!
    var nowPlayingInfo: [NSObject : AnyObject]!
}
To
class MPNowPlayingInfoCenter : NSObject {
    class func defaultCenter() -> MPNowPlayingInfoCenter
    var nowPlayingInfo: [String : AnyObject]?
}

Declaration
From
class func defaultCenter() -> MPNowPlayingInfoCenter!
To
class func defaultCenter() -> MPNowPlayingInfoCenter

Declaration
From
var nowPlayingInfo: [NSObject : AnyObject]!
To
var nowPlayingInfo: [String : AnyObject]?

Declaration
From
protocol MPPlayableContentDataSource : NSObjectProtocol {
    optional func beginLoadingChildItemsAtIndexPath(_ indexPath: NSIndexPath!, completionHandler completionHandler: ((NSError!) -> Void)!)
    optional func childItemsDisplayPlaybackProgressAtIndexPath(_ indexPath: NSIndexPath!) -> Bool
    func numberOfChildItemsAtIndexPath(_ indexPath: NSIndexPath!) -> Int
    func contentItemAtIndexPath(_ indexPath: NSIndexPath!) -> MPContentItem!
}
To
protocol MPPlayableContentDataSource : NSObjectProtocol {
    optional func beginLoadingChildItemsAtIndexPath(_ indexPath: NSIndexPath, completionHandler completionHandler: (NSError?) -> Void)
    optional func childItemsDisplayPlaybackProgressAtIndexPath(_ indexPath: NSIndexPath) -> Bool
    func numberOfChildItemsAtIndexPath(_ indexPath: NSIndexPath) -> Int
    func contentItemAtIndexPath(_ indexPath: NSIndexPath) -> MPContentItem?
}

Declaration
From
optional func beginLoadingChildItemsAtIndexPath(_ indexPath: NSIndexPath!, completionHandler completionHandler: ((NSError!) -> Void)!)
To
optional func beginLoadingChildItemsAtIndexPath(_ indexPath: NSIndexPath, completionHandler completionHandler: (NSError?) -> Void)

Declaration
From
optional func childItemsDisplayPlaybackProgressAtIndexPath(_ indexPath: NSIndexPath!) -> Bool
To
optional func childItemsDisplayPlaybackProgressAtIndexPath(_ indexPath: NSIndexPath) -> Bool

DeclarationIntroduction
From
func contentItemAtIndexPath(_ indexPath: NSIndexPath!) -> MPContentItem!
iOS 8.0
To
func contentItemAtIndexPath(_ indexPath: NSIndexPath) -> MPContentItem?
iOS 7.1

Declaration
From
func numberOfChildItemsAtIndexPath(_ indexPath: NSIndexPath!) -> Int
To
func numberOfChildItemsAtIndexPath(_ indexPath: NSIndexPath) -> Int

Declaration
From
protocol MPPlayableContentDelegate : NSObjectProtocol {
    optional func playableContentManager(_ contentManager: MPPlayableContentManager!, initiatePlaybackOfContentItemAtIndexPath indexPath: NSIndexPath!, completionHandler completionHandler: ((NSError!) -> Void)!)
}
To
protocol MPPlayableContentDelegate : NSObjectProtocol {
    optional func playableContentManager(_ contentManager: MPPlayableContentManager, initiatePlaybackOfContentItemAtIndexPath indexPath: NSIndexPath, completionHandler completionHandler: (NSError?) -> Void)
    optional func playableContentManager(_ contentManager: MPPlayableContentManager, initializePlaybackQueueWithCompletionHandler completionHandler: (NSError?) -> Void)
    optional func playableContentManager(_ contentManager: MPPlayableContentManager, didUpdateContext context: MPPlayableContentManagerContext)
}

DeclarationIntroduction
From
optional func playableContentManager(_ contentManager: MPPlayableContentManager!, initiatePlaybackOfContentItemAtIndexPath indexPath: NSIndexPath!, completionHandler completionHandler: ((NSError!) -> Void)!)
iOS 8.0
To
optional func playableContentManager(_ contentManager: MPPlayableContentManager, initiatePlaybackOfContentItemAtIndexPath indexPath: NSIndexPath, completionHandler completionHandler: (NSError?) -> Void)
iOS 7.1

Declaration
From
class MPPlayableContentManager : NSObject {
    weak var dataSource: MPPlayableContentDataSource!
    weak var delegate: MPPlayableContentDelegate!
    class func sharedContentManager() -> Self!
    func reloadData()
    func beginUpdates()
    func endUpdates()
}
To
class MPPlayableContentManager : NSObject {
    weak var dataSource: MPPlayableContentDataSource?
    weak var delegate: MPPlayableContentDelegate?
    var context: MPPlayableContentManagerContext { get }
    class func sharedContentManager() -> Self
    func reloadData()
    func beginUpdates()
    func endUpdates()
}

Declaration
From
weak var dataSource: MPPlayableContentDataSource!
To
weak var dataSource: MPPlayableContentDataSource?

Declaration
From
weak var delegate: MPPlayableContentDelegate!
To
weak var delegate: MPPlayableContentDelegate?

Declaration
From
class func sharedContentManager() -> Self!
To
class func sharedContentManager() -> Self

Declaration
From
class MPRemoteCommand : NSObject {
    var enabled: Bool
    func addTarget(_ target: AnyObject!, action action: Selector)
    func removeTarget(_ target: AnyObject!, action action: Selector)
    func removeTarget(_ target: AnyObject!)
    func addTargetWithHandler(_ handler: ((MPRemoteCommandEvent!) -> MPRemoteCommandHandlerStatus)!) -> AnyObject!
}
To
class MPRemoteCommand : NSObject {
    var enabled: Bool
    func addTarget(_ target: AnyObject, action action: Selector)
    func removeTarget(_ target: AnyObject, action action: Selector)
    func removeTarget(_ target: AnyObject?)
    func addTargetWithHandler(_ handler: (MPRemoteCommandEvent) -> MPRemoteCommandHandlerStatus) -> AnyObject
}

Declaration
From
func addTarget(_ target: AnyObject!, action action: Selector)
To
func addTarget(_ target: AnyObject, action action: Selector)

Declaration
From
func addTargetWithHandler(_ handler: ((MPRemoteCommandEvent!) -> MPRemoteCommandHandlerStatus)!) -> AnyObject!
To
func addTargetWithHandler(_ handler: (MPRemoteCommandEvent) -> MPRemoteCommandHandlerStatus) -> AnyObject

Declaration
From
func removeTarget(_ target: AnyObject!)
To
func removeTarget(_ target: AnyObject?)

Declaration
From
func removeTarget(_ target: AnyObject!, action action: Selector)
To
func removeTarget(_ target: AnyObject, action action: Selector)

Declaration
From
class MPRemoteCommandCenter : NSObject {
    var pauseCommand: MPRemoteCommand! { get }
    var playCommand: MPRemoteCommand! { get }
    var stopCommand: MPRemoteCommand! { get }
    var togglePlayPauseCommand: MPRemoteCommand! { get }
    var nextTrackCommand: MPRemoteCommand! { get }
    var previousTrackCommand: MPRemoteCommand! { get }
    var skipForwardCommand: MPSkipIntervalCommand! { get }
    var skipBackwardCommand: MPSkipIntervalCommand! { get }
    var seekForwardCommand: MPRemoteCommand! { get }
    var seekBackwardCommand: MPRemoteCommand! { get }
    var ratingCommand: MPRatingCommand! { get }
    var changePlaybackRateCommand: MPChangePlaybackRateCommand! { get }
    var likeCommand: MPFeedbackCommand! { get }
    var dislikeCommand: MPFeedbackCommand! { get }
    var bookmarkCommand: MPFeedbackCommand! { get }
    class func sharedCommandCenter() -> MPRemoteCommandCenter!
}
To
class MPRemoteCommandCenter : NSObject {
    var pauseCommand: MPRemoteCommand { get }
    var playCommand: MPRemoteCommand { get }
    var stopCommand: MPRemoteCommand { get }
    var togglePlayPauseCommand: MPRemoteCommand { get }
    var enableLanguageOptionCommand: MPRemoteCommand { get }
    var disableLanguageOptionCommand: MPRemoteCommand { get }
    var nextTrackCommand: MPRemoteCommand { get }
    var previousTrackCommand: MPRemoteCommand { get }
    var skipForwardCommand: MPSkipIntervalCommand { get }
    var skipBackwardCommand: MPSkipIntervalCommand { get }
    var seekForwardCommand: MPRemoteCommand { get }
    var seekBackwardCommand: MPRemoteCommand { get }
    var ratingCommand: MPRatingCommand { get }
    var changePlaybackRateCommand: MPChangePlaybackRateCommand { get }
    var likeCommand: MPFeedbackCommand { get }
    var dislikeCommand: MPFeedbackCommand { get }
    var bookmarkCommand: MPFeedbackCommand { get }
    class func sharedCommandCenter() -> MPRemoteCommandCenter
}

Declaration
From
var bookmarkCommand: MPFeedbackCommand! { get }
To
var bookmarkCommand: MPFeedbackCommand { get }

Declaration
From
var changePlaybackRateCommand: MPChangePlaybackRateCommand! { get }
To
var changePlaybackRateCommand: MPChangePlaybackRateCommand { get }

Declaration
From
var dislikeCommand: MPFeedbackCommand! { get }
To
var dislikeCommand: MPFeedbackCommand { get }

Declaration
From
var likeCommand: MPFeedbackCommand! { get }
To
var likeCommand: MPFeedbackCommand { get }

Declaration
From
var nextTrackCommand: MPRemoteCommand! { get }
To
var nextTrackCommand: MPRemoteCommand { get }

Declaration
From
var pauseCommand: MPRemoteCommand! { get }
To
var pauseCommand: MPRemoteCommand { get }

Declaration
From
var playCommand: MPRemoteCommand! { get }
To
var playCommand: MPRemoteCommand { get }

Declaration
From
var previousTrackCommand: MPRemoteCommand! { get }
To
var previousTrackCommand: MPRemoteCommand { get }

Declaration
From
var ratingCommand: MPRatingCommand! { get }
To
var ratingCommand: MPRatingCommand { get }

Declaration
From
var seekBackwardCommand: MPRemoteCommand! { get }
To
var seekBackwardCommand: MPRemoteCommand { get }

Declaration
From
var seekForwardCommand: MPRemoteCommand! { get }
To
var seekForwardCommand: MPRemoteCommand { get }

Declaration
From
class func sharedCommandCenter() -> MPRemoteCommandCenter!
To
class func sharedCommandCenter() -> MPRemoteCommandCenter

Declaration
From
var skipBackwardCommand: MPSkipIntervalCommand! { get }
To
var skipBackwardCommand: MPSkipIntervalCommand { get }

Declaration
From
var skipForwardCommand: MPSkipIntervalCommand! { get }
To
var skipForwardCommand: MPSkipIntervalCommand { get }

Declaration
From
var stopCommand: MPRemoteCommand! { get }
To
var stopCommand: MPRemoteCommand { get }

Declaration
From
var togglePlayPauseCommand: MPRemoteCommand! { get }
To
var togglePlayPauseCommand: MPRemoteCommand { get }

Declaration
From
class MPRemoteCommandEvent : NSObject {
    var command: MPRemoteCommand! { get }
    var timestamp: NSTimeInterval { get }
}
To
class MPRemoteCommandEvent : NSObject {
    var command: MPRemoteCommand { get }
    var timestamp: NSTimeInterval { get }
}

Declaration
From
var command: MPRemoteCommand! { get }
To
var command: MPRemoteCommand { get }

Raw Value Type
From--
ToInt

Raw Value Type
From--
ToUInt

Declaration
From
class MPSkipIntervalCommand : MPRemoteCommand {
    var preferredIntervals: [AnyObject]!
}
To
class MPSkipIntervalCommand : MPRemoteCommand {
    var preferredIntervals: [AnyObject]
}

Declaration
From
var preferredIntervals: [AnyObject]!
To
var preferredIntervals: [AnyObject]

Modified MPVolumeView
Declaration
From
class MPVolumeView : UIView, NSCoding {
    var showsVolumeSlider: Bool
    var showsRouteButton: Bool
    var wirelessRoutesAvailable: Bool { get }
    var wirelessRouteActive: Bool { get }
    func setMinimumVolumeSliderImage(_ image: UIImage!, forState state: UIControlState)
    func setMaximumVolumeSliderImage(_ image: UIImage!, forState state: UIControlState)
    func setVolumeThumbImage(_ image: UIImage!, forState state: UIControlState)
    func minimumVolumeSliderImageForState(_ state: UIControlState) -> UIImage!
    func maximumVolumeSliderImageForState(_ state: UIControlState) -> UIImage!
    func volumeThumbImageForState(_ state: UIControlState) -> UIImage!
    var volumeWarningSliderImage: UIImage!
    func volumeSliderRectForBounds(_ bounds: CGRect) -> CGRect
    func volumeThumbRectForBounds(_ bounds: CGRect, volumeSliderRect rect: CGRect, value value: Float) -> CGRect
    func setRouteButtonImage(_ image: UIImage!, forState state: UIControlState)
    func routeButtonImageForState(_ state: UIControlState) -> UIImage!
    func routeButtonRectForBounds(_ bounds: CGRect) -> CGRect
}
To
class MPVolumeView : UIView {
    var showsVolumeSlider: Bool
    var showsRouteButton: Bool
    var wirelessRoutesAvailable: Bool { get }
    var wirelessRouteActive: Bool { get }
    func setMinimumVolumeSliderImage(_ image: UIImage?, forState state: UIControlState)
    func setMaximumVolumeSliderImage(_ image: UIImage?, forState state: UIControlState)
    func setVolumeThumbImage(_ image: UIImage?, forState state: UIControlState)
    func minimumVolumeSliderImageForState(_ state: UIControlState) -> UIImage?
    func maximumVolumeSliderImageForState(_ state: UIControlState) -> UIImage?
    func volumeThumbImageForState(_ state: UIControlState) -> UIImage?
    var volumeWarningSliderImage: UIImage?
    func volumeSliderRectForBounds(_ bounds: CGRect) -> CGRect
    func volumeThumbRectForBounds(_ bounds: CGRect, volumeSliderRect rect: CGRect, value value: Float) -> CGRect
    func setRouteButtonImage(_ image: UIImage?, forState state: UIControlState)
    func routeButtonImageForState(_ state: UIControlState) -> UIImage?
    func routeButtonRectForBounds(_ bounds: CGRect) -> CGRect
}

Declaration
From
func maximumVolumeSliderImageForState(_ state: UIControlState) -> UIImage!
To
func maximumVolumeSliderImageForState(_ state: UIControlState) -> UIImage?

Declaration
From
func minimumVolumeSliderImageForState(_ state: UIControlState) -> UIImage!
To
func minimumVolumeSliderImageForState(_ state: UIControlState) -> UIImage?

Declaration
From
func routeButtonImageForState(_ state: UIControlState) -> UIImage!
To
func routeButtonImageForState(_ state: UIControlState) -> UIImage?

Declaration
From
func setMaximumVolumeSliderImage(_ image: UIImage!, forState state: UIControlState)
To
func setMaximumVolumeSliderImage(_ image: UIImage?, forState state: UIControlState)

Declaration
From
func setMinimumVolumeSliderImage(_ image: UIImage!, forState state: UIControlState)
To
func setMinimumVolumeSliderImage(_ image: UIImage?, forState state: UIControlState)

Declaration
From
func setRouteButtonImage(_ image: UIImage!, forState state: UIControlState)
To
func setRouteButtonImage(_ image: UIImage?, forState state: UIControlState)

Declaration
From
func setVolumeThumbImage(_ image: UIImage!, forState state: UIControlState)
To
func setVolumeThumbImage(_ image: UIImage?, forState state: UIControlState)

Declaration
From
func volumeThumbImageForState(_ state: UIControlState) -> UIImage!
To
func volumeThumbImageForState(_ state: UIControlState) -> UIImage?

Declaration
From
var volumeWarningSliderImage: UIImage!
To
var volumeWarningSliderImage: UIImage?

IntroductionDeprecation
FromiOS 8.1--
ToiOS 3.2iOS 9.0

IntroductionDeprecation
FromiOS 8.1--
ToiOS 3.2iOS 9.0

Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0

IntroductionDeprecation
FromiOS 8.0--
ToiOS 2.0iOS 9.0

Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0

IntroductionDeprecation
FromiOS 8.0--
ToiOS 2.0iOS 9.0

Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0