Skip to content

Commit

Permalink
Merge pull request #6 from tejas-ardeshna/swift4.2
Browse files Browse the repository at this point in the history
Swift 4.2 support
  • Loading branch information
tejas-ardeshna authored Dec 28, 2018
2 parents 40f7ef7 + e703296 commit cb4e529
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2
4.2
2 changes: 1 addition & 1 deletion TJBioAuthentication.podspec
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
TargetAttributes = {
B854ECE51FACC5FD006225B0 = {
CreatedOnToolsVersion = 9.0;
LastSwiftMigration = 1010;
ProvisioningStyle = Automatic;
};
};
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion TJBioAuthentication/TJBioAuthentication/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}
Expand Down

0 comments on commit cb4e529

Please sign in to comment.