Documentation Archive Developer
Search

ExternalAccessory Changes for Swift

ExternalAccessory

Removed EAWiFiUnconfiguredAccessoryProperties.init(_: UInt)
Modified EAAccessory
Declaration
From
class EAAccessory : NSObject {
    var connected: Bool { get }
    var connectionID: Int { get }
    var manufacturer: String! { get }
    var name: String! { get }
    var modelNumber: String! { get }
    var serialNumber: String! { get }
    var firmwareRevision: String! { get }
    var hardwareRevision: String! { get }
    var protocolStrings: [AnyObject]! { get }
    unowned(unsafe) var delegate: EAAccessoryDelegate!
}
To
class EAAccessory : NSObject {
    var connected: Bool { get }
    var connectionID: Int { get }
    var manufacturer: String { get }
    var name: String { get }
    var modelNumber: String { get }
    var serialNumber: String { get }
    var firmwareRevision: String { get }
    var hardwareRevision: String { get }
    var dockType: String { get }
    var protocolStrings: [String] { get }
    unowned(unsafe) var delegate: EAAccessoryDelegate?
}

Declaration
From
unowned(unsafe) var delegate: EAAccessoryDelegate!
To
unowned(unsafe) var delegate: EAAccessoryDelegate?

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

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

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

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

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

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

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

Declaration
From
protocol EAAccessoryDelegate : NSObjectProtocol {
    optional func accessoryDidDisconnect(_ accessory: EAAccessory!)
}
To
protocol EAAccessoryDelegate : NSObjectProtocol {
    optional func accessoryDidDisconnect(_ accessory: EAAccessory)
}

Declaration
From
optional func accessoryDidDisconnect(_ accessory: EAAccessory!)
To
optional func accessoryDidDisconnect(_ accessory: EAAccessory)

Declaration
From
class EAAccessoryManager : NSObject {
    class func sharedAccessoryManager() -> EAAccessoryManager!
    func showBluetoothAccessoryPickerWithNameFilter(_ predicate: NSPredicate!, completion completion: EABluetoothAccessoryPickerCompletion!)
    func registerForLocalNotifications()
    func unregisterForLocalNotifications()
    var connectedAccessories: [AnyObject]! { get }
}
To
class EAAccessoryManager : NSObject {
    class func sharedAccessoryManager() -> EAAccessoryManager
    func showBluetoothAccessoryPickerWithNameFilter(_ predicate: NSPredicate?, completion completion: EABluetoothAccessoryPickerCompletion?)
    func registerForLocalNotifications()
    func unregisterForLocalNotifications()
    var connectedAccessories: [EAAccessory] { get }
}

Declaration
From
var connectedAccessories: [AnyObject]! { get }
To
var connectedAccessories: [EAAccessory] { get }

Declaration
From
class func sharedAccessoryManager() -> EAAccessoryManager!
To
class func sharedAccessoryManager() -> EAAccessoryManager

Declaration
From
func showBluetoothAccessoryPickerWithNameFilter(_ predicate: NSPredicate!, completion completion: EABluetoothAccessoryPickerCompletion!)
To
func showBluetoothAccessoryPickerWithNameFilter(_ predicate: NSPredicate?, completion completion: EABluetoothAccessoryPickerCompletion?)

Raw Value Type
From--
ToInt

Modified EASession
Declaration
From
class EASession : NSObject {
    init!(accessory accessory: EAAccessory!, forProtocol protocolString: String!)
    var accessory: EAAccessory! { get }
    var protocolString: String! { get }
    var inputStream: NSInputStream! { get }
    var outputStream: NSOutputStream! { get }
}
To
class EASession : NSObject {
    init(accessory accessory: EAAccessory, forProtocol protocolString: String)
    var accessory: EAAccessory { get }
    var protocolString: String { get }
    var inputStream: NSInputStream? { get }
    var outputStream: NSOutputStream? { get }
}

Declaration
From
var accessory: EAAccessory! { get }
To
var accessory: EAAccessory { get }

Declaration
From
init!(accessory accessory: EAAccessory!, forProtocol protocolString: String!)
To
init(accessory accessory: EAAccessory, forProtocol protocolString: String)

Declaration
From
var inputStream: NSInputStream! { get }
To
var inputStream: NSInputStream? { get }

Declaration
From
var outputStream: NSOutputStream! { get }
To
var outputStream: NSOutputStream? { get }

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

Declaration
From
class EAWiFiUnconfiguredAccessory : NSObject {
    var name: String! { get }
    var manufacturer: String! { get }
    var model: String! { get }
    var ssid: String! { get }
    var macAddress: String! { get }
    var properties: EAWiFiUnconfiguredAccessoryProperties { get }
}
To
class EAWiFiUnconfiguredAccessory : NSObject {
    var name: String { get }
    var manufacturer: String { get }
    var model: String { get }
    var ssid: String { get }
    var macAddress: String { get }
    var properties: EAWiFiUnconfiguredAccessoryProperties { get }
}

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

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

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

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

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

Declaration
From
class EAWiFiUnconfiguredAccessoryBrowser : NSObject {
    weak var delegate: EAWiFiUnconfiguredAccessoryBrowserDelegate!
    var unconfiguredAccessories: Set<NSObject>! { get }
    init!(delegate delegate: EAWiFiUnconfiguredAccessoryBrowserDelegate!, queue queue: dispatch_queue_t!)
    func startSearchingForUnconfiguredAccessoriesMatchingPredicate(_ predicate: NSPredicate!)
    func stopSearchingForUnconfiguredAccessories()
    func configureAccessory(_ accessory: EAWiFiUnconfiguredAccessory!, withConfigurationUIOnViewController viewController: UIViewController!)
}
To
class EAWiFiUnconfiguredAccessoryBrowser : NSObject {
    weak var delegate: EAWiFiUnconfiguredAccessoryBrowserDelegate?
    var unconfiguredAccessories: Set<EAWiFiUnconfiguredAccessory> { get }
    init(delegate delegate: EAWiFiUnconfiguredAccessoryBrowserDelegate?, queue queue: dispatch_queue_t?)
    func startSearchingForUnconfiguredAccessoriesMatchingPredicate(_ predicate: NSPredicate?)
    func stopSearchingForUnconfiguredAccessories()
    func configureAccessory(_ accessory: EAWiFiUnconfiguredAccessory, withConfigurationUIOnViewController viewController: UIViewController)
}

Declaration
From
func configureAccessory(_ accessory: EAWiFiUnconfiguredAccessory!, withConfigurationUIOnViewController viewController: UIViewController!)
To
func configureAccessory(_ accessory: EAWiFiUnconfiguredAccessory, withConfigurationUIOnViewController viewController: UIViewController)

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

Declaration
From
init!(delegate delegate: EAWiFiUnconfiguredAccessoryBrowserDelegate!, queue queue: dispatch_queue_t!)
To
init(delegate delegate: EAWiFiUnconfiguredAccessoryBrowserDelegate?, queue queue: dispatch_queue_t?)

Declaration
From
func startSearchingForUnconfiguredAccessoriesMatchingPredicate(_ predicate: NSPredicate!)
To
func startSearchingForUnconfiguredAccessoriesMatchingPredicate(_ predicate: NSPredicate?)

Declaration
From
var unconfiguredAccessories: Set<NSObject>! { get }
To
var unconfiguredAccessories: Set<EAWiFiUnconfiguredAccessory> { get }

Declaration
From
protocol EAWiFiUnconfiguredAccessoryBrowserDelegate : NSObjectProtocol {
    func accessoryBrowser(_ browser: EAWiFiUnconfiguredAccessoryBrowser!, didUpdateState state: EAWiFiUnconfiguredAccessoryBrowserState)
    func accessoryBrowser(_ browser: EAWiFiUnconfiguredAccessoryBrowser!, didFindUnconfiguredAccessories accessories: Set<NSObject>!)
    func accessoryBrowser(_ browser: EAWiFiUnconfiguredAccessoryBrowser!, didRemoveUnconfiguredAccessories accessories: Set<NSObject>!)
    func accessoryBrowser(_ browser: EAWiFiUnconfiguredAccessoryBrowser!, didFinishConfiguringAccessory accessory: EAWiFiUnconfiguredAccessory!, withStatus status: EAWiFiUnconfiguredAccessoryConfigurationStatus)
}
To
protocol EAWiFiUnconfiguredAccessoryBrowserDelegate : NSObjectProtocol {
    func accessoryBrowser(_ browser: EAWiFiUnconfiguredAccessoryBrowser, didUpdateState state: EAWiFiUnconfiguredAccessoryBrowserState)
    func accessoryBrowser(_ browser: EAWiFiUnconfiguredAccessoryBrowser, didFindUnconfiguredAccessories accessories: Set<EAWiFiUnconfiguredAccessory>)
    func accessoryBrowser(_ browser: EAWiFiUnconfiguredAccessoryBrowser, didRemoveUnconfiguredAccessories accessories: Set<EAWiFiUnconfiguredAccessory>)
    func accessoryBrowser(_ browser: EAWiFiUnconfiguredAccessoryBrowser, didFinishConfiguringAccessory accessory: EAWiFiUnconfiguredAccessory, withStatus status: EAWiFiUnconfiguredAccessoryConfigurationStatus)
}

Declaration
From
func accessoryBrowser(_ browser: EAWiFiUnconfiguredAccessoryBrowser!, didFindUnconfiguredAccessories accessories: Set<NSObject>!)
To
func accessoryBrowser(_ browser: EAWiFiUnconfiguredAccessoryBrowser, didFindUnconfiguredAccessories accessories: Set<EAWiFiUnconfiguredAccessory>)

Declaration
From
func accessoryBrowser(_ browser: EAWiFiUnconfiguredAccessoryBrowser!, didFinishConfiguringAccessory accessory: EAWiFiUnconfiguredAccessory!, withStatus status: EAWiFiUnconfiguredAccessoryConfigurationStatus)
To
func accessoryBrowser(_ browser: EAWiFiUnconfiguredAccessoryBrowser, didFinishConfiguringAccessory accessory: EAWiFiUnconfiguredAccessory, withStatus status: EAWiFiUnconfiguredAccessoryConfigurationStatus)

Declaration
From
func accessoryBrowser(_ browser: EAWiFiUnconfiguredAccessoryBrowser!, didRemoveUnconfiguredAccessories accessories: Set<NSObject>!)
To
func accessoryBrowser(_ browser: EAWiFiUnconfiguredAccessoryBrowser, didRemoveUnconfiguredAccessories accessories: Set<EAWiFiUnconfiguredAccessory>)

Declaration
From
func accessoryBrowser(_ browser: EAWiFiUnconfiguredAccessoryBrowser!, didUpdateState state: EAWiFiUnconfiguredAccessoryBrowserState)
To
func accessoryBrowser(_ browser: EAWiFiUnconfiguredAccessoryBrowser, didUpdateState state: EAWiFiUnconfiguredAccessoryBrowserState)

Raw Value Type
From--
ToInt

Raw Value Type
From--
ToInt

DeclarationProtocols
From
struct EAWiFiUnconfiguredAccessoryProperties : RawOptionSetType {
    init(_ rawValue: UInt)
    init(rawValue rawValue: UInt)
    static var PropertySupportsAirPlay: EAWiFiUnconfiguredAccessoryProperties { get }
    static var PropertySupportsAirPrint: EAWiFiUnconfiguredAccessoryProperties { get }
    static var PropertySupportsHomeKit: EAWiFiUnconfiguredAccessoryProperties { get }
}
RawOptionSetType
To
struct EAWiFiUnconfiguredAccessoryProperties : OptionSetType {
    init(rawValue rawValue: UInt)
    static var PropertySupportsAirPlay: EAWiFiUnconfiguredAccessoryProperties { get }
    static var PropertySupportsAirPrint: EAWiFiUnconfiguredAccessoryProperties { get }
    static var PropertySupportsHomeKit: EAWiFiUnconfiguredAccessoryProperties { get }
}
OptionSetType

Declaration
From
typealias EABluetoothAccessoryPickerCompletion = (NSError!) -> Void
To
typealias EABluetoothAccessoryPickerCompletion = (NSError?) -> Void