Documentation Archive Developer
Search

MediaPlayer Changes for Swift

MediaPlayer

Protocols
FromAnyObject
To--

Protocols
FromAnyObject
To--

Protocols
FromAnyObject
To--

Modified MPContentItem
Protocols
FromAnyObject
To--

Protocols
FromAnyObject
To--

Protocols
FromAnyObject
To--

Modified MPMediaEntity
DeclarationProtocols
From
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 }
}
AnyObject, NSCoding, NSSecureCoding
To
class MPMediaEntity : NSObject, NSSecureCoding {
    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 }
}
NSSecureCoding

Protocols
FromEquatable, Hashable, RawRepresentable
To--

Modified MPMediaItem
Protocols
FromAnyObject
To--

Protocols
FromAnyObject
To--

Protocols
FromAnyObject
To--

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

Protocols
FromAnyObject
To--

Protocols
FromAnyObject
To--

DeclarationProtocols
From
class MPMediaPredicate : NSObject, NSSecureCoding, NSCoding {
}
AnyObject, NSCoding, NSSecureCoding
To
class MPMediaPredicate : NSObject, NSSecureCoding {
}
NSSecureCoding

Protocols
FromEquatable, Hashable, RawRepresentable
To--

Protocols
FromAnyObject
To--

Modified MPMediaQuery
DeclarationProtocols
From
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
}
AnyObject, NSCoding, NSCopying, NSSecureCoding
To
class MPMediaQuery : NSObject, NSSecureCoding, 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
}
NSCopying, NSSecureCoding

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

Protocols
FromAnyObject, NSCopying
ToNSCopying

Protocols
FromAnyObject, NSCopying
ToNSCopying

Protocols
FromEquatable, Hashable, RawRepresentable
To--

Protocols
FromAnyObject, NSCopying
ToNSCopying

Protocols
FromAnyObject, NSCopying
ToNSCopying

Protocols
FromEquatable, Hashable, RawRepresentable
To--

Protocols
FromEquatable, Hashable, RawRepresentable
To--

Protocols
FromAnyObject, MPMediaPlayback
ToMPMediaPlayback

Protocols
FromAnyObject
To--

Protocols
FromEquatable, Hashable, RawRepresentable
To--

Protocols
FromEquatable, Hashable, RawRepresentable
To--

Protocols
FromEquatable, Hashable, RawRepresentable
To--

Protocols
FromEquatable, Hashable, RawRepresentable
To--

Protocols
FromEquatable, Hashable, RawRepresentable
To--

Protocols
FromAnyObject, MPMediaPlayback
ToMPMediaPlayback

Protocols
FromEquatable, Hashable, RawRepresentable
To--

Protocols
FromEquatable, Hashable, RawRepresentable
To--

Protocols
FromAnyObject
To--

DeclarationProtocols
From
class MPNowPlayingInfoLanguageOption : NSObject {
    init(type languageOptionType: MPNowPlayingInfoLanguageOptionType, languageTag languageTag: String, characteristics languageOptionCharacteristics: [String]?, displayName displayName: String, identifier identifier: String)
    func isAutomaticLegibleLanguageOption() -> Bool
    var languageOptionType: MPNowPlayingInfoLanguageOptionType { get }
    var languageTag: String? { get }
    var languageOptionCharacteristics: [String]? { get }
    var displayName: String? { get }
    var identifier: String? { get }
}
AnyObject
To
class MPNowPlayingInfoLanguageOption : NSObject {
    init(type languageOptionType: MPNowPlayingInfoLanguageOptionType, languageTag languageTag: String, characteristics languageOptionCharacteristics: [String]?, displayName displayName: String, identifier identifier: String)
    func isAutomaticLegibleLanguageOption() -> Bool
    func isAutomaticAudibleLanguageOption() -> Bool
    var languageOptionType: MPNowPlayingInfoLanguageOptionType { get }
    var languageTag: String? { get }
    var languageOptionCharacteristics: [String]? { get }
    var displayName: String? { get }
    var identifier: String? { get }
}
--

Protocols
FromAnyObject
To--

Protocols
FromEquatable, Hashable, RawRepresentable
To--

Introduction
FromiOS 9.0
ToiOS 8.4

Protocols
FromAnyObject
To--

Protocols
FromAnyObject
To--

Protocols
FromAnyObject
To--

Protocols
FromAnyObject
To--

Protocols
FromAnyObject
To--

DeclarationProtocols
From
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
}
AnyObject
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 }
    var changePlaybackPositionCommand: MPChangePlaybackPositionCommand { get }
    class func sharedCommandCenter() -> MPRemoteCommandCenter
}
--

Protocols
FromAnyObject
To--

DeclarationProtocols
From
enum MPRemoteCommandHandlerStatus : Int {
    case Success
    case NoSuchContent
    case CommandFailed
}
Equatable, Hashable, RawRepresentable
To
enum MPRemoteCommandHandlerStatus : Int {
    case Success
    case NoSuchContent
    case NoActionableNowPlayingItem
    case CommandFailed
}
--

Protocols
FromAnyObject
To--

Protocols
FromEquatable, Hashable, RawRepresentable
To--

Protocols
FromAnyObject
To--

Protocols
FromAnyObject
To--

Protocols
FromAnyObject
To--

Modified MPVolumeView
DeclarationProtocols
From
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
}
AnyObject, NSCoding
To
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
}
NSCoding