Skip to content

Commit

Permalink
Merge pull request #229 from tangem/IOS-2502-remove-reuse-duration-in…
Browse files Browse the repository at this point in the history
…-card-sdk

IOS-2502 Removed reuseDuration from LAContext
  • Loading branch information
tureck1y authored Nov 12, 2022
2 parents 3b75358 + dcd2115 commit a0c4fd8
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 25 deletions.
4 changes: 0 additions & 4 deletions TangemSdk/TangemSdk.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,6 @@
B0EC650E260131220088F03D /* ReadWalletsListCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0EC650D260131220088F03D /* ReadWalletsListCommand.swift */; };
DA216CC0282E4D86003585B9 /* AccessCodeRepository.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA216CBF282E4D86003585B9 /* AccessCodeRepository.swift */; };
DC8B0E3F286F221D009D64F7 /* BiometricsUtil.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC8B0E3E286F221D009D64F7 /* BiometricsUtil.swift */; };
DC9FFF2C28B354EF0076BCDC /* LAContext+.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC9FFF2B28B354EF0076BCDC /* LAContext+.swift */; };
DCA9706628E35EAD0046E62E /* GenerateOTPCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCA9706528E35EAD0046E62E /* GenerateOTPCommand.swift */; };
DCEA3ABC2875AEBA00B0B0DA /* BiometricsStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCEA3ABB2875AEBA00B0B0DA /* BiometricsStorage.swift */; };
DCEA3ABE2875AF0F00B0B0DA /* SecureStorageKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCEA3ABD2875AF0F00B0B0DA /* SecureStorageKey.swift */; };
Expand Down Expand Up @@ -604,7 +603,6 @@
B0EC650D260131220088F03D /* ReadWalletsListCommand.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadWalletsListCommand.swift; sourceTree = "<group>"; };
DA216CBF282E4D86003585B9 /* AccessCodeRepository.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccessCodeRepository.swift; sourceTree = "<group>"; };
DC8B0E3E286F221D009D64F7 /* BiometricsUtil.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BiometricsUtil.swift; sourceTree = "<group>"; };
DC9FFF2B28B354EF0076BCDC /* LAContext+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "LAContext+.swift"; sourceTree = "<group>"; };
DCA9706528E35EAD0046E62E /* GenerateOTPCommand.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GenerateOTPCommand.swift; sourceTree = "<group>"; };
DCEA3ABB2875AEBA00B0B0DA /* BiometricsStorage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BiometricsStorage.swift; sourceTree = "<group>"; };
DCEA3ABD2875AF0F00B0B0DA /* SecureStorageKey.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecureStorageKey.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1304,7 +1302,6 @@
5D445B7D26E2A1F300F6F0FE /* CaseIterable+.swift */,
5DDA5DA226E95F2F00199274 /* Result+RAPDU.swift */,
5D04F9E126EF731B00D15F75 /* Publisher+.swift */,
DC9FFF2B28B354EF0076BCDC /* LAContext+.swift */,
);
path = Extensions;
sourceTree = "<group>";
Expand Down Expand Up @@ -1669,7 +1666,6 @@
5D270F2726A020DA00D2EDC1 /* WalletDataDeserializer.swift in Sources */,
5DA5B613233E11A50058C720 /* ResponseApdu.swift in Sources */,
5D503A40276A4411007B1C1A /* RoundedButtonStyle.swift in Sources */,
DC9FFF2C28B354EF0076BCDC /* LAContext+.swift in Sources */,
B0EC650E260131220088F03D /* ReadWalletsListCommand.swift in Sources */,
5DE43A5E26D4F45800ECA36A /* LinkPrimaryCardCommand.swift in Sources */,
5D86665627315F050095CC82 /* ResetCodesViewDelegate.swift in Sources */,
Expand Down
18 changes: 0 additions & 18 deletions TangemSdk/TangemSdk/Common/Extensions/LAContext+.swift

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import LocalAuthentication
/// Helper class for Keychain
@available(iOS 13.0, *)
public class BiometricsStorage {
private let context: LAContext = .default
private let context = LAContext()

public init() {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public final class BiometricsUtil {
public static var isAvailable: Bool {
var error: NSError?

let context = LAContext.default
let context = LAContext()
let result = context.canEvaluatePolicy(authenticationPolicy, error: &error)

if let error = error {
Expand All @@ -31,7 +31,7 @@ public final class BiometricsUtil {
/// - completion: Result<Void, TangemSdkError>
@available(iOS 13.0, *)
public static func requestAccess(localizedReason: String, completion: @escaping CompletionResult<LAContext>) {
let context = LAContext.default
let context = LAContext()

DispatchQueue.global().async {
context.evaluatePolicy(authenticationPolicy, localizedReason: localizedReason) { isSuccess, error in
Expand Down

0 comments on commit a0c4fd8

Please sign in to comment.