Skip to content

Commit

Permalink
Issue-42, Updates hubby and implements missing interface functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Arnberg committed Oct 5, 2022
1 parent 398dd53 commit feb0972
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 12 deletions.
4 changes: 2 additions & 2 deletions AferoSwiftSDK.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'
Expand Down
5 changes: 5 additions & 0 deletions AferoSwiftSDK/Core/AferoSofthub+Utils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -338,6 +339,7 @@ public typealias SofthubSetupModeDeviceDetectedHandler = AferoSofthubSetupModeDe
logLevel: AferoSofthubLogLevel,
associationHandler: @escaping SofthubAssociationHandler,
setupModeDeviceDetectedHandler: @escaping SofthubSetupModeDeviceDetectedHandler = { _, _, _ in },
setupModeDeviceGoneHandler: @escaping SofthubSetupModeDeviceGoneHandler,
completionHandler: @escaping (SofthubCompletionReason)->Void
) {

Expand Down Expand Up @@ -365,6 +367,7 @@ public typealias SofthubSetupModeDeviceDetectedHandler = AferoSofthubSetupModeDe
hardwareIdentifier: identifier,
associationHandler: localAssociationHandler,
setupModeDeviceDetectedHandler: setupModeDeviceDetectedHandler,
setupModeDeviceGoneHandler: setupModeDeviceGoneHandler,
completionHandler: localCompletionHandler
)

Expand Down Expand Up @@ -453,6 +456,7 @@ public typealias SofthubSetupModeDeviceDetectedHandler = AferoSofthubSetupModeDe
logLevel: AferoSofthubLogLevel,
associationHandler: @escaping SofthubAssociationHandler,
setupModeDeviceDetectedHandler: @escaping SofthubSetupModeDeviceDetectedHandler = { _, _, _ in },
setupModeDeviceGoneHandler: @escaping SofthubSetupModeDeviceGoneHandler,
completionHandler: @escaping (SofthubCompletionReason)->Void
) {

Expand Down Expand Up @@ -481,6 +485,7 @@ public typealias SofthubSetupModeDeviceDetectedHandler = AferoSofthubSetupModeDe
hardwareIdentifier: identifier,
associationHandler: localAssociationHandler,
setupModeDeviceDetectedHandler: setupModeDeviceDetectedHandler,
setupModeDeviceGoneHandler: setupModeDeviceGoneHandler,
completionHandler: localCompletionHandler
)

Expand Down
6 changes: 6 additions & 0 deletions Examples/AferoLab/AferoLab/SofthubMinder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
) {

Expand All @@ -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))")
Expand All @@ -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))")
Expand Down
3 changes: 1 addition & 2 deletions Examples/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
16 changes: 8 additions & 8 deletions Examples/Podfile.lock
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -101,8 +101,8 @@ EXTERNAL SOURCES:
:path: ".."

SPEC CHECKSUMS:
AferoSofthub: 6a8585924132c4b245282638573442fad992b7dc
AferoSwiftSDK: 4746ad9e9ec539af6323193891601d7039791d9e
AferoSofthub: 1841b341e764f1109ccb790cb0ea3284079f41ce
AferoSwiftSDK: 3a40a92e9f2f9c0c515118901c4ebd3cce2ab05e
AFNetworking: b6f891fdfaed196b46c7a83cf209e09697b94057
AFOAuth2Manager: 0566da1be64883e339813d411229fdc9a84dab7c
AppAuth: 31bcec809a638d7bd2f86ea8a52bd45f6e81e7c7
Expand All @@ -121,6 +121,6 @@ SPEC CHECKSUMS:
RSEnvironment: 653f92019569ef8fb5005d4bb34cd1ccaf50727f
SVProgressHUD: 748080e4f36e603f6c02aec292664239df5279c1

PODFILE CHECKSUM: cc6ba4062e0887422dda799946d7b31dec932099
PODFILE CHECKSUM: fb6851e88ea038781869f6dae2e4158e24660a59

COCOAPODS: 1.11.3

0 comments on commit feb0972

Please sign in to comment.