diff --git a/.swift-version b/.swift-version index a3ec5a4..bf77d54 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -3.2 +4.2 diff --git a/TJBioAuthentication.podspec b/TJBioAuthentication.podspec index a0fdb82..bcecc2c 100644 --- a/TJBioAuthentication.podspec +++ b/TJBioAuthentication.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TJBioAuthentication' - s.version = '1.1.0' + s.version = '1.2.0' s.summary = 'Apple biometric authentication for Touch ID and Face ID.' s.description = 'Apple biometric authentication for Touch ID and Face ID. Now you can authenticate with Apple Face ID or Touch ID' diff --git a/TJBioAuthentication/TJBioAuthentication.xcodeproj/project.pbxproj b/TJBioAuthentication/TJBioAuthentication.xcodeproj/project.pbxproj index 1d6cb94..6302037 100644 --- a/TJBioAuthentication/TJBioAuthentication.xcodeproj/project.pbxproj +++ b/TJBioAuthentication/TJBioAuthentication.xcodeproj/project.pbxproj @@ -127,6 +127,7 @@ TargetAttributes = { B854ECE51FACC5FD006225B0 = { CreatedOnToolsVersion = 9.0; + LastSwiftMigration = 1010; ProvisioningStyle = Automatic; }; }; @@ -321,7 +322,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.jalsa.TJBioAuthentication; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -337,7 +338,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.jalsa.TJBioAuthentication; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; diff --git a/TJBioAuthentication/TJBioAuthentication/AppDelegate.swift b/TJBioAuthentication/TJBioAuthentication/AppDelegate.swift index 53db6b9..6a8d964 100644 --- a/TJBioAuthentication/TJBioAuthentication/AppDelegate.swift +++ b/TJBioAuthentication/TJBioAuthentication/AppDelegate.swift @@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } diff --git a/TJBioAuthentication/TJBioAuthentication/BioAuth/TJBioAuthenticator.swift b/TJBioAuthentication/TJBioAuthentication/BioAuth/TJBioAuthenticator.swift index b55814a..0627983 100644 --- a/TJBioAuthentication/TJBioAuthentication/BioAuth/TJBioAuthenticator.swift +++ b/TJBioAuthentication/TJBioAuthentication/BioAuth/TJBioAuthenticator.swift @@ -62,7 +62,7 @@ public extension TJBioAuthenticator { // Biometric authentication - func authenticateUserWithBiometrics(reason: String = "", fallbackTitle: String? = "", cancelTitle: String? = "", success successBlock:@escaping AuthenticationSuccess, failure failureBlock:@escaping AuthenticationFailure){ + func authenticateUserWithBiometrics(reason: String = "", fallbackTitle: String? = "", cancelTitle: String? = "", success successBlock:@escaping AuthenticationSuccess, failure failureBlock:@escaping AuthenticationFailure) { let reasonString = reason.isEmpty ? TJBioAuthenticator.shared.defaultBiometricAuthenticationReason() : reason let context = LAContext() @@ -117,8 +117,7 @@ extension TJBioAuthenticator { } // MARK:- Get default messages -extension TJBioAuthenticator -{ +extension TJBioAuthenticator { // get default bio authentication reason func defaultBiometricAuthenticationReason() -> String { return TJDefaultMessages.defaultReasonMessage.rawValue diff --git a/TJBioAuthentication/TJBioAuthentication/BioAuth/TJDefaultMessages.swift b/TJBioAuthentication/TJBioAuthentication/BioAuth/TJDefaultMessages.swift index 0df4075..5fe8db2 100644 --- a/TJBioAuthentication/TJBioAuthentication/BioAuth/TJDefaultMessages.swift +++ b/TJBioAuthentication/TJBioAuthentication/BioAuth/TJDefaultMessages.swift @@ -27,8 +27,7 @@ import Foundation import UIKit -enum TJDefaultMessages : String -{ +enum TJDefaultMessages : String { case defaultReasonMessage = "Authentication is needed to access your app." case lockoutReasonMessage = "Too many failed attempts." }