Documentation Archive Developer
Search

FinderSync Changes for Swift

FinderSync

Modified FIFinderSync
Declaration
From
class FIFinderSync : NSObject, FIFinderSyncProtocol, NSExtensionRequestHandling, NSObjectProtocol {
}
To
class FIFinderSync : NSObject, FIFinderSyncProtocol, NSExtensionRequestHandling {
}

Declaration
From
class FIFinderSyncController : NSExtensionContext {
    class func defaultController() -> Self!
    var directoryURLs: Set<NSObject>!
    func setBadgeImage(_ image: NSImage!, label label: String!, forBadgeIdentifier badgeID: String!)
    func setBadgeIdentifier(_ badgeID: String!, forURL url: NSURL!)
    func targetedURL() -> NSURL!
    func selectedItemURLs() -> [AnyObject]!
}
To
class FIFinderSyncController : NSExtensionContext {
    class func defaultController() -> Self
    var directoryURLs: Set<NSURL>!
    func setBadgeImage(_ image: NSImage, label label: String?, forBadgeIdentifier badgeID: String)
    func setBadgeIdentifier(_ badgeID: String, forURL url: NSURL)
    func targetedURL() -> NSURL?
    func selectedItemURLs() -> [NSURL]?
}

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

Declaration
From
var directoryURLs: Set<NSObject>!
To
var directoryURLs: Set<NSURL>!

Declaration
From
func selectedItemURLs() -> [AnyObject]!
To
func selectedItemURLs() -> [NSURL]?

Declaration
From
func setBadgeIdentifier(_ badgeID: String!, forURL url: NSURL!)
To
func setBadgeIdentifier(_ badgeID: String, forURL url: NSURL)

Declaration
From
func setBadgeImage(_ image: NSImage!, label label: String!, forBadgeIdentifier badgeID: String!)
To
func setBadgeImage(_ image: NSImage, label label: String?, forBadgeIdentifier badgeID: String)

Declaration
From
func targetedURL() -> NSURL!
To
func targetedURL() -> NSURL?

Declaration
From
protocol FIFinderSyncProtocol {
    optional func menuForMenuKind(_ menu: FIMenuKind) -> NSMenu!
    optional func beginObservingDirectoryAtURL(_ url: NSURL!)
    optional func endObservingDirectoryAtURL(_ url: NSURL!)
    optional func requestBadgeIdentifierForURL(_ url: NSURL!)
    optional var toolbarItemName: String! { get }
    @NSCopying optional var toolbarItemImage: NSImage! { get }
    optional var toolbarItemToolTip: String! { get }
}
To
protocol FIFinderSyncProtocol {
    optional func menuForMenuKind(_ menu: FIMenuKind) -> NSMenu?
    optional func beginObservingDirectoryAtURL(_ url: NSURL)
    optional func endObservingDirectoryAtURL(_ url: NSURL)
    optional func requestBadgeIdentifierForURL(_ url: NSURL)
    optional var toolbarItemName: String { get }
    @NSCopying optional var toolbarItemImage: NSImage { get }
    optional var toolbarItemToolTip: String { get }
}

Declaration
From
optional func beginObservingDirectoryAtURL(_ url: NSURL!)
To
optional func beginObservingDirectoryAtURL(_ url: NSURL)

Declaration
From
optional func endObservingDirectoryAtURL(_ url: NSURL!)
To
optional func endObservingDirectoryAtURL(_ url: NSURL)

Declaration
From
optional func menuForMenuKind(_ menu: FIMenuKind) -> NSMenu!
To
optional func menuForMenuKind(_ menu: FIMenuKind) -> NSMenu?

Declaration
From
optional func requestBadgeIdentifierForURL(_ url: NSURL!)
To
optional func requestBadgeIdentifierForURL(_ url: NSURL)

Declaration
From
@NSCopying optional var toolbarItemImage: NSImage! { get }
To
@NSCopying optional var toolbarItemImage: NSImage { get }

Declaration
From
optional var toolbarItemName: String! { get }
To
optional var toolbarItemName: String { get }

Declaration
From
optional var toolbarItemToolTip: String! { get }
To
optional var toolbarItemToolTip: String { get }

Raw Value Type
From--
ToUInt