diff --git a/AferoSwiftSDK.podspec b/AferoSwiftSDK.podspec index 3649849..ac7bbfc 100644 --- a/AferoSwiftSDK.podspec +++ b/AferoSwiftSDK.podspec @@ -2,7 +2,7 @@ Pod::Spec.new do |s| s.name = "AferoSwiftSDK" s.module_name = "Afero" - s.version = "1.5.0" + s.version = "1.5.1" s.summary = "Library for interacting with Afero devices" s.description = <<-DESC @@ -21,7 +21,7 @@ Pod::Spec.new do |s| s.subspec 'Core' do |ss| ss.source_files = "AferoSwiftSDK/Core/**/*" - ss.dependency 'AferoSofthub', '~> 1.8' + ss.dependency 'AferoSofthub', '~> 1.8.4' ss.dependency 'CocoaLumberjack/Swift', '~> 3.7.4' ss.dependency 'CryptoSwift', '1.5.1' ss.dependency 'CocoaZ', '~> 1.4' diff --git a/AferoSwiftSDK/Core/AferoSofthub+Utils.swift b/AferoSwiftSDK/Core/AferoSofthub+Utils.swift index 037cca4..b47d6f2 100644 --- a/AferoSwiftSDK/Core/AferoSofthub+Utils.swift +++ b/AferoSwiftSDK/Core/AferoSofthub+Utils.swift @@ -166,6 +166,7 @@ public typealias SofthubAssociationHandler = (String) -> Void public typealias SofthubAssociationStatus = AferoSofthubAssociationStatus public typealias SofthubSetupModeDeviceDetectedHandler = AferoSofthubSetupModeDeviceDetectedHandler +public typealias SofthubSetupModeDeviceGoneHandler = (String) -> Void /// A Swift wrapper around the Afero softhub software. This is the lowest-level /// interface available to non-Afero developers. @@ -338,6 +339,7 @@ public typealias SofthubSetupModeDeviceDetectedHandler = AferoSofthubSetupModeDe logLevel: AferoSofthubLogLevel, associationHandler: @escaping SofthubAssociationHandler, setupModeDeviceDetectedHandler: @escaping SofthubSetupModeDeviceDetectedHandler = { _, _, _ in }, + setupModeDeviceGoneHandler: @escaping SofthubSetupModeDeviceGoneHandler, completionHandler: @escaping (SofthubCompletionReason)->Void ) { @@ -365,6 +367,7 @@ public typealias SofthubSetupModeDeviceDetectedHandler = AferoSofthubSetupModeDe hardwareIdentifier: identifier, associationHandler: localAssociationHandler, setupModeDeviceDetectedHandler: setupModeDeviceDetectedHandler, + setupModeDeviceGoneHandler: setupModeDeviceGoneHandler, completionHandler: localCompletionHandler ) @@ -453,6 +456,7 @@ public typealias SofthubSetupModeDeviceDetectedHandler = AferoSofthubSetupModeDe logLevel: AferoSofthubLogLevel, associationHandler: @escaping SofthubAssociationHandler, setupModeDeviceDetectedHandler: @escaping SofthubSetupModeDeviceDetectedHandler = { _, _, _ in }, + setupModeDeviceGoneHandler: @escaping SofthubSetupModeDeviceGoneHandler, completionHandler: @escaping (SofthubCompletionReason)->Void ) { @@ -481,6 +485,7 @@ public typealias SofthubSetupModeDeviceDetectedHandler = AferoSofthubSetupModeDe hardwareIdentifier: identifier, associationHandler: localAssociationHandler, setupModeDeviceDetectedHandler: setupModeDeviceDetectedHandler, + setupModeDeviceGoneHandler: setupModeDeviceGoneHandler, completionHandler: localCompletionHandler ) diff --git a/Examples/AferoLab/AferoLab/SofthubMinder.swift b/Examples/AferoLab/AferoLab/SofthubMinder.swift index 1cfb5a5..1b2b42b 100644 --- a/Examples/AferoLab/AferoLab/SofthubMinder.swift +++ b/Examples/AferoLab/AferoLab/SofthubMinder.swift @@ -192,6 +192,10 @@ extension DeviceModelable { setupModeDeviceDetectedHandler: @escaping SofthubSetupModeDeviceDetectedHandler = { deviceId, associationId, profileVersion in DDLogInfo("Softhub detected setup mode deviceId:\(deviceId) associationId:\(associationId) profileVersion:\(profileVersion)"); + }, + setupModeDeviceGoneHandler: @escaping SofthubSetupModeDeviceGoneHandler = { + deviceId in + DDLogInfo("Softhub setup mode deviceId:\(deviceId) gone"); } ) { @@ -212,6 +216,7 @@ extension DeviceModelable { logLevel: logLevel, associationHandler: associationNeededHandler, setupModeDeviceDetectedHandler: setupModeDeviceDetectedHandler, + setupModeDeviceGoneHandler: setupModeDeviceGoneHandler, completionHandler: { completionReason in DDLogInfo("Softhub stopped with status \(String(reflecting: completionReason))") @@ -229,6 +234,7 @@ extension DeviceModelable { logLevel: logLevel, associationHandler: associationNeededHandler, setupModeDeviceDetectedHandler: setupModeDeviceDetectedHandler, + setupModeDeviceGoneHandler: setupModeDeviceGoneHandler, completionHandler: { completionReason in DDLogInfo("Softhub stopped with status \(String(reflecting: completionReason))") diff --git a/Examples/Podfile b/Examples/Podfile index a9e00d3..edee5b9 100644 --- a/Examples/Podfile +++ b/Examples/Podfile @@ -56,8 +56,7 @@ target 'AferoLab' do pod 'QRCodeReader.swift', '~> 10.0.0' pod 'LKAlertController', '1.12.2' pod 'AppAuth', '1.4.0' - pod 'AferoSofthub', '1.8.0' - # :path => '../../AferoSofthub' + pod 'AferoSofthub', '1.8.4' end diff --git a/Examples/Podfile.lock b/Examples/Podfile.lock index f2b88ab..0d0341e 100644 --- a/Examples/Podfile.lock +++ b/Examples/Podfile.lock @@ -1,11 +1,11 @@ PODS: - - AferoSofthub (1.8.0) - - AferoSwiftSDK/AFNetworking (1.5.0): + - AferoSofthub (1.8.4) + - AferoSwiftSDK/AFNetworking (1.5.1): - AferoSwiftSDK/Core - AFNetworking/NSURLSession (~> 3.1) - AFOAuth2Manager (~> 3.0) - - AferoSwiftSDK/Core (1.5.0): - - AferoSofthub (~> 1.8) + - AferoSwiftSDK/Core (1.5.1): + - AferoSofthub (~> 1.8.4) - CocoaLumberjack/Swift (~> 3.7.4) - CocoaZ (~> 1.4) - CryptoSwift (= 1.5.1) @@ -57,7 +57,7 @@ PODS: - SVProgressHUD (1.1.3) DEPENDENCIES: - - AferoSofthub (= 1.8.0) + - AferoSofthub (= 1.8.4) - AferoSwiftSDK/AFNetworking (from `..`) - AFNetworking/NSURLSession - AppAuth (= 1.4.0) @@ -101,8 +101,8 @@ EXTERNAL SOURCES: :path: ".." SPEC CHECKSUMS: - AferoSofthub: 6a8585924132c4b245282638573442fad992b7dc - AferoSwiftSDK: 4746ad9e9ec539af6323193891601d7039791d9e + AferoSofthub: 1841b341e764f1109ccb790cb0ea3284079f41ce + AferoSwiftSDK: 3a40a92e9f2f9c0c515118901c4ebd3cce2ab05e AFNetworking: b6f891fdfaed196b46c7a83cf209e09697b94057 AFOAuth2Manager: 0566da1be64883e339813d411229fdc9a84dab7c AppAuth: 31bcec809a638d7bd2f86ea8a52bd45f6e81e7c7 @@ -121,6 +121,6 @@ SPEC CHECKSUMS: RSEnvironment: 653f92019569ef8fb5005d4bb34cd1ccaf50727f SVProgressHUD: 748080e4f36e603f6c02aec292664239df5279c1 -PODFILE CHECKSUM: cc6ba4062e0887422dda799946d7b31dec932099 +PODFILE CHECKSUM: fb6851e88ea038781869f6dae2e4158e24660a59 COCOAPODS: 1.11.3