Documentation Archive Developer
Search

HomeKit Changes for Swift

HomeKit

Added HMEvent
Modified HMAccessory
Declaration
From
class HMAccessory : NSObject {
    var name: String! { get }
    @NSCopying var identifier: NSUUID! { get }
    weak var delegate: HMAccessoryDelegate?
    var reachable: Bool { get }
    var bridged: Bool { get }
    var identifiersForBridgedAccessories: [AnyObject]! { get }
    weak var room: HMRoom! { get }
    var services: [AnyObject]! { get }
    var blocked: Bool { get }
    func updateName(_ name: String!, completionHandler completion: ((NSError!) -> Void)!)
    func identifyWithCompletionHandler(_ completion: ((NSError!) -> Void)!)
}
To
class HMAccessory : NSObject {
    var name: String { get }
    @NSCopying var identifier: NSUUID { get }
    @NSCopying var uniqueIdentifier: NSUUID { get }
    weak var delegate: HMAccessoryDelegate?
    var reachable: Bool { get }
    var bridged: Bool { get }
    var identifiersForBridgedAccessories: [NSUUID]? { get }
    var uniqueIdentifiersForBridgedAccessories: [NSUUID]? { get }
    var category: HMAccessoryCategory { get }
    weak var room: HMRoom? { get }
    var services: [HMService] { get }
    var blocked: Bool { get }
    func updateName(_ name: String, completionHandler completion: (NSError?) -> Void)
    func identifyWithCompletionHandler(_ completion: (NSError?) -> Void)
}

DeclarationDeprecation
From
@NSCopying var identifier: NSUUID! { get }
--
To
@NSCopying var identifier: NSUUID { get }
iOS 9.0

DeclarationDeprecation
From
var identifiersForBridgedAccessories: [AnyObject]! { get }
--
To
var identifiersForBridgedAccessories: [NSUUID]? { get }
iOS 9.0

Declaration
From
func identifyWithCompletionHandler(_ completion: ((NSError!) -> Void)!)
To
func identifyWithCompletionHandler(_ completion: (NSError?) -> Void)

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

Declaration
From
weak var room: HMRoom! { get }
To
weak var room: HMRoom? { get }

Declaration
From
var services: [AnyObject]! { get }
To
var services: [HMService] { get }

Declaration
From
func updateName(_ name: String!, completionHandler completion: ((NSError!) -> Void)!)
To
func updateName(_ name: String, completionHandler completion: (NSError?) -> Void)

Declaration
From
class HMAccessoryBrowser : NSObject {
    weak var delegate: HMAccessoryBrowserDelegate?
    var discoveredAccessories: [AnyObject]! { get }
    func startSearchingForNewAccessories()
    func stopSearchingForNewAccessories()
}
To
class HMAccessoryBrowser : NSObject {
    weak var delegate: HMAccessoryBrowserDelegate?
    var discoveredAccessories: [HMAccessory] { get }
    func startSearchingForNewAccessories()
    func stopSearchingForNewAccessories()
}

Declaration
From
var discoveredAccessories: [AnyObject]! { get }
To
var discoveredAccessories: [HMAccessory] { get }

Declaration
From
protocol HMAccessoryBrowserDelegate : NSObjectProtocol {
    optional func accessoryBrowser(_ browser: HMAccessoryBrowser, didFindNewAccessory accessory: HMAccessory!)
    optional func accessoryBrowser(_ browser: HMAccessoryBrowser, didRemoveNewAccessory accessory: HMAccessory!)
}
To
protocol HMAccessoryBrowserDelegate : NSObjectProtocol {
    optional func accessoryBrowser(_ browser: HMAccessoryBrowser, didFindNewAccessory accessory: HMAccessory)
    optional func accessoryBrowser(_ browser: HMAccessoryBrowser, didRemoveNewAccessory accessory: HMAccessory)
}

Declaration
From
optional func accessoryBrowser(_ browser: HMAccessoryBrowser, didFindNewAccessory accessory: HMAccessory!)
To
optional func accessoryBrowser(_ browser: HMAccessoryBrowser, didFindNewAccessory accessory: HMAccessory)

Declaration
From
optional func accessoryBrowser(_ browser: HMAccessoryBrowser, didRemoveNewAccessory accessory: HMAccessory!)
To
optional func accessoryBrowser(_ browser: HMAccessoryBrowser, didRemoveNewAccessory accessory: HMAccessory)

Declaration
From
protocol HMAccessoryDelegate : NSObjectProtocol {
    optional func accessoryDidUpdateName(_ accessory: HMAccessory)
    optional func accessory(_ accessory: HMAccessory, didUpdateNameForService service: HMService!)
    optional func accessory(_ accessory: HMAccessory, didUpdateAssociatedServiceTypeForService service: HMService!)
    optional func accessoryDidUpdateServices(_ accessory: HMAccessory)
    optional func accessoryDidUpdateReachability(_ accessory: HMAccessory)
    optional func accessory(_ accessory: HMAccessory, service service: HMService!, didUpdateValueForCharacteristic characteristic: HMCharacteristic!)
}
To
protocol HMAccessoryDelegate : NSObjectProtocol {
    optional func accessoryDidUpdateName(_ accessory: HMAccessory)
    optional func accessory(_ accessory: HMAccessory, didUpdateNameForService service: HMService)
    optional func accessory(_ accessory: HMAccessory, didUpdateAssociatedServiceTypeForService service: HMService)
    optional func accessoryDidUpdateServices(_ accessory: HMAccessory)
    optional func accessoryDidUpdateReachability(_ accessory: HMAccessory)
    optional func accessory(_ accessory: HMAccessory, service service: HMService, didUpdateValueForCharacteristic characteristic: HMCharacteristic)
}

Declaration
From
optional func accessory(_ accessory: HMAccessory, didUpdateAssociatedServiceTypeForService service: HMService!)
To
optional func accessory(_ accessory: HMAccessory, didUpdateAssociatedServiceTypeForService service: HMService)

Declaration
From
optional func accessory(_ accessory: HMAccessory, didUpdateNameForService service: HMService!)
To
optional func accessory(_ accessory: HMAccessory, didUpdateNameForService service: HMService)

Declaration
From
optional func accessory(_ accessory: HMAccessory, service service: HMService!, didUpdateValueForCharacteristic characteristic: HMCharacteristic!)
To
optional func accessory(_ accessory: HMAccessory, service service: HMService, didUpdateValueForCharacteristic characteristic: HMCharacteristic)

Modified HMAction
Declaration
From
class HMAction : NSObject {
}
To
class HMAction : NSObject {
    @NSCopying var uniqueIdentifier: NSUUID { get }
}

Modified HMActionSet
Declaration
From
class HMActionSet : NSObject {
    init!()
    var name: String! { get }
    var actions: Set<NSObject>! { get }
    var executing: Bool { get }
    func updateName(_ name: String!, completionHandler completion: ((NSError!) -> Void)!)
    func addAction(_ action: HMAction!, completionHandler completion: ((NSError!) -> Void)!)
    func removeAction(_ action: HMAction!, completionHandler completion: ((NSError!) -> Void)!)
}
To
class HMActionSet : NSObject {
    init()
    var name: String { get }
    var actions: Set<HMAction> { get }
    var executing: Bool { get }
    var actionSetType: String { get }
    @NSCopying var uniqueIdentifier: NSUUID { get }
    func updateName(_ name: String, completionHandler completion: (NSError?) -> Void)
    func addAction(_ action: HMAction, completionHandler completion: (NSError?) -> Void)
    func removeAction(_ action: HMAction, completionHandler completion: (NSError?) -> Void)
}

Declaration
From
var actions: Set<NSObject>! { get }
To
var actions: Set<HMAction> { get }

Declaration
From
func addAction(_ action: HMAction!, completionHandler completion: ((NSError!) -> Void)!)
To
func addAction(_ action: HMAction, completionHandler completion: (NSError?) -> Void)

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

Declaration
From
func removeAction(_ action: HMAction!, completionHandler completion: ((NSError!) -> Void)!)
To
func removeAction(_ action: HMAction, completionHandler completion: (NSError?) -> Void)

Declaration
From
func updateName(_ name: String!, completionHandler completion: ((NSError!) -> Void)!)
To
func updateName(_ name: String, completionHandler completion: (NSError?) -> Void)

Declaration
From
class HMCharacteristic : NSObject {
    var characteristicType: String! { get }
    weak var service: HMService! { get }
    var properties: [AnyObject]! { get }
    var metadata: HMCharacteristicMetadata! { get }
    @NSCopying var value: AnyObject! { get }
    var notificationEnabled: Bool { get }
    func writeValue(_ value: AnyObject!, completionHandler completion: ((NSError!) -> Void)!)
    func readValueWithCompletionHandler(_ completion: ((NSError!) -> Void)!)
    func enableNotification(_ enable: Bool, completionHandler completion: ((NSError!) -> Void)!)
    func updateAuthorizationData(_ data: NSData!, completionHandler completion: ((NSError!) -> Void)!)
}
To
class HMCharacteristic : NSObject {
    var characteristicType: String { get }
    var localizedDescription: String { get }
    weak var service: HMService? { get }
    var properties: [String] { get }
    var metadata: HMCharacteristicMetadata? { get }
    @NSCopying var value: AnyObject? { get }
    var notificationEnabled: Bool { get }
    @NSCopying var uniqueIdentifier: NSUUID { get }
    func writeValue(_ value: AnyObject?, completionHandler completion: (NSError?) -> Void)
    func readValueWithCompletionHandler(_ completion: (NSError?) -> Void)
    func enableNotification(_ enable: Bool, completionHandler completion: (NSError?) -> Void)
    func updateAuthorizationData(_ data: NSData?, completionHandler completion: (NSError?) -> Void)
}

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

Declaration
From
func enableNotification(_ enable: Bool, completionHandler completion: ((NSError!) -> Void)!)
To
func enableNotification(_ enable: Bool, completionHandler completion: (NSError?) -> Void)

Declaration
From
var metadata: HMCharacteristicMetadata! { get }
To
var metadata: HMCharacteristicMetadata? { get }

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

Declaration
From
func readValueWithCompletionHandler(_ completion: ((NSError!) -> Void)!)
To
func readValueWithCompletionHandler(_ completion: (NSError?) -> Void)

Declaration
From
weak var service: HMService! { get }
To
weak var service: HMService? { get }

Declaration
From
func updateAuthorizationData(_ data: NSData!, completionHandler completion: ((NSError!) -> Void)!)
To
func updateAuthorizationData(_ data: NSData?, completionHandler completion: (NSError?) -> Void)

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

Declaration
From
func writeValue(_ value: AnyObject!, completionHandler completion: ((NSError!) -> Void)!)
To
func writeValue(_ value: AnyObject?, completionHandler completion: (NSError?) -> Void)

Declaration
From
class HMCharacteristicMetadata : NSObject {
    var minimumValue: NSNumber! { get }
    var maximumValue: NSNumber! { get }
    var stepValue: NSNumber! { get }
    var maxLength: NSNumber! { get }
    var format: String! { get }
    var units: String! { get }
    var manufacturerDescription: String! { get }
}
To
class HMCharacteristicMetadata : NSObject {
    var minimumValue: NSNumber? { get }
    var maximumValue: NSNumber? { get }
    var stepValue: NSNumber? { get }
    var maxLength: NSNumber? { get }
    var format: String? { get }
    var units: String? { get }
    var manufacturerDescription: String? { get }
}

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

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

Declaration
From
var maximumValue: NSNumber! { get }
To
var maximumValue: NSNumber? { get }

Declaration
From
var maxLength: NSNumber! { get }
To
var maxLength: NSNumber? { get }

Declaration
From
var minimumValue: NSNumber! { get }
To
var minimumValue: NSNumber? { get }

Declaration
From
var stepValue: NSNumber! { get }
To
var stepValue: NSNumber? { get }

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

Raw Value Type
From--
ToInt

Raw Value Type
From--
ToInt

Raw Value Type
From--
ToInt

Raw Value Type
From--
ToInt

Raw Value Type
From--
ToInt

Raw Value Type
From--
ToInt

Declaration
From
class HMCharacteristicWriteAction : HMAction {
    convenience init!()
    init!(characteristic characteristic: HMCharacteristic!, targetValue targetValue: AnyObject!)
    var characteristic: HMCharacteristic! { get }
    @NSCopying var targetValue: AnyObject! { get }
    func updateTargetValue(_ targetValue: AnyObject!, completionHandler completion: ((NSError!) -> Void)!)
}
To
class HMCharacteristicWriteAction : HMAction {
    convenience init()
    init(characteristic characteristic: HMCharacteristic, targetValue targetValue: NSCopying)
    var characteristic: HMCharacteristic { get }
    @NSCopying var targetValue: NSCopying { get }
    func updateTargetValue(_ targetValue: NSCopying, completionHandler completion: (NSError?) -> Void)
}

Declaration
From
var characteristic: HMCharacteristic! { get }
To
var characteristic: HMCharacteristic { get }

Declaration
From
init!(characteristic characteristic: HMCharacteristic!, targetValue targetValue: AnyObject!)
To
init(characteristic characteristic: HMCharacteristic, targetValue targetValue: NSCopying)

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

Declaration
From
func updateTargetValue(_ targetValue: AnyObject!, completionHandler completion: ((NSError!) -> Void)!)
To
func updateTargetValue(_ targetValue: NSCopying, completionHandler completion: (NSError?) -> Void)

DeclarationProtocolsIntroductionRaw Value Type
From
enum HMErrorCode : Int {
    case AlreadyExists
    case NotFound
    case InvalidParameter
    case AccessoryNotReachable
    case ReadOnlyCharacteristic
    case WriteOnlyCharacteristic
    case NotificationNotSupported
    case OperationTimedOut
    case AccessoryPoweredOff
    case AccessDenied
    case ObjectAssociatedToAnotherHome
    case ObjectNotAssociatedToAnyHome
    case ObjectAlreadyAssociatedToHome
    case AccessoryIsBusy
    case OperationInProgress
    case AccessoryOutOfResources
    case InsufficientPrivileges
    case AccessoryPairingFailed
    case InvalidDataFormatSpecified
    case NilParameter
    case UnconfiguredParameter
    case InvalidClass
    case OperationCancelled
    case RoomForHomeCannotBeInZone
    case NoActionsInActionSet
    case NoRegisteredActionSets
    case MissingParameter
    case FireDateInPast
    case RoomForHomeCannotBeUpdated
    case ActionInAnotherActionSet
    case ObjectWithSimilarNameExistsInHome
    case HomeWithSimilarNameExists
    case RenameWithSimilarName
    case CannotRemoveNonBridgeAccessory
    case NameContainsProhibitedCharacters
    case NameDoesNotStartWithValidCharacters
    case UserIDNotEmailAddress
    case UserDeclinedAddingUser
    case UserDeclinedRemovingUser
    case UserDeclinedInvite
    case UserManagementFailed
    case RecurrenceTooSmall
    case InvalidValueType
    case ValueLowerThanMinimum
    case ValueHigherThanMaximum
    case StringLongerThanMaximum
    case HomeAccessNotAuthorized
    case OperationNotSupported
    case MaximumObjectLimitReached
    case AccessorySentInvalidResponse
    case StringShorterThanMinimum
    case GenericError
    case SecurityFailure
    case CommunicationFailure
    case MessageAuthenticationFailed
    case InvalidMessageSize
    case AccessoryDiscoveryFailed
    case ClientRequestError
    case AccessoryResponseError
    case NameDoesNotEndWithValidCharacters
    case AccessoryIsBlocked
    case InvalidAssociatedServiceType
    case ActionSetExecutionFailed
    case ActionSetExecutionPartialSuccess
    case ActionSetExecutionInProgress
    case AccessoryOutOfCompliance
    case DataResetFailure
    case NotificationAlreadyEnabled
    case RecurrenceMustBeOnSpecifiedBoundaries
    case DateMustBeOnSpecifiedBoundaries
    case CannotActivateTriggerTooFarInFuture
    case RecurrenceTooLarge
    case ReadWritePartialSuccess
    case ReadWriteFailure
    case NotSignedIntoiCloud
    case KeychainSyncNotEnabled
    case CloudDataSyncInProgress
    case NetworkUnavailable
    case AddAccessoryFailed
    case MissingEntitlement
    case CannotUnblockNonBridgeAccessory
    case DeviceLocked
}
Equatable, Hashable, RawRepresentableiOS 8.1--
To
enum HMErrorCode : Int {
    case AlreadyExists
    case NotFound
    case InvalidParameter
    case AccessoryNotReachable
    case ReadOnlyCharacteristic
    case WriteOnlyCharacteristic
    case NotificationNotSupported
    case OperationTimedOut
    case AccessoryPoweredOff
    case AccessDenied
    case ObjectAssociatedToAnotherHome
    case ObjectNotAssociatedToAnyHome
    case ObjectAlreadyAssociatedToHome
    case AccessoryIsBusy
    case OperationInProgress
    case AccessoryOutOfResources
    case InsufficientPrivileges
    case AccessoryPairingFailed
    case InvalidDataFormatSpecified
    case NilParameter
    case UnconfiguredParameter
    case InvalidClass
    case OperationCancelled
    case RoomForHomeCannotBeInZone
    case NoActionsInActionSet
    case NoRegisteredActionSets
    case MissingParameter
    case FireDateInPast
    case RoomForHomeCannotBeUpdated
    case ActionInAnotherActionSet
    case ObjectWithSimilarNameExistsInHome
    case HomeWithSimilarNameExists
    case RenameWithSimilarName
    case CannotRemoveNonBridgeAccessory
    case NameContainsProhibitedCharacters
    case NameDoesNotStartWithValidCharacters
    case UserIDNotEmailAddress
    case UserDeclinedAddingUser
    case UserDeclinedRemovingUser
    case UserDeclinedInvite
    case UserManagementFailed
    case RecurrenceTooSmall
    case InvalidValueType
    case ValueLowerThanMinimum
    case ValueHigherThanMaximum
    case StringLongerThanMaximum
    case HomeAccessNotAuthorized
    case OperationNotSupported
    case MaximumObjectLimitReached
    case AccessorySentInvalidResponse
    case StringShorterThanMinimum
    case GenericError
    case SecurityFailure
    case CommunicationFailure
    case MessageAuthenticationFailed
    case InvalidMessageSize
    case AccessoryDiscoveryFailed
    case ClientRequestError
    case AccessoryResponseError
    case NameDoesNotEndWithValidCharacters
    case AccessoryIsBlocked
    case InvalidAssociatedServiceType
    case ActionSetExecutionFailed
    case ActionSetExecutionPartialSuccess
    case ActionSetExecutionInProgress
    case AccessoryOutOfCompliance
    case DataResetFailure
    case NotificationAlreadyEnabled
    case RecurrenceMustBeOnSpecifiedBoundaries
    case DateMustBeOnSpecifiedBoundaries
    case CannotActivateTriggerTooFarInFuture
    case RecurrenceTooLarge
    case ReadWritePartialSuccess
    case ReadWriteFailure
    case NotSignedIntoiCloud
    case KeychainSyncNotEnabled
    case CloudDataSyncInProgress
    case NetworkUnavailable
    case AddAccessoryFailed
    case MissingEntitlement
    case CannotUnblockNonBridgeAccessory
    case DeviceLocked
    case CannotRemoveBuiltinActionSet
    case LocationForHomeDisabled
    case NotAuthorizedForLocationServices
}
extension HMErrorCode : Hashable, Equatable, __BridgedNSError, ErrorType, RawRepresentable, _ObjectiveCBridgeableErrorType, _BridgedNSError {
}
extension HMErrorCode : Hashable, Equatable, __BridgedNSError, ErrorType, RawRepresentable, _ObjectiveCBridgeableErrorType, _BridgedNSError {
}
Equatable, ErrorType, Hashable, RawRepresentableiOS 8.0Int

Modified HMHome
Declaration
From
class HMHome : NSObject {
    init!()
    weak var delegate: HMHomeDelegate?
    var name: String! { get }
    var primary: Bool { get }
    func updateName(_ name: String!, completionHandler completion: ((NSError!) -> Void)!)
}
extension HMHome {
    var accessories: [AnyObject]! { get }
    func addAccessory(_ accessory: HMAccessory!, completionHandler completion: ((NSError!) -> Void)!)
    func removeAccessory(_ accessory: HMAccessory!, completionHandler completion: ((NSError!) -> Void)!)
    func assignAccessory(_ accessory: HMAccessory!, toRoom room: HMRoom!, completionHandler completion: ((NSError!) -> Void)!)
    func servicesWithTypes(_ serviceTypes: [AnyObject]!) -> [AnyObject]!
    func unblockAccessory(_ accessory: HMAccessory!, completionHandler completion: ((NSError!) -> Void)!)
}
extension HMHome {
    var users: [AnyObject]! { get }
    func addUserWithCompletionHandler(_ completion: ((HMUser!, NSError!) -> Void)!)
    func removeUser(_ user: HMUser!, completionHandler completion: ((NSError!) -> Void)!)
}
extension HMHome {
    var rooms: [AnyObject]! { get }
    func addRoomWithName(_ roomName: String!, completionHandler completion: ((HMRoom!, NSError!) -> Void)!)
    func removeRoom(_ room: HMRoom!, completionHandler completion: ((NSError!) -> Void)!)
    func roomForEntireHome() -> HMRoom!
}
extension HMHome {
    var zones: [AnyObject]! { get }
    func addZoneWithName(_ zoneName: String!, completionHandler completion: ((HMZone!, NSError!) -> Void)!)
    func removeZone(_ zone: HMZone!, completionHandler completion: ((NSError!) -> Void)!)
}
extension HMHome {
    var serviceGroups: [AnyObject]! { get }
    func addServiceGroupWithName(_ serviceGroupName: String!, completionHandler completion: ((HMServiceGroup!, NSError!) -> Void)!)
    func removeServiceGroup(_ group: HMServiceGroup!, completionHandler completion: ((NSError!) -> Void)!)
}
extension HMHome {
    var actionSets: [AnyObject]! { get }
    func addActionSetWithName(_ actionSetName: String!, completionHandler completion: ((HMActionSet!, NSError!) -> Void)!)
    func removeActionSet(_ actionSet: HMActionSet!, completionHandler completion: ((NSError!) -> Void)!)
    func executeActionSet(_ actionSet: HMActionSet!, completionHandler completion: ((NSError!) -> Void)!)
}
extension HMHome {
    var triggers: [AnyObject]! { get }
    func addTrigger(_ trigger: HMTrigger!, completionHandler completion: ((NSError!) -> Void)!)
    func removeTrigger(_ trigger: HMTrigger!, completionHandler completion: ((NSError!) -> Void)!)
}
To
class HMHome : NSObject {
    init()
    weak var delegate: HMHomeDelegate?
    var name: String { get }
    var primary: Bool { get }
    @NSCopying var uniqueIdentifier: NSUUID { get }
    func updateName(_ name: String, completionHandler completion: (NSError?) -> Void)
}
extension HMHome {
    var accessories: [HMAccessory] { get }
    func addAccessory(_ accessory: HMAccessory, completionHandler completion: (NSError?) -> Void)
    func removeAccessory(_ accessory: HMAccessory, completionHandler completion: (NSError?) -> Void)
    func assignAccessory(_ accessory: HMAccessory, toRoom room: HMRoom, completionHandler completion: (NSError?) -> Void)
    func servicesWithTypes(_ serviceTypes: [String]) -> [HMService]?
    func unblockAccessory(_ accessory: HMAccessory, completionHandler completion: (NSError?) -> Void)
}
extension HMHome {
    var currentUser: HMUser { get }
    var users: [HMUser] { get }
    func manageUsersWithCompletionHandler(_ completion: (NSError?) -> Void)
    func addUserWithCompletionHandler(_ completion: (HMUser?, NSError?) -> Void)
    func removeUser(_ user: HMUser, completionHandler completion: (NSError?) -> Void)
    func homeAccessControlForUser(_ user: HMUser) -> HMHomeAccessControl
}
extension HMHome {
    var rooms: [HMRoom] { get }
    func addRoomWithName(_ roomName: String, completionHandler completion: (HMRoom?, NSError?) -> Void)
    func removeRoom(_ room: HMRoom, completionHandler completion: (NSError?) -> Void)
    func roomForEntireHome() -> HMRoom
}
extension HMHome {
    var zones: [HMZone] { get }
    func addZoneWithName(_ zoneName: String, completionHandler completion: (HMZone?, NSError?) -> Void)
    func removeZone(_ zone: HMZone, completionHandler completion: (NSError?) -> Void)
}
extension HMHome {
    var serviceGroups: [HMServiceGroup] { get }
    func addServiceGroupWithName(_ serviceGroupName: String, completionHandler completion: (HMServiceGroup?, NSError?) -> Void)
    func removeServiceGroup(_ group: HMServiceGroup, completionHandler completion: (NSError?) -> Void)
}
extension HMHome {
    var actionSets: [HMActionSet] { get }
    func addActionSetWithName(_ actionSetName: String, completionHandler completion: (HMActionSet?, NSError?) -> Void)
    func removeActionSet(_ actionSet: HMActionSet, completionHandler completion: (NSError?) -> Void)
    func executeActionSet(_ actionSet: HMActionSet, completionHandler completion: (NSError?) -> Void)
    func builtinActionSetOfType(_ actionSetType: String) -> HMActionSet?
}
extension HMHome {
    var triggers: [HMTrigger] { get }
    func addTrigger(_ trigger: HMTrigger, completionHandler completion: (NSError?) -> Void)
    func removeTrigger(_ trigger: HMTrigger, completionHandler completion: (NSError?) -> Void)
}

Declaration
From
var accessories: [AnyObject]! { get }
To
var accessories: [HMAccessory] { get }

Declaration
From
var actionSets: [AnyObject]! { get }
To
var actionSets: [HMActionSet] { get }

Declaration
From
func addAccessory(_ accessory: HMAccessory!, completionHandler completion: ((NSError!) -> Void)!)
To
func addAccessory(_ accessory: HMAccessory, completionHandler completion: (NSError?) -> Void)

Declaration
From
func addActionSetWithName(_ actionSetName: String!, completionHandler completion: ((HMActionSet!, NSError!) -> Void)!)
To
func addActionSetWithName(_ actionSetName: String, completionHandler completion: (HMActionSet?, NSError?) -> Void)

Declaration
From
func addRoomWithName(_ roomName: String!, completionHandler completion: ((HMRoom!, NSError!) -> Void)!)
To
func addRoomWithName(_ roomName: String, completionHandler completion: (HMRoom?, NSError?) -> Void)

Declaration
From
func addServiceGroupWithName(_ serviceGroupName: String!, completionHandler completion: ((HMServiceGroup!, NSError!) -> Void)!)
To
func addServiceGroupWithName(_ serviceGroupName: String, completionHandler completion: (HMServiceGroup?, NSError?) -> Void)

Declaration
From
func addTrigger(_ trigger: HMTrigger!, completionHandler completion: ((NSError!) -> Void)!)
To
func addTrigger(_ trigger: HMTrigger, completionHandler completion: (NSError?) -> Void)

DeclarationDeprecation
From
func addUserWithCompletionHandler(_ completion: ((HMUser!, NSError!) -> Void)!)
--
To
func addUserWithCompletionHandler(_ completion: (HMUser?, NSError?) -> Void)
iOS 9.0

Declaration
From
func addZoneWithName(_ zoneName: String!, completionHandler completion: ((HMZone!, NSError!) -> Void)!)
To
func addZoneWithName(_ zoneName: String, completionHandler completion: (HMZone?, NSError?) -> Void)

Declaration
From
func assignAccessory(_ accessory: HMAccessory!, toRoom room: HMRoom!, completionHandler completion: ((NSError!) -> Void)!)
To
func assignAccessory(_ accessory: HMAccessory, toRoom room: HMRoom, completionHandler completion: (NSError?) -> Void)

Declaration
From
func executeActionSet(_ actionSet: HMActionSet!, completionHandler completion: ((NSError!) -> Void)!)
To
func executeActionSet(_ actionSet: HMActionSet, completionHandler completion: (NSError?) -> Void)

Modified HMHome.name
Declaration
From
var name: String! { get }
To
var name: String { get }

Declaration
From
func removeAccessory(_ accessory: HMAccessory!, completionHandler completion: ((NSError!) -> Void)!)
To
func removeAccessory(_ accessory: HMAccessory, completionHandler completion: (NSError?) -> Void)

Declaration
From
func removeActionSet(_ actionSet: HMActionSet!, completionHandler completion: ((NSError!) -> Void)!)
To
func removeActionSet(_ actionSet: HMActionSet, completionHandler completion: (NSError?) -> Void)

Declaration
From
func removeRoom(_ room: HMRoom!, completionHandler completion: ((NSError!) -> Void)!)
To
func removeRoom(_ room: HMRoom, completionHandler completion: (NSError?) -> Void)

Declaration
From
func removeServiceGroup(_ group: HMServiceGroup!, completionHandler completion: ((NSError!) -> Void)!)
To
func removeServiceGroup(_ group: HMServiceGroup, completionHandler completion: (NSError?) -> Void)

Declaration
From
func removeTrigger(_ trigger: HMTrigger!, completionHandler completion: ((NSError!) -> Void)!)
To
func removeTrigger(_ trigger: HMTrigger, completionHandler completion: (NSError?) -> Void)

DeclarationDeprecation
From
func removeUser(_ user: HMUser!, completionHandler completion: ((NSError!) -> Void)!)
--
To
func removeUser(_ user: HMUser, completionHandler completion: (NSError?) -> Void)
iOS 9.0

Declaration
From
func removeZone(_ zone: HMZone!, completionHandler completion: ((NSError!) -> Void)!)
To
func removeZone(_ zone: HMZone, completionHandler completion: (NSError?) -> Void)

Declaration
From
func roomForEntireHome() -> HMRoom!
To
func roomForEntireHome() -> HMRoom

Modified HMHome.rooms
Declaration
From
var rooms: [AnyObject]! { get }
To
var rooms: [HMRoom] { get }

Declaration
From
var serviceGroups: [AnyObject]! { get }
To
var serviceGroups: [HMServiceGroup] { get }

Declaration
From
func servicesWithTypes(_ serviceTypes: [AnyObject]!) -> [AnyObject]!
To
func servicesWithTypes(_ serviceTypes: [String]) -> [HMService]?

Declaration
From
var triggers: [AnyObject]! { get }
To
var triggers: [HMTrigger] { get }

Declaration
From
func unblockAccessory(_ accessory: HMAccessory!, completionHandler completion: ((NSError!) -> Void)!)
To
func unblockAccessory(_ accessory: HMAccessory, completionHandler completion: (NSError?) -> Void)

Declaration
From
func updateName(_ name: String!, completionHandler completion: ((NSError!) -> Void)!)
To
func updateName(_ name: String, completionHandler completion: (NSError?) -> Void)

Modified HMHome.users
DeclarationDeprecation
From
var users: [AnyObject]! { get }
--
To
var users: [HMUser] { get }
iOS 9.0

Modified HMHome.zones
Declaration
From
var zones: [AnyObject]! { get }
To
var zones: [HMZone] { get }

Declaration
From
protocol HMHomeDelegate : NSObjectProtocol {
    optional func homeDidUpdateName(_ home: HMHome)
    optional func home(_ home: HMHome, didAddAccessory accessory: HMAccessory!)
    optional func home(_ home: HMHome, didRemoveAccessory accessory: HMAccessory!)
    optional func home(_ home: HMHome, didAddUser user: HMUser!)
    optional func home(_ home: HMHome, didRemoveUser user: HMUser!)
    optional func home(_ home: HMHome, didUpdateRoom room: HMRoom!, forAccessory accessory: HMAccessory!)
    optional func home(_ home: HMHome, didAddRoom room: HMRoom!)
    optional func home(_ home: HMHome, didRemoveRoom room: HMRoom!)
    optional func home(_ home: HMHome, didUpdateNameForRoom room: HMRoom!)
    optional func home(_ home: HMHome, didAddZone zone: HMZone!)
    optional func home(_ home: HMHome, didRemoveZone zone: HMZone!)
    optional func home(_ home: HMHome, didUpdateNameForZone zone: HMZone!)
    optional func home(_ home: HMHome, didAddRoom room: HMRoom!, toZone zone: HMZone!)
    optional func home(_ home: HMHome, didRemoveRoom room: HMRoom!, fromZone zone: HMZone!)
    optional func home(_ home: HMHome, didAddServiceGroup group: HMServiceGroup!)
    optional func home(_ home: HMHome, didRemoveServiceGroup group: HMServiceGroup!)
    optional func home(_ home: HMHome, didUpdateNameForServiceGroup group: HMServiceGroup!)
    optional func home(_ home: HMHome, didAddService service: HMService!, toServiceGroup group: HMServiceGroup!)
    optional func home(_ home: HMHome, didRemoveService service: HMService!, fromServiceGroup group: HMServiceGroup!)
    optional func home(_ home: HMHome, didAddActionSet actionSet: HMActionSet!)
    optional func home(_ home: HMHome, didRemoveActionSet actionSet: HMActionSet!)
    optional func home(_ home: HMHome, didUpdateNameForActionSet actionSet: HMActionSet!)
    optional func home(_ home: HMHome, didUpdateActionsForActionSet actionSet: HMActionSet!)
    optional func home(_ home: HMHome, didAddTrigger trigger: HMTrigger!)
    optional func home(_ home: HMHome, didRemoveTrigger trigger: HMTrigger!)
    optional func home(_ home: HMHome, didUpdateNameForTrigger trigger: HMTrigger!)
    optional func home(_ home: HMHome, didUpdateTrigger trigger: HMTrigger!)
    optional func home(_ home: HMHome, didUnblockAccessory accessory: HMAccessory!)
    optional func home(_ home: HMHome, didEncounterError error: NSError!, forAccessory accessory: HMAccessory!)
}
To
protocol HMHomeDelegate : NSObjectProtocol {
    optional func homeDidUpdateName(_ home: HMHome)
    optional func home(_ home: HMHome, didAddAccessory accessory: HMAccessory)
    optional func home(_ home: HMHome, didRemoveAccessory accessory: HMAccessory)
    optional func home(_ home: HMHome, didAddUser user: HMUser)
    optional func home(_ home: HMHome, didRemoveUser user: HMUser)
    optional func home(_ home: HMHome, didUpdateRoom room: HMRoom, forAccessory accessory: HMAccessory)
    optional func home(_ home: HMHome, didAddRoom room: HMRoom)
    optional func home(_ home: HMHome, didRemoveRoom room: HMRoom)
    optional func home(_ home: HMHome, didUpdateNameForRoom room: HMRoom)
    optional func home(_ home: HMHome, didAddZone zone: HMZone)
    optional func home(_ home: HMHome, didRemoveZone zone: HMZone)
    optional func home(_ home: HMHome, didUpdateNameForZone zone: HMZone)
    optional func home(_ home: HMHome, didAddRoom room: HMRoom, toZone zone: HMZone)
    optional func home(_ home: HMHome, didRemoveRoom room: HMRoom, fromZone zone: HMZone)
    optional func home(_ home: HMHome, didAddServiceGroup group: HMServiceGroup)
    optional func home(_ home: HMHome, didRemoveServiceGroup group: HMServiceGroup)
    optional func home(_ home: HMHome, didUpdateNameForServiceGroup group: HMServiceGroup)
    optional func home(_ home: HMHome, didAddService service: HMService, toServiceGroup group: HMServiceGroup)
    optional func home(_ home: HMHome, didRemoveService service: HMService, fromServiceGroup group: HMServiceGroup)
    optional func home(_ home: HMHome, didAddActionSet actionSet: HMActionSet)
    optional func home(_ home: HMHome, didRemoveActionSet actionSet: HMActionSet)
    optional func home(_ home: HMHome, didUpdateNameForActionSet actionSet: HMActionSet)
    optional func home(_ home: HMHome, didUpdateActionsForActionSet actionSet: HMActionSet)
    optional func home(_ home: HMHome, didAddTrigger trigger: HMTrigger)
    optional func home(_ home: HMHome, didRemoveTrigger trigger: HMTrigger)
    optional func home(_ home: HMHome, didUpdateNameForTrigger trigger: HMTrigger)
    optional func home(_ home: HMHome, didUpdateTrigger trigger: HMTrigger)
    optional func home(_ home: HMHome, didUnblockAccessory accessory: HMAccessory)
    optional func home(_ home: HMHome, didEncounterError error: NSError, forAccessory accessory: HMAccessory)
}

Declaration
From
optional func home(_ home: HMHome, didAddAccessory accessory: HMAccessory!)
To
optional func home(_ home: HMHome, didAddAccessory accessory: HMAccessory)

Declaration
From
optional func home(_ home: HMHome, didAddActionSet actionSet: HMActionSet!)
To
optional func home(_ home: HMHome, didAddActionSet actionSet: HMActionSet)

Declaration
From
optional func home(_ home: HMHome, didAddRoom room: HMRoom!)
To
optional func home(_ home: HMHome, didAddRoom room: HMRoom)

Declaration
From
optional func home(_ home: HMHome, didAddRoom room: HMRoom!, toZone zone: HMZone!)
To
optional func home(_ home: HMHome, didAddRoom room: HMRoom, toZone zone: HMZone)

Declaration
From
optional func home(_ home: HMHome, didAddService service: HMService!, toServiceGroup group: HMServiceGroup!)
To
optional func home(_ home: HMHome, didAddService service: HMService, toServiceGroup group: HMServiceGroup)

Declaration
From
optional func home(_ home: HMHome, didAddServiceGroup group: HMServiceGroup!)
To
optional func home(_ home: HMHome, didAddServiceGroup group: HMServiceGroup)

Declaration
From
optional func home(_ home: HMHome, didAddTrigger trigger: HMTrigger!)
To
optional func home(_ home: HMHome, didAddTrigger trigger: HMTrigger)

Declaration
From
optional func home(_ home: HMHome, didAddUser user: HMUser!)
To
optional func home(_ home: HMHome, didAddUser user: HMUser)

Declaration
From
optional func home(_ home: HMHome, didAddZone zone: HMZone!)
To
optional func home(_ home: HMHome, didAddZone zone: HMZone)

Declaration
From
optional func home(_ home: HMHome, didEncounterError error: NSError!, forAccessory accessory: HMAccessory!)
To
optional func home(_ home: HMHome, didEncounterError error: NSError, forAccessory accessory: HMAccessory)

Declaration
From
optional func home(_ home: HMHome, didRemoveAccessory accessory: HMAccessory!)
To
optional func home(_ home: HMHome, didRemoveAccessory accessory: HMAccessory)

Declaration
From
optional func home(_ home: HMHome, didRemoveActionSet actionSet: HMActionSet!)
To
optional func home(_ home: HMHome, didRemoveActionSet actionSet: HMActionSet)

Declaration
From
optional func home(_ home: HMHome, didRemoveRoom room: HMRoom!)
To
optional func home(_ home: HMHome, didRemoveRoom room: HMRoom)

Declaration
From
optional func home(_ home: HMHome, didRemoveRoom room: HMRoom!, fromZone zone: HMZone!)
To
optional func home(_ home: HMHome, didRemoveRoom room: HMRoom, fromZone zone: HMZone)

Declaration
From
optional func home(_ home: HMHome, didRemoveService service: HMService!, fromServiceGroup group: HMServiceGroup!)
To
optional func home(_ home: HMHome, didRemoveService service: HMService, fromServiceGroup group: HMServiceGroup)

Declaration
From
optional func home(_ home: HMHome, didRemoveServiceGroup group: HMServiceGroup!)
To
optional func home(_ home: HMHome, didRemoveServiceGroup group: HMServiceGroup)

Declaration
From
optional func home(_ home: HMHome, didRemoveTrigger trigger: HMTrigger!)
To
optional func home(_ home: HMHome, didRemoveTrigger trigger: HMTrigger)

Declaration
From
optional func home(_ home: HMHome, didRemoveUser user: HMUser!)
To
optional func home(_ home: HMHome, didRemoveUser user: HMUser)

Declaration
From
optional func home(_ home: HMHome, didRemoveZone zone: HMZone!)
To
optional func home(_ home: HMHome, didRemoveZone zone: HMZone)

Declaration
From
optional func home(_ home: HMHome, didUnblockAccessory accessory: HMAccessory!)
To
optional func home(_ home: HMHome, didUnblockAccessory accessory: HMAccessory)

Declaration
From
optional func home(_ home: HMHome, didUpdateActionsForActionSet actionSet: HMActionSet!)
To
optional func home(_ home: HMHome, didUpdateActionsForActionSet actionSet: HMActionSet)

Declaration
From
optional func home(_ home: HMHome, didUpdateNameForActionSet actionSet: HMActionSet!)
To
optional func home(_ home: HMHome, didUpdateNameForActionSet actionSet: HMActionSet)

Declaration
From
optional func home(_ home: HMHome, didUpdateNameForRoom room: HMRoom!)
To
optional func home(_ home: HMHome, didUpdateNameForRoom room: HMRoom)

Declaration
From
optional func home(_ home: HMHome, didUpdateNameForServiceGroup group: HMServiceGroup!)
To
optional func home(_ home: HMHome, didUpdateNameForServiceGroup group: HMServiceGroup)

Declaration
From
optional func home(_ home: HMHome, didUpdateNameForTrigger trigger: HMTrigger!)
To
optional func home(_ home: HMHome, didUpdateNameForTrigger trigger: HMTrigger)

Declaration
From
optional func home(_ home: HMHome, didUpdateNameForZone zone: HMZone!)
To
optional func home(_ home: HMHome, didUpdateNameForZone zone: HMZone)

Declaration
From
optional func home(_ home: HMHome, didUpdateRoom room: HMRoom!, forAccessory accessory: HMAccessory!)
To
optional func home(_ home: HMHome, didUpdateRoom room: HMRoom, forAccessory accessory: HMAccessory)

Declaration
From
optional func home(_ home: HMHome, didUpdateTrigger trigger: HMTrigger!)
To
optional func home(_ home: HMHome, didUpdateTrigger trigger: HMTrigger)

Modified HMHomeManager
Declaration
From
class HMHomeManager : NSObject {
    weak var delegate: HMHomeManagerDelegate?
    var primaryHome: HMHome! { get }
    var homes: [AnyObject]! { get }
    func updatePrimaryHome(_ home: HMHome!, completionHandler completion: ((NSError!) -> Void)!)
    func addHomeWithName(_ homeName: String!, completionHandler completion: ((HMHome!, NSError!) -> Void)!)
    func removeHome(_ home: HMHome!, completionHandler completion: ((NSError!) -> Void)!)
}
To
class HMHomeManager : NSObject {
    weak var delegate: HMHomeManagerDelegate?
    var primaryHome: HMHome? { get }
    var homes: [HMHome] { get }
    func updatePrimaryHome(_ home: HMHome, completionHandler completion: (NSError?) -> Void)
    func addHomeWithName(_ homeName: String, completionHandler completion: (HMHome?, NSError?) -> Void)
    func removeHome(_ home: HMHome, completionHandler completion: (NSError?) -> Void)
}

Declaration
From
func addHomeWithName(_ homeName: String!, completionHandler completion: ((HMHome!, NSError!) -> Void)!)
To
func addHomeWithName(_ homeName: String, completionHandler completion: (HMHome?, NSError?) -> Void)

Declaration
From
var homes: [AnyObject]! { get }
To
var homes: [HMHome] { get }

Declaration
From
var primaryHome: HMHome! { get }
To
var primaryHome: HMHome? { get }

Declaration
From
func removeHome(_ home: HMHome!, completionHandler completion: ((NSError!) -> Void)!)
To
func removeHome(_ home: HMHome, completionHandler completion: (NSError?) -> Void)

Declaration
From
func updatePrimaryHome(_ home: HMHome!, completionHandler completion: ((NSError!) -> Void)!)
To
func updatePrimaryHome(_ home: HMHome, completionHandler completion: (NSError?) -> Void)

Declaration
From
protocol HMHomeManagerDelegate : NSObjectProtocol {
    optional func homeManagerDidUpdateHomes(_ manager: HMHomeManager)
    optional func homeManagerDidUpdatePrimaryHome(_ manager: HMHomeManager)
    optional func homeManager(_ manager: HMHomeManager, didAddHome home: HMHome!)
    optional func homeManager(_ manager: HMHomeManager, didRemoveHome home: HMHome!)
}
To
protocol HMHomeManagerDelegate : NSObjectProtocol {
    optional func homeManagerDidUpdateHomes(_ manager: HMHomeManager)
    optional func homeManagerDidUpdatePrimaryHome(_ manager: HMHomeManager)
    optional func homeManager(_ manager: HMHomeManager, didAddHome home: HMHome)
    optional func homeManager(_ manager: HMHomeManager, didRemoveHome home: HMHome)
}

Declaration
From
optional func homeManager(_ manager: HMHomeManager, didAddHome home: HMHome!)
To
optional func homeManager(_ manager: HMHomeManager, didAddHome home: HMHome)

Declaration
From
optional func homeManager(_ manager: HMHomeManager, didRemoveHome home: HMHome!)
To
optional func homeManager(_ manager: HMHomeManager, didRemoveHome home: HMHome)

Modified HMRoom
Declaration
From
class HMRoom : NSObject {
    init!()
    var name: String! { get }
    var accessories: [AnyObject]! { get }
    func updateName(_ name: String!, completionHandler completion: ((NSError!) -> Void)!)
}
To
class HMRoom : NSObject {
    init()
    var name: String { get }
    var accessories: [HMAccessory] { get }
    @NSCopying var uniqueIdentifier: NSUUID { get }
    func updateName(_ name: String, completionHandler completion: (NSError?) -> Void)
}

Declaration
From
var accessories: [AnyObject]! { get }
To
var accessories: [HMAccessory] { get }

Modified HMRoom.name
Declaration
From
var name: String! { get }
To
var name: String { get }

Declaration
From
func updateName(_ name: String!, completionHandler completion: ((NSError!) -> Void)!)
To
func updateName(_ name: String, completionHandler completion: (NSError?) -> Void)

Modified HMService
Declaration
From
class HMService : NSObject {
    weak var accessory: HMAccessory! { get }
    var serviceType: String! { get }
    var name: String! { get }
    var associatedServiceType: String! { get }
    var characteristics: [AnyObject]! { get }
    func updateName(_ name: String!, completionHandler completion: ((NSError!) -> Void)!)
    func updateAssociatedServiceType(_ serviceType: String!, completionHandler completion: ((NSError!) -> Void)!)
}
To
class HMService : NSObject {
    weak var accessory: HMAccessory? { get }
    var serviceType: String { get }
    var localizedDescription: String { get }
    var name: String { get }
    var associatedServiceType: String? { get }
    var characteristics: [HMCharacteristic] { get }
    @NSCopying var uniqueIdentifier: NSUUID { get }
    var userInteractive: Bool { get }
    func updateName(_ name: String, completionHandler completion: (NSError?) -> Void)
    func updateAssociatedServiceType(_ serviceType: String?, completionHandler completion: (NSError?) -> Void)
}

Declaration
From
weak var accessory: HMAccessory! { get }
To
weak var accessory: HMAccessory? { get }

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

Declaration
From
var characteristics: [AnyObject]! { get }
To
var characteristics: [HMCharacteristic] { get }

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

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

Declaration
From
func updateAssociatedServiceType(_ serviceType: String!, completionHandler completion: ((NSError!) -> Void)!)
To
func updateAssociatedServiceType(_ serviceType: String?, completionHandler completion: (NSError?) -> Void)

Declaration
From
func updateName(_ name: String!, completionHandler completion: ((NSError!) -> Void)!)
To
func updateName(_ name: String, completionHandler completion: (NSError?) -> Void)

Declaration
From
class HMServiceGroup : NSObject {
    init!()
    var name: String! { get }
    var services: [AnyObject]! { get }
    func updateName(_ name: String!, completionHandler completion: ((NSError!) -> Void)!)
    func addService(_ service: HMService!, completionHandler completion: ((NSError!) -> Void)!)
    func removeService(_ service: HMService!, completionHandler completion: ((NSError!) -> Void)!)
}
To
class HMServiceGroup : NSObject {
    init()
    var name: String { get }
    var services: [HMService] { get }
    @NSCopying var uniqueIdentifier: NSUUID { get }
    func updateName(_ name: String, completionHandler completion: (NSError?) -> Void)
    func addService(_ service: HMService, completionHandler completion: (NSError?) -> Void)
    func removeService(_ service: HMService, completionHandler completion: (NSError?) -> Void)
}

Declaration
From
func addService(_ service: HMService!, completionHandler completion: ((NSError!) -> Void)!)
To
func addService(_ service: HMService, completionHandler completion: (NSError?) -> Void)

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

Declaration
From
func removeService(_ service: HMService!, completionHandler completion: ((NSError!) -> Void)!)
To
func removeService(_ service: HMService, completionHandler completion: (NSError?) -> Void)

Declaration
From
var services: [AnyObject]! { get }
To
var services: [HMService] { get }

Declaration
From
func updateName(_ name: String!, completionHandler completion: ((NSError!) -> Void)!)
To
func updateName(_ name: String, completionHandler completion: (NSError?) -> Void)

Declaration
From
class HMTimerTrigger : HMTrigger {
    convenience init!()
    init!(name name: String!, fireDate fireDate: NSDate!, timeZone timeZone: NSTimeZone!, recurrence recurrence: NSDateComponents!, recurrenceCalendar recurrenceCalendar: NSCalendar!)
    @NSCopying var fireDate: NSDate! { get }
    @NSCopying var timeZone: NSTimeZone! { get }
    @NSCopying var recurrence: NSDateComponents! { get }
    @NSCopying var recurrenceCalendar: NSCalendar! { get }
    func updateFireDate(_ fireDate: NSDate!, completionHandler completion: ((NSError!) -> Void)!)
    func updateTimeZone(_ timeZone: NSTimeZone!, completionHandler completion: ((NSError!) -> Void)!)
    func updateRecurrence(_ recurrence: NSDateComponents!, completionHandler completion: ((NSError!) -> Void)!)
}
To
class HMTimerTrigger : HMTrigger {
    convenience init()
    init(name name: String, fireDate fireDate: NSDate, timeZone timeZone: NSTimeZone?, recurrence recurrence: NSDateComponents?, recurrenceCalendar recurrenceCalendar: NSCalendar?)
    @NSCopying var fireDate: NSDate { get }
    @NSCopying var timeZone: NSTimeZone? { get }
    @NSCopying var recurrence: NSDateComponents? { get }
    @NSCopying var recurrenceCalendar: NSCalendar? { get }
    func updateFireDate(_ fireDate: NSDate, completionHandler completion: (NSError?) -> Void)
    func updateTimeZone(_ timeZone: NSTimeZone?, completionHandler completion: (NSError?) -> Void)
    func updateRecurrence(_ recurrence: NSDateComponents?, completionHandler completion: (NSError?) -> Void)
}

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

Declaration
From
init!(name name: String!, fireDate fireDate: NSDate!, timeZone timeZone: NSTimeZone!, recurrence recurrence: NSDateComponents!, recurrenceCalendar recurrenceCalendar: NSCalendar!)
To
init(name name: String, fireDate fireDate: NSDate, timeZone timeZone: NSTimeZone?, recurrence recurrence: NSDateComponents?, recurrenceCalendar recurrenceCalendar: NSCalendar?)

Declaration
From
@NSCopying var recurrence: NSDateComponents! { get }
To
@NSCopying var recurrence: NSDateComponents? { get }

Declaration
From
@NSCopying var recurrenceCalendar: NSCalendar! { get }
To
@NSCopying var recurrenceCalendar: NSCalendar? { get }

Declaration
From
@NSCopying var timeZone: NSTimeZone! { get }
To
@NSCopying var timeZone: NSTimeZone? { get }

Declaration
From
func updateFireDate(_ fireDate: NSDate!, completionHandler completion: ((NSError!) -> Void)!)
To
func updateFireDate(_ fireDate: NSDate, completionHandler completion: (NSError?) -> Void)

Declaration
From
func updateRecurrence(_ recurrence: NSDateComponents!, completionHandler completion: ((NSError!) -> Void)!)
To
func updateRecurrence(_ recurrence: NSDateComponents?, completionHandler completion: (NSError?) -> Void)

Declaration
From
func updateTimeZone(_ timeZone: NSTimeZone!, completionHandler completion: ((NSError!) -> Void)!)
To
func updateTimeZone(_ timeZone: NSTimeZone?, completionHandler completion: (NSError?) -> Void)

Modified HMTrigger
Declaration
From
class HMTrigger : NSObject {
    init!()
    var name: String! { get }
    var enabled: Bool { get }
    var actionSets: [AnyObject]! { get }
    @NSCopying var lastFireDate: NSDate! { get }
    func updateName(_ name: String!, completionHandler completion: ((NSError!) -> Void)!)
    func addActionSet(_ actionSet: HMActionSet!, completionHandler completion: ((NSError!) -> Void)!)
    func removeActionSet(_ actionSet: HMActionSet!, completionHandler completion: ((NSError!) -> Void)!)
    func enable(_ enable: Bool, completionHandler completion: ((NSError!) -> Void)!)
}
To
class HMTrigger : NSObject {
    init()
    var name: String { get }
    var enabled: Bool { get }
    var actionSets: [HMActionSet] { get }
    @NSCopying var lastFireDate: NSDate? { get }
    @NSCopying var uniqueIdentifier: NSUUID { get }
    func updateName(_ name: String, completionHandler completion: (NSError?) -> Void)
    func addActionSet(_ actionSet: HMActionSet, completionHandler completion: (NSError?) -> Void)
    func removeActionSet(_ actionSet: HMActionSet, completionHandler completion: (NSError?) -> Void)
    func enable(_ enable: Bool, completionHandler completion: (NSError?) -> Void)
}

Declaration
From
var actionSets: [AnyObject]! { get }
To
var actionSets: [HMActionSet] { get }

Declaration
From
func addActionSet(_ actionSet: HMActionSet!, completionHandler completion: ((NSError!) -> Void)!)
To
func addActionSet(_ actionSet: HMActionSet, completionHandler completion: (NSError?) -> Void)

Declaration
From
func enable(_ enable: Bool, completionHandler completion: ((NSError!) -> Void)!)
To
func enable(_ enable: Bool, completionHandler completion: (NSError?) -> Void)

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

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

Declaration
From
func removeActionSet(_ actionSet: HMActionSet!, completionHandler completion: ((NSError!) -> Void)!)
To
func removeActionSet(_ actionSet: HMActionSet, completionHandler completion: (NSError?) -> Void)

Declaration
From
func updateName(_ name: String!, completionHandler completion: ((NSError!) -> Void)!)
To
func updateName(_ name: String, completionHandler completion: (NSError?) -> Void)

Modified HMUser
Declaration
From
class HMUser : NSObject {
    init!()
    var name: String! { get }
}
To
class HMUser : NSObject {
    init()
    var name: String { get }
    @NSCopying var uniqueIdentifier: NSUUID { get }
}

Modified HMUser.name
Declaration
From
var name: String! { get }
To
var name: String { get }

Modified HMZone
Declaration
From
class HMZone : NSObject {
    init!()
    var name: String! { get }
    var rooms: [AnyObject]! { get }
    func updateName(_ name: String!, completionHandler completion: ((NSError!) -> Void)!)
    func addRoom(_ room: HMRoom!, completionHandler completion: ((NSError!) -> Void)!)
    func removeRoom(_ room: HMRoom!, completionHandler completion: ((NSError!) -> Void)!)
}
To
class HMZone : NSObject {
    init()
    var name: String { get }
    var rooms: [HMRoom] { get }
    @NSCopying var uniqueIdentifier: NSUUID { get }
    func updateName(_ name: String, completionHandler completion: (NSError?) -> Void)
    func addRoom(_ room: HMRoom, completionHandler completion: (NSError?) -> Void)
    func removeRoom(_ room: HMRoom, completionHandler completion: (NSError?) -> Void)
}

Declaration
From
func addRoom(_ room: HMRoom!, completionHandler completion: ((NSError!) -> Void)!)
To
func addRoom(_ room: HMRoom, completionHandler completion: (NSError?) -> Void)

Modified HMZone.name
Declaration
From
var name: String! { get }
To
var name: String { get }

Declaration
From
func removeRoom(_ room: HMRoom!, completionHandler completion: ((NSError!) -> Void)!)
To
func removeRoom(_ room: HMRoom, completionHandler completion: (NSError?) -> Void)

Modified HMZone.rooms
Declaration
From
var rooms: [AnyObject]! { get }
To
var rooms: [HMRoom] { get }

Declaration
From
func updateName(_ name: String!, completionHandler completion: ((NSError!) -> Void)!)
To
func updateName(_ name: String, completionHandler completion: (NSError?) -> Void)