Skip to content

Commit

Permalink
Update to the Anyline Tire Tread SDK v8.0.0 (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
measure-team-anyline authored Oct 10, 2024
1 parent bc59071 commit 25b3416
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
12 changes: 6 additions & 6 deletions Anyline Tire Demo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,11 @@
6B913234A2737D8FD555BDED /* ShowGuidanceSettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShowGuidanceSettingsView.swift; sourceTree = "<group>"; };
6E20CCB2348A1D5779AD369D /* ATDTextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ATDTextField.swift; sourceTree = "<group>"; };
743A1DCAF06FD21B53070DE9 /* ResultDetailsViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ResultDetailsViewModel.swift; sourceTree = "<group>"; };
7806B02B24D5CA9894554DDF /* ProximaNova-Light.otf */ = {isa = PBXFileReference; path = "ProximaNova-Light.otf"; sourceTree = "<group>"; };
7806B02B24D5CA9894554DDF /* ProximaNova-Light.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "ProximaNova-Light.otf"; sourceTree = "<group>"; };
79422290CE7EF2CD20C3D8EE /* SettingsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsViewController.swift; sourceTree = "<group>"; };
846F00A3CE42550CD5D87E5F /* LandingTextViewDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LandingTextViewDelegate.swift; sourceTree = "<group>"; };
898D068837A772FDC17C4F80 /* tiretread_sound_beep_too_close.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = tiretread_sound_beep_too_close.wav; sourceTree = "<group>"; };
8A35D4D3DBCB082A5C414DA4 /* ProximaNova-Bold.otf */ = {isa = PBXFileReference; path = "ProximaNova-Bold.otf"; sourceTree = "<group>"; };
8A35D4D3DBCB082A5C414DA4 /* ProximaNova-Bold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "ProximaNova-Bold.otf"; sourceTree = "<group>"; };
8C50D0963153128DE17311B4 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
91A81A696C0FE10BADEDFFF0 /* ErrorView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ErrorView.swift; sourceTree = "<group>"; };
9305D03F418897C0AD10B90F /* tiretread_focuspoint_found.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = tiretread_focuspoint_found.wav; sourceTree = "<group>"; };
Expand All @@ -145,7 +145,7 @@
CBBFD690B0F8E473AD1285E8 /* VolumeButtonObserver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VolumeButtonObserver.swift; sourceTree = "<group>"; };
D5BA79536B6EEBE089971CDA /* ScanViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScanViewController.swift; sourceTree = "<group>"; };
D6FDFBEF38034A3F4671F98F /* UserDefaultsManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserDefaultsManager.swift; sourceTree = "<group>"; };
DB20B1D3E5DE027FAE19AD9F /* ProximaNova-Regular.otf */ = {isa = PBXFileReference; path = "ProximaNova-Regular.otf"; sourceTree = "<group>"; };
DB20B1D3E5DE027FAE19AD9F /* ProximaNova-Regular.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "ProximaNova-Regular.otf"; sourceTree = "<group>"; };
DBF323846DAEE03F621DBF05 /* ResultViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ResultViewController.swift; sourceTree = "<group>"; };
DE123729BEA35B442A4649EC /* LoadingButtonActionsDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingButtonActionsDelegate.swift; sourceTree = "<group>"; };
E0E627967E61F1B098CD294E /* ColorStruct.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorStruct.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -806,7 +806,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.10.0;
MARKETING_VERSION = 1.11.0;
PRODUCT_BUNDLE_IDENTIFIER = com.anyline.showcase.tiretread;
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = iphoneos;
Expand Down Expand Up @@ -899,7 +899,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.10.0;
MARKETING_VERSION = 1.11.0;
PRODUCT_BUNDLE_IDENTIFIER = com.anyline.showcase.tiretread;
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = iphoneos;
Expand Down Expand Up @@ -940,7 +940,7 @@
repositoryURL = "https://github.com/Anyline/anyline-tiretread-spm-module";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 7.0.0;
minimumVersion = 8.0.0;
};
};
4B5AEA5F9FCA6152FDAB044B /* XCRemoteSwiftPackageReference "SnapKit" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class RecorderViewController: UIViewController {

private func sendTireIdFeedback(uuid: String, tireId: String, qrViewController: QRCodeReaderViewController) {

AnylineTireTreadSdk.companion.sendTireIdFeedback(measurementUuid: uuid, tireId: tireId) { [weak self] (response: Response<MeasurementInfo>) in
AnylineTireTreadSdk.shared.sendTireIdFeedback(measurementUuid: uuid, tireId: tireId) { [weak self] (response: Response<MeasurementInfo>) in
switch(response) {
case _ as ResponseSuccess<MeasurementInfo>:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class LandingViewModel {
}

var isInitialized: Bool {
AnylineTireTreadSdk.companion.isInitialized
AnylineTireTreadSdk.shared.isInitialized
}

func tryInitializeSdk(context: UIViewController, completion: @escaping (Bool, String?) -> Void) {
Expand All @@ -31,7 +31,7 @@ class LandingViewModel {
return
}

try AnylineTireTreadSdk.companion.doInit(licenseKey: licenseString, context: context)
try AnylineTireTreadSdk.shared.doInit(licenseKey: licenseString)

if isInitialized {
completion(true, nil)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class LoadingViewModel {
}

private func fetchTreadDepthResult() {
AnylineTireTreadSdk.companion.getTreadDepthReportResult(measurementUuid: self.uuid, timeoutSeconds: 60) { [weak self] response in
AnylineTireTreadSdk.shared.getTreadDepthReportResult(measurementUuid: self.uuid, timeoutSeconds: 60) { [weak self] response in
guard let self = self else { return }

switch(response) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ResultDetailsViewModel {
private var uuid: String

// MARK: - Public Properties
private let anylineSDK = AnylineTireTreadSdk.companion
private let anylineSDK = AnylineTireTreadSdk.shared

// MARK: - Init
init(delegate: ResultDetailsViewModelDelegate, uuid: String) {
Expand All @@ -31,7 +31,7 @@ class ResultDetailsViewModel {
resultDetailsViewModelDelegate?.showError(error: "error.license.missing_key".localized())
return
}
try anylineSDK.doInit(licenseKey: licenceID, context: context)
try anylineSDK.doInit(licenseKey: licenceID)

anylineSDK.getTreadDepthReportPdf(measurementUuid: self.uuid) { response in
print("PDF fetched from SDK.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ extension ScanViewController: TireTreadScanViewCallback {
if let uuid = uuid {
var shouldRequestForFeedback: Bool = false
do {
shouldRequestForFeedback = try AnylineTireTreadSdk.companion.shouldRequestTireIdFeedback()
shouldRequestForFeedback = try AnylineTireTreadSdk.shared.shouldRequestTireIdFeedback()
} catch {
print("caught exception: \(error.localizedDescription)")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class SettingsViewModel {

func testLicenseKey(_ licenseKey: String, context: UIViewController) {
do {
try AnylineTireTreadSdk.companion.doInit(licenseKey: licenseKey, context: context)
try AnylineTireTreadSdk.shared.doInit(licenseKey: licenseKey)
requestPermissionsAndProceed(context: context)
} catch {
let errorMessage = "error.invalid_license".localized() + " (\(error.localizedDescription))"
Expand Down
2 changes: 1 addition & 1 deletion Anyline Tire Demo/Resources/System/SystemInfo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class SystemInfo {
}

static func getSDKVersion() -> String {
return AnylineTireTreadSdk.companion.sdkVersion
return AnylineTireTreadSdk.shared.sdkVersion
}

static func getDeviceName() -> String {
Expand Down

0 comments on commit 25b3416

Please sign in to comment.