diff --git a/apps/ios/Shared/ContentView.swift b/apps/ios/Shared/ContentView.swift index cd9d89423..f2e67c4aa 100644 --- a/apps/ios/Shared/ContentView.swift +++ b/apps/ios/Shared/ContentView.swift @@ -196,7 +196,7 @@ struct ContentView: View { userAuthorized = false let laMode = privacyLocalAuthModeDefault.get() authenticate(reason: NSLocalizedString("Unlock app", comment: "authentication reason"), selfDestruct: true) { laResult in - logger.debug("authenticate callback: \(String(describing: laResult))") + logger.debug("DEBUGGING: authenticate callback: \(String(describing: laResult))") switch (laResult) { case .success: userAuthorized = true diff --git a/apps/ios/Shared/Views/Helpers/LocalAuthenticationUtils.swift b/apps/ios/Shared/Views/Helpers/LocalAuthenticationUtils.swift index d9b1bfed3..7a90a3f83 100644 --- a/apps/ios/Shared/Views/Helpers/LocalAuthenticationUtils.swift +++ b/apps/ios/Shared/Views/Helpers/LocalAuthenticationUtils.swift @@ -37,7 +37,7 @@ struct LocalAuthRequest { } func authenticate(title: LocalizedStringKey? = nil, reason: String, selfDestruct: Bool = false, completed: @escaping (LAResult) -> Void) { - logger.debug("authenticate") + logger.debug("DEBUGGING: authenticate") switch privacyLocalAuthModeDefault.get() { case .system: systemAuthenticate(reason, completed) case .passcode: @@ -58,21 +58,24 @@ func authenticate(title: LocalizedStringKey? = nil, reason: String, selfDestruct } func systemAuthenticate(_ reason: String, _ completed: @escaping (LAResult) -> Void) { + logger.debug("DEBUGGING: systemAuthenticate") let laContext = LAContext() var authAvailabilityError: NSError? if laContext.canEvaluatePolicy(.deviceOwnerAuthentication, error: &authAvailabilityError) { + logger.debug("DEBUGGING: systemAuthenticate: canEvaluatePolicy callback") laContext.evaluatePolicy(.deviceOwnerAuthentication, localizedReason: reason) { success, authError in + logger.debug("DEBUGGING: systemAuthenticate evaluatePolicy callback") DispatchQueue.main.async { if success { completed(LAResult.success) } else { - logger.error("authentication error: \(authError.debugDescription)") + logger.error("DEBUGGING: systemAuthenticate authentication error: \(authError.debugDescription)") completed(LAResult.failed(authError: authError?.localizedDescription)) } } } } else { - logger.error("authentication availability error: \(authAvailabilityError.debugDescription)") + logger.error("DEBUGGING: authentication availability error: \(authAvailabilityError.debugDescription)") completed(LAResult.unavailable(authError: authAvailabilityError?.localizedDescription)) } } diff --git a/apps/ios/SimpleX.xcodeproj/project.pbxproj b/apps/ios/SimpleX.xcodeproj/project.pbxproj index 9baa73181..cb908cbab 100644 --- a/apps/ios/SimpleX.xcodeproj/project.pbxproj +++ b/apps/ios/SimpleX.xcodeproj/project.pbxproj @@ -1478,7 +1478,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = "SimpleX (iOS).entitlements"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 158; + CURRENT_PROJECT_VERSION = 159; DEVELOPMENT_TEAM = 5NN7GUYB6T; ENABLE_BITCODE = NO; ENABLE_PREVIEWS = YES; @@ -1520,7 +1520,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = "SimpleX (iOS).entitlements"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 158; + CURRENT_PROJECT_VERSION = 159; DEVELOPMENT_TEAM = 5NN7GUYB6T; ENABLE_BITCODE = NO; ENABLE_PREVIEWS = YES; @@ -1600,7 +1600,7 @@ CODE_SIGN_ENTITLEMENTS = "SimpleX NSE/SimpleX NSE.entitlements"; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 158; + CURRENT_PROJECT_VERSION = 159; DEVELOPMENT_TEAM = 5NN7GUYB6T; ENABLE_BITCODE = NO; GENERATE_INFOPLIST_FILE = YES; @@ -1632,7 +1632,7 @@ CODE_SIGN_ENTITLEMENTS = "SimpleX NSE/SimpleX NSE.entitlements"; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 158; + CURRENT_PROJECT_VERSION = 159; DEVELOPMENT_TEAM = 5NN7GUYB6T; ENABLE_BITCODE = NO; GENERATE_INFOPLIST_FILE = YES; @@ -1664,7 +1664,7 @@ APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ENABLE_MODULES = YES; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 158; + CURRENT_PROJECT_VERSION = 159; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = 5NN7GUYB6T; DYLIB_COMPATIBILITY_VERSION = 1; @@ -1710,7 +1710,7 @@ APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ENABLE_MODULES = YES; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 158; + CURRENT_PROJECT_VERSION = 159; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = 5NN7GUYB6T; DYLIB_COMPATIBILITY_VERSION = 1;