Documentation Archive Developer
Search

MediaLibrary Changes for Swift

MediaLibrary

Removed MLMediaSourceType.init(_: UInt)
Modified MLMediaGroup
Declaration
From
class MLMediaGroup : NSObject {
    unowned(unsafe) var mediaLibrary: MLMediaLibrary! { get }
    unowned(unsafe) var parent: MLMediaGroup! { get }
    var mediaSourceIdentifier: String! { get }
    var name: String! { get }
    var identifier: String! { get }
    var typeIdentifier: String! { get }
    var attributes: [NSObject : AnyObject]! { get }
    var childGroups: [AnyObject]! { get }
    @NSCopying var URL: NSURL! { get }
    @NSCopying var modificationDate: NSDate! { get }
    @NSCopying var iconImage: NSImage! { get }
    var mediaObjects: [AnyObject]! { get }
}
To
class MLMediaGroup : NSObject {
    unowned(unsafe) var mediaLibrary: MLMediaLibrary? { get }
    unowned(unsafe) var parent: MLMediaGroup? { get }
    var mediaSourceIdentifier: String { get }
    var name: String? { get }
    var identifier: String { get }
    var typeIdentifier: String { get }
    var attributes: [String : AnyObject] { get }
    var childGroups: [MLMediaGroup]? { get }
    @NSCopying var URL: NSURL? { get }
    @NSCopying var modificationDate: NSDate? { get }
    @NSCopying var iconImage: NSImage? { get }
    var mediaObjects: [MLMediaObject]? { get }
}

Declaration
From
var attributes: [NSObject : AnyObject]! { get }
To
var attributes: [String : AnyObject] { get }

Declaration
From
var childGroups: [AnyObject]! { get }
To
var childGroups: [MLMediaGroup]? { get }

Declaration
From
@NSCopying var iconImage: NSImage! { get }
To
@NSCopying var iconImage: NSImage? { get }

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

Declaration
From
unowned(unsafe) var mediaLibrary: MLMediaLibrary! { get }
To
unowned(unsafe) var mediaLibrary: MLMediaLibrary? { get }

Declaration
From
var mediaObjects: [AnyObject]! { get }
To
var mediaObjects: [MLMediaObject]? { get }

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

Declaration
From
@NSCopying var modificationDate: NSDate! { get }
To
@NSCopying var modificationDate: NSDate? { get }

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

Declaration
From
unowned(unsafe) var parent: MLMediaGroup! { get }
To
unowned(unsafe) var parent: MLMediaGroup? { get }

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

Declaration
From
@NSCopying var URL: NSURL! { get }
To
@NSCopying var URL: NSURL? { get }

Declaration
From
class MLMediaLibrary : NSObject {
    init!(options options: [NSObject : AnyObject]!)
    var mediaSources: [NSObject : AnyObject]! { get }
}
To
class MLMediaLibrary : NSObject {
    init(options options: [String : AnyObject])
    var mediaSources: [String : MLMediaSource]? { get }
}

Declaration
From
init!(options options: [NSObject : AnyObject]!)
To
init(options options: [String : AnyObject])

Declaration
From
var mediaSources: [NSObject : AnyObject]! { get }
To
var mediaSources: [String : MLMediaSource]? { get }

Modified MLMediaObject
Declaration
From
class MLMediaObject : NSObject {
    unowned(unsafe) var mediaLibrary: MLMediaLibrary! { get }
    var identifier: String! { get }
    var mediaSourceIdentifier: String! { get }
    var attributes: [NSObject : AnyObject]! { get }
    var mediaType: MLMediaType { get }
    var contentType: String! { get }
    var name: String! { get }
    @NSCopying var URL: NSURL! { get }
    @NSCopying var originalURL: NSURL! { get }
    var fileSize: Int { get }
    @NSCopying var modificationDate: NSDate! { get }
    @NSCopying var thumbnailURL: NSURL! { get }
    @NSCopying var artworkImage: NSImage! { get }
}
To
class MLMediaObject : NSObject {
    unowned(unsafe) var mediaLibrary: MLMediaLibrary? { get }
    var identifier: String { get }
    var mediaSourceIdentifier: String { get }
    var attributes: [String : AnyObject] { get }
    var mediaType: MLMediaType { get }
    var contentType: String? { get }
    var name: String? { get }
    @NSCopying var URL: NSURL? { get }
    @NSCopying var originalURL: NSURL? { get }
    var fileSize: Int { get }
    @NSCopying var modificationDate: NSDate? { get }
    @NSCopying var thumbnailURL: NSURL? { get }
    @NSCopying var artworkImage: NSImage? { get }
}

Declaration
From
@NSCopying var artworkImage: NSImage! { get }
To
@NSCopying var artworkImage: NSImage? { get }

Declaration
From
var attributes: [NSObject : AnyObject]! { get }
To
var attributes: [String : AnyObject] { get }

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

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

Declaration
From
unowned(unsafe) var mediaLibrary: MLMediaLibrary! { get }
To
unowned(unsafe) var mediaLibrary: MLMediaLibrary? { get }

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

Declaration
From
@NSCopying var modificationDate: NSDate! { get }
To
@NSCopying var modificationDate: NSDate? { get }

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

Declaration
From
@NSCopying var originalURL: NSURL! { get }
To
@NSCopying var originalURL: NSURL? { get }

Declaration
From
@NSCopying var thumbnailURL: NSURL! { get }
To
@NSCopying var thumbnailURL: NSURL? { get }

Declaration
From
@NSCopying var URL: NSURL! { get }
To
@NSCopying var URL: NSURL? { get }

Modified MLMediaSource
Declaration
From
class MLMediaSource : NSObject {
    unowned(unsafe) var mediaLibrary: MLMediaLibrary! { get }
    var mediaSourceIdentifier: String! { get }
    var attributes: [NSObject : AnyObject]! { get }
    var rootMediaGroup: MLMediaGroup! { get }
    func mediaGroupForIdentifier(_ mediaGroupIdentifier: String!) -> MLMediaGroup!
    func mediaGroupsForIdentifiers(_ mediaGroupIdentifiers: [AnyObject]!) -> [NSObject : AnyObject]!
    func mediaObjectForIdentifier(_ mediaObjectIdentifier: String!) -> MLMediaObject!
    func mediaObjectsForIdentifiers(_ mediaObjectIdentifiers: [AnyObject]!) -> [NSObject : AnyObject]!
}
To
class MLMediaSource : NSObject {
    unowned(unsafe) var mediaLibrary: MLMediaLibrary? { get }
    var mediaSourceIdentifier: String { get }
    var attributes: [String : AnyObject] { get }
    var rootMediaGroup: MLMediaGroup? { get }
    func mediaGroupForIdentifier(_ mediaGroupIdentifier: String) -> MLMediaGroup?
    func mediaGroupsForIdentifiers(_ mediaGroupIdentifiers: [String]) -> [String : MLMediaGroup]
    func mediaObjectForIdentifier(_ mediaObjectIdentifier: String) -> MLMediaObject?
    func mediaObjectsForIdentifiers(_ mediaObjectIdentifiers: [String]) -> [String : MLMediaObject]
}

Declaration
From
var attributes: [NSObject : AnyObject]! { get }
To
var attributes: [String : AnyObject] { get }

Declaration
From
func mediaGroupForIdentifier(_ mediaGroupIdentifier: String!) -> MLMediaGroup!
To
func mediaGroupForIdentifier(_ mediaGroupIdentifier: String) -> MLMediaGroup?

Declaration
From
func mediaGroupsForIdentifiers(_ mediaGroupIdentifiers: [AnyObject]!) -> [NSObject : AnyObject]!
To
func mediaGroupsForIdentifiers(_ mediaGroupIdentifiers: [String]) -> [String : MLMediaGroup]

Declaration
From
unowned(unsafe) var mediaLibrary: MLMediaLibrary! { get }
To
unowned(unsafe) var mediaLibrary: MLMediaLibrary? { get }

Declaration
From
func mediaObjectForIdentifier(_ mediaObjectIdentifier: String!) -> MLMediaObject!
To
func mediaObjectForIdentifier(_ mediaObjectIdentifier: String) -> MLMediaObject?

Declaration
From
func mediaObjectsForIdentifiers(_ mediaObjectIdentifiers: [AnyObject]!) -> [NSObject : AnyObject]!
To
func mediaObjectsForIdentifiers(_ mediaObjectIdentifiers: [String]) -> [String : MLMediaObject]

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

Declaration
From
var rootMediaGroup: MLMediaGroup! { get }
To
var rootMediaGroup: MLMediaGroup? { get }

DeclarationProtocols
From
struct MLMediaSourceType : RawOptionSetType {
    init(_ rawValue: UInt)
    init(rawValue rawValue: UInt)
    static var Audio: MLMediaSourceType { get }
    static var Image: MLMediaSourceType { get }
    static var Movie: MLMediaSourceType { get }
}
RawOptionSetType
To
struct MLMediaSourceType : OptionSetType {
    init(rawValue rawValue: UInt)
    static var Audio: MLMediaSourceType { get }
    static var Image: MLMediaSourceType { get }
    static var Movie: MLMediaSourceType { get }
}
OptionSetType

Raw Value Type
From--
ToUInt