Skip to content

Commit

Permalink
PLA-6903: update to 0.11.0 (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanj-tyro authored May 23, 2024
1 parent 286dad9 commit c4899b7
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 19 deletions.
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ let package = Package(
]
),
.binaryTarget(name: "TyroTapToPaySDK",
url: "https://tap-to-pay.connect.tyro.com/tyro/0.10.0/TyroTapToPaySDK.xcframework.zip",
checksum: "093f7f324e34cc89f93664736811d198dc364afbd76b33057726fa8f979f7024"),
url: "https://tap-to-pay.connect.tyro.com/tyro/0.11.0/TyroTapToPaySDK.xcframework.zip",
checksum: "e94549b342d06b5dcd2197427f955c63fc9412aa05d95a1bc892285d52923bb3"),
.binaryTarget(name: "MobileConfiguration",
url: "https://tap-to-pay.connect.tyro.com/ss/1.0.8.0/SSMobileConfiguration.xcframework.zip",
checksum: "ee6a8513480b8c39125eab131e9df5e223d63e3005dbf34b52f36734f719b115"),
Expand Down
1 change: 1 addition & 0 deletions SampleApp.xcodeproj
35 changes: 35 additions & 0 deletions SampleApp/SampleApp/ViewModels/ContentViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,41 @@ class ContentViewModel: ObservableObject {
self.state = .ready
self.isConnected = true
}
} catch TapToPaySDKError.sessionInitialisationError(let errorMessage) {
await MainActor.run {
self.state = .error("sessionInitialisationError: \(errorMessage)")
}
} catch TapToPaySDKError.retryLimitExhausted(let error) {
await MainActor.run {
self.state = .error("retryLimitExhausted (connectionSecret): \(error.localizedDescription)")
}
} catch TapToPaySDKError.unableToConnectReader(let errorMessage) {
await MainActor.run {
self.state = .error("unableToConnectReader: \(errorMessage)")
}
} catch TapToPaySDKError.discoverReadersError {
await MainActor.run {
self.state = .error("discoverReadersError")
}
} catch TapToPaySDKError.sdkUpgradeRequiredError(let errorMessage) {
await MainActor.run {
self.state = .error("sdkUpgradeRequiredError: \(errorMessage)")
}
} catch TapToPaySDKError.fetchSessionCredentialsError(let error) {
await MainActor.run {
self.state = .error("fetchSessionCredentialsError: \(error.localizedDescription)")
}
} catch TapToPaySDKError.fetchSdkDataError(let errorMessage) {
await MainActor.run {
self.state = .error("fetchSdkDataError: \(errorMessage)")
}
} catch TapToPaySDKError.noProximityReaderFound {
await MainActor.run {
self.state = .error("noProximityReaderFound" +
"\n\n" +
"Please ensure you are using an iPhone with Tap to Pay on iPhone hardware capability (iPhone XS or above)"
)
}
} catch {
await MainActor.run {
self.state = .error(error.localizedDescription)
Expand Down
1 change: 1 addition & 0 deletions SampleApp/SampleApp/Views/ErrorView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ struct ErrorView: View {
Text(errorMessage)
.font(.title2)
.multilineTextAlignment(.center)
.padding(.horizontal)
}
.foregroundStyle(.red)
}
Expand Down
4 changes: 0 additions & 4 deletions TyroTapToPaySDK-iOS.xcworkspace/contents.xcworkspacedata

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit c4899b7

Please sign in to comment.