diff --git a/LeadKitAdditions/CommonCrypto/CommonCrypto.h b/LeadKitAdditions/CommonCrypto/CommonCrypto.h index def2316..94b806a 100644 --- a/LeadKitAdditions/CommonCrypto/CommonCrypto.h +++ b/LeadKitAdditions/CommonCrypto/CommonCrypto.h @@ -1,9 +1,23 @@ // -// CommonCrypto.h -// CommonCrypto +// Copyright (c) 2017 Touch Instinct // -// Created by Alexey Gerasimov on 25/04/2017. -// Copyright © 2017 TouchInstinct. All rights reserved. +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the Software), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. // #import diff --git a/LeadKitAdditions/CommonCrypto/CommonCrypto.xcconfig b/LeadKitAdditions/CommonCrypto/CommonCrypto.xcconfig index 080c4d8..995f1ce 100644 --- a/LeadKitAdditions/CommonCrypto/CommonCrypto.xcconfig +++ b/LeadKitAdditions/CommonCrypto/CommonCrypto.xcconfig @@ -1,10 +1,24 @@ // -// CommonCrypto.xcconfig -// Chat +// Copyright (c) 2017 Touch Instinct // -// Created by Alexey Gerasimov on 17/08/16. -// Copyright © 2016 Touch Instinct. All rights reserved. +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the Software), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. // MODULEMAP_FILE[sdk=iphoneos*] = $(SRCROOT)/CommonCrypto/iphoneos.modulemap -MODULEMAP_FILE[sdk=iphonesimulator*] = $(SRCROOT)/CommonCrypto/iphonesimulator.modulemap \ No newline at end of file +MODULEMAP_FILE[sdk=iphonesimulator*] = $(SRCROOT)/CommonCrypto/iphonesimulator.modulemap diff --git a/LeadKitAdditions/LeadKitAdditions/Controllers/PassCode/Model/PassCodeConfiguration.swift b/LeadKitAdditions/LeadKitAdditions/Controllers/PassCode/Model/PassCodeConfiguration.swift index 8682581..2635d02 100644 --- a/LeadKitAdditions/LeadKitAdditions/Controllers/PassCode/Model/PassCodeConfiguration.swift +++ b/LeadKitAdditions/LeadKitAdditions/Controllers/PassCode/Model/PassCodeConfiguration.swift @@ -38,8 +38,7 @@ public struct PassCodeConfiguration { } public static var defaultConfiguration: PassCodeConfiguration { - let passCodeConfiguration = PassCodeConfiguration() - return passCodeConfiguration + return PassCodeConfiguration() } } diff --git a/LeadKitAdditions/LeadKitAdditions/Controllers/PassCode/Model/PassCodeError.swift b/LeadKitAdditions/LeadKitAdditions/Controllers/PassCode/Model/PassCodeError.swift index 7001eb3..6fbcc8a 100644 --- a/LeadKitAdditions/LeadKitAdditions/Controllers/PassCode/Model/PassCodeError.swift +++ b/LeadKitAdditions/LeadKitAdditions/Controllers/PassCode/Model/PassCodeError.swift @@ -23,5 +23,5 @@ public enum PassCodeError: Error { case codesNotMatch case wrongCode - case tooMuchAttempts + case tooManyAttempts } diff --git a/LeadKitAdditions/LeadKitAdditions/Controllers/PassCode/ViewModel/BasePassCodeViewModel.swift b/LeadKitAdditions/LeadKitAdditions/Controllers/PassCode/ViewModel/BasePassCodeViewModel.swift index 8b26e4b..b476547 100644 --- a/LeadKitAdditions/LeadKitAdditions/Controllers/PassCode/ViewModel/BasePassCodeViewModel.swift +++ b/LeadKitAdditions/LeadKitAdditions/Controllers/PassCode/ViewModel/BasePassCodeViewModel.swift @@ -139,7 +139,7 @@ extension BasePassCodeViewModel { private var shouldUpdateControllerState: Bool { return !passCodeHolder.shouldValidate || !(validationResultHolder.value?.isValid ?? true) || - validationResultHolder.value?.error == .tooMuchAttempts + validationResultHolder.value?.error == .tooManyAttempts } private func validateIfNeeded() { @@ -158,7 +158,7 @@ extension BasePassCodeViewModel { if (!validationResult.isValid && attemptsNumber == Int(passCodeConfiguration.maxAttemptsLoginNumber)) || attemptsNumber > Int(passCodeConfiguration.maxAttemptsLoginNumber) { - validationResult = .inValid(.tooMuchAttempts) + validationResult = .inValid(.tooManyAttempts) } }