Merge branch 'master' into fix/general
This commit is contained in:
commit
3a104b1566
|
|
@ -1,3 +1,3 @@
|
|||
[submodule "code-quality"]
|
||||
path = code-quality
|
||||
url = https://github.com/TouchInstinct/code-quality-ios
|
||||
[submodule "build-scripts"]
|
||||
path = build-scripts
|
||||
url = git@github.com:TouchInstinct/BuildScripts.git
|
||||
|
|
|
|||
|
|
@ -10,10 +10,10 @@ Pod::Spec.new do |s|
|
|||
|
||||
s.subspec 'Core' do |ss|
|
||||
ss.ios.deployment_target = '9.0'
|
||||
ss.source_files = "LeadKitAdditions/Sources/**/*.swift"
|
||||
ss.source_files = "Sources/**/*.swift"
|
||||
|
||||
ss.exclude_files = [
|
||||
"LeadKitAdditions/Sources/Services/Network/DefaultNetworkService+ActivityIndicator+Extension.swift",
|
||||
"Sources/Services/Network/DefaultNetworkService+ActivityIndicator+Extension.swift",
|
||||
]
|
||||
|
||||
ss.dependency "LeadKit", '~> 0.6.0'
|
||||
|
|
@ -25,10 +25,10 @@ Pod::Spec.new do |s|
|
|||
|
||||
s.subspec 'Core-iOS-Extension' do |ss|
|
||||
ss.platform = :ios, '9.0'
|
||||
ss.source_files = "LeadKitAdditions/Sources/**/*.swift"
|
||||
ss.source_files = "Sources/**/*.swift"
|
||||
|
||||
ss.exclude_files = [
|
||||
"LeadKitAdditions/Sources/Services/Network/DefaultNetworkService+ActivityIndicator.swift",
|
||||
"Sources/Services/Network/DefaultNetworkService+ActivityIndicator.swift",
|
||||
]
|
||||
|
||||
ss.dependency "LeadKit/Core-iOS-Extension", '~> 0.6.0'
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@
|
|||
/* Begin PBXBuildFile section */
|
||||
0A08E37F1F2A13BF00F9AB62 /* CellTextFieldToolBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A08E37E1F2A13BF00F9AB62 /* CellTextFieldToolBar.swift */; };
|
||||
248389A288C0A6D7914F0546 /* Pods_LeadKitAdditions_LeadKitAdditions_iOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0ED4A1B793EAA73C9E95969F /* Pods_LeadKitAdditions_LeadKitAdditions_iOS.framework */; };
|
||||
678D26AA206935B900B05B93 /* BiometricsService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 678D26A9206935B900B05B93 /* BiometricsService.swift */; };
|
||||
67B4E6EB206941CE00E233EA /* BiometricsService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 678D26A9206935B900B05B93 /* BiometricsService.swift */; };
|
||||
A6CFB8D91F5024A500A42CC2 /* Error+NetworkingExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6CFB8D81F5024A500A42CC2 /* Error+NetworkingExtensions.swift */; };
|
||||
B326804BA6CC8B8BB136A46A /* Pods_LeadKitAdditions_LeadKitAdditions_iOS_Extensions.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CFD5627139CAB27705F75C07 /* Pods_LeadKitAdditions_LeadKitAdditions_iOS_Extensions.framework */; };
|
||||
CAE698E81E968820000394B0 /* LeadKitAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = CAE698E61E968820000394B0 /* LeadKitAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
|
|
@ -66,8 +68,6 @@
|
|||
ED0C34391F2906EC00FAE9FD /* DefaultNetworkService+ActivityIndicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED0C33F81F2906EC00FAE9FD /* DefaultNetworkService+ActivityIndicator.swift */; };
|
||||
ED0C343B1F2906EC00FAE9FD /* DefaultNetworkService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED0C33F91F2906EC00FAE9FD /* DefaultNetworkService.swift */; };
|
||||
ED0C343C1F2906EC00FAE9FD /* DefaultNetworkService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED0C33F91F2906EC00FAE9FD /* DefaultNetworkService.swift */; };
|
||||
ED0C343D1F2906EC00FAE9FD /* TouchIDService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED0C33FA1F2906EC00FAE9FD /* TouchIDService.swift */; };
|
||||
ED0C343E1F2906EC00FAE9FD /* TouchIDService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED0C33FA1F2906EC00FAE9FD /* TouchIDService.swift */; };
|
||||
ED0C343F1F2906EC00FAE9FD /* ValidationError.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED0C33FC1F2906EC00FAE9FD /* ValidationError.swift */; };
|
||||
ED0C34401F2906EC00FAE9FD /* ValidationError.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED0C33FC1F2906EC00FAE9FD /* ValidationError.swift */; };
|
||||
ED0C34411F2906EC00FAE9FD /* ValidationItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED0C33FD1F2906EC00FAE9FD /* ValidationItem.swift */; };
|
||||
|
|
@ -87,6 +87,7 @@
|
|||
0A08E37E1F2A13BF00F9AB62 /* CellTextFieldToolBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CellTextFieldToolBar.swift; sourceTree = "<group>"; };
|
||||
0ED4A1B793EAA73C9E95969F /* Pods_LeadKitAdditions_LeadKitAdditions_iOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LeadKitAdditions_LeadKitAdditions_iOS.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
49738551AC648B0AFA74E57F /* Pods-LeadKitAdditions-LeadKitAdditions iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LeadKitAdditions-LeadKitAdditions iOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-LeadKitAdditions-LeadKitAdditions iOS/Pods-LeadKitAdditions-LeadKitAdditions iOS.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
678D26A9206935B900B05B93 /* BiometricsService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BiometricsService.swift; sourceTree = "<group>"; };
|
||||
7B7F57C5E5275C4D8DC71992 /* Pods_LeadKitAdditions.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LeadKitAdditions.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
9D549FA5A7579702358E07DF /* Pods-LeadKitAdditions-LeadKitAdditions iOS Extensions.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LeadKitAdditions-LeadKitAdditions iOS Extensions.debug.xcconfig"; path = "Pods/Target Support Files/Pods-LeadKitAdditions-LeadKitAdditions iOS Extensions/Pods-LeadKitAdditions-LeadKitAdditions iOS Extensions.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
A6CFB8D81F5024A500A42CC2 /* Error+NetworkingExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Error+NetworkingExtensions.swift"; sourceTree = "<group>"; };
|
||||
|
|
@ -122,7 +123,6 @@
|
|||
ED0C33F71F2906EC00FAE9FD /* DefaultNetworkService+ActivityIndicator+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "DefaultNetworkService+ActivityIndicator+Extension.swift"; sourceTree = "<group>"; };
|
||||
ED0C33F81F2906EC00FAE9FD /* DefaultNetworkService+ActivityIndicator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "DefaultNetworkService+ActivityIndicator.swift"; sourceTree = "<group>"; };
|
||||
ED0C33F91F2906EC00FAE9FD /* DefaultNetworkService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DefaultNetworkService.swift; sourceTree = "<group>"; };
|
||||
ED0C33FA1F2906EC00FAE9FD /* TouchIDService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TouchIDService.swift; sourceTree = "<group>"; };
|
||||
ED0C33FC1F2906EC00FAE9FD /* ValidationError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ValidationError.swift; sourceTree = "<group>"; };
|
||||
ED0C33FD1F2906EC00FAE9FD /* ValidationItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ValidationItem.swift; sourceTree = "<group>"; };
|
||||
ED0C33FE1F2906EC00FAE9FD /* ValidationService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ValidationService.swift; sourceTree = "<group>"; };
|
||||
|
|
@ -296,7 +296,7 @@
|
|||
ED0C33F21F2906EC00FAE9FD /* BaseUserService.swift */,
|
||||
ED0C33F31F2906EC00FAE9FD /* CellFieldsJumpingService.swift */,
|
||||
ED0C33F41F2906EC00FAE9FD /* MaskFieldTextProxy.swift */,
|
||||
ED0C33FA1F2906EC00FAE9FD /* TouchIDService.swift */,
|
||||
678D26A9206935B900B05B93 /* BiometricsService.swift */,
|
||||
);
|
||||
path = Services;
|
||||
sourceTree = "<group>";
|
||||
|
|
@ -531,7 +531,7 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "if which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi";
|
||||
shellScript = ". build-scripts/xcode/build_phases/swiftlint.sh Sources";
|
||||
};
|
||||
E8E82E34792B38EF225575D7 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
|
|
@ -563,7 +563,7 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "if which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi";
|
||||
shellScript = ". build-scripts/xcode/build_phases/swiftlint.sh Sources";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
|
|
@ -576,10 +576,10 @@
|
|||
ED0C343B1F2906EC00FAE9FD /* DefaultNetworkService.swift in Sources */,
|
||||
ED0C34351F2906EC00FAE9FD /* ApiNetworkService.swift in Sources */,
|
||||
ED0C340F1F2906EC00FAE9FD /* PassCodeHolderProtocol.swift in Sources */,
|
||||
ED0C343D1F2906EC00FAE9FD /* TouchIDService.swift in Sources */,
|
||||
ED0C343F1F2906EC00FAE9FD /* ValidationError.swift in Sources */,
|
||||
ED0C342F1F2906EC00FAE9FD /* BaseUserService.swift in Sources */,
|
||||
ED0C34231F2906EC00FAE9FD /* CellFieldJumpingProtocol.swift in Sources */,
|
||||
678D26AA206935B900B05B93 /* BiometricsService.swift in Sources */,
|
||||
ED0C34411F2906EC00FAE9FD /* ValidationItem.swift in Sources */,
|
||||
ED0C341F1F2906EC00FAE9FD /* UIBarButtonItem+Extensions.swift in Sources */,
|
||||
ED0C34091F2906EC00FAE9FD /* PassCodeConfiguration.swift in Sources */,
|
||||
|
|
@ -618,7 +618,6 @@
|
|||
ED0C343C1F2906EC00FAE9FD /* DefaultNetworkService.swift in Sources */,
|
||||
ED0C34361F2906EC00FAE9FD /* ApiNetworkService.swift in Sources */,
|
||||
ED0C34101F2906EC00FAE9FD /* PassCodeHolderProtocol.swift in Sources */,
|
||||
ED0C343E1F2906EC00FAE9FD /* TouchIDService.swift in Sources */,
|
||||
ED0C34401F2906EC00FAE9FD /* ValidationError.swift in Sources */,
|
||||
ED0C34301F2906EC00FAE9FD /* BaseUserService.swift in Sources */,
|
||||
ED0C34241F2906EC00FAE9FD /* CellFieldJumpingProtocol.swift in Sources */,
|
||||
|
|
@ -629,6 +628,7 @@
|
|||
ED0C34381F2906EC00FAE9FD /* DefaultNetworkService+ActivityIndicator+Extension.swift in Sources */,
|
||||
ED0C341E1F2906EC00FAE9FD /* Observable+Extensions.swift in Sources */,
|
||||
ED0C34481F2906EC00FAE9FD /* CellTextFieldViewModel.swift in Sources */,
|
||||
67B4E6EB206941CE00E233EA /* BiometricsService.swift in Sources */,
|
||||
ED0C341A1F2906EC00FAE9FD /* ApiErrorProtocol.swift in Sources */,
|
||||
ED0C34141F2906EC00FAE9FD /* BasePassCodeViewController.swift in Sources */,
|
||||
ED0C342E1F2906EC00FAE9FD /* BasePassCodeService.swift in Sources */,
|
||||
|
|
@ -2,10 +2,11 @@ source "https://github.com/CocoaPods/Specs.git"
|
|||
source "https://github.com/TouchInstinct/Podspecs.git"
|
||||
|
||||
abstract_target 'LeadKitAdditions' do
|
||||
pod 'KeychainAccess', '3.1.0'
|
||||
pod 'IDZSwiftCommonCrypto'
|
||||
pod "KeychainAccess", '3.1.0'
|
||||
pod "IDZSwiftCommonCrypto"
|
||||
pod "InputMask", '3.0.0'
|
||||
pod "SwiftValidator", '5.0.0'
|
||||
pod "SwiftLint", '~> 0.25'
|
||||
|
||||
inhibit_all_warnings!
|
||||
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
PODS:
|
||||
- Alamofire (4.5.1)
|
||||
- Alamofire (4.7.0)
|
||||
- CocoaLumberjack/Default (3.3.0)
|
||||
- CocoaLumberjack/Swift (3.3.0):
|
||||
- CocoaLumberjack/Default
|
||||
- IDZSwiftCommonCrypto (0.10.0)
|
||||
- InputMask (3.0.0)
|
||||
- KeychainAccess (3.1.0)
|
||||
- LeadKit (0.6.5):
|
||||
- LeadKit/Core (= 0.6.5)
|
||||
- LeadKit/Core (0.6.5):
|
||||
- LeadKit (0.6.7):
|
||||
- LeadKit/Core (= 0.6.7)
|
||||
- LeadKit/Core (0.6.7):
|
||||
- CocoaLumberjack/Swift (~> 3.3.0)
|
||||
- ObjectMapper (~> 3.0.0)
|
||||
- RxAlamofire (= 4.0.0)
|
||||
|
|
@ -16,7 +16,7 @@ PODS:
|
|||
- RxSwift (= 4.0.0)
|
||||
- TableKit (~> 2.5.0)
|
||||
- UIScrollView-InfiniteScroll (~> 1.0.0)
|
||||
- LeadKit/Core-iOS-Extension (0.6.5):
|
||||
- LeadKit/Core-iOS-Extension (0.6.7):
|
||||
- CocoaLumberjack/Swift (~> 3.3.0)
|
||||
- ObjectMapper (~> 3.0.0)
|
||||
- RxAlamofire (= 4.0.0)
|
||||
|
|
@ -31,6 +31,7 @@ PODS:
|
|||
- RxCocoa (4.0.0):
|
||||
- RxSwift (~> 4.0)
|
||||
- RxSwift (4.0.0)
|
||||
- SwiftLint (0.25.0)
|
||||
- SwiftValidator (5.0.0)
|
||||
- TableKit (2.5.0)
|
||||
- UIScrollView-InfiniteScroll (1.0.2)
|
||||
|
|
@ -41,23 +42,25 @@ DEPENDENCIES:
|
|||
- KeychainAccess (= 3.1.0)
|
||||
- LeadKit (~> 0.6.0)
|
||||
- LeadKit/Core-iOS-Extension (~> 0.6.0)
|
||||
- SwiftLint (~> 0.25)
|
||||
- SwiftValidator (= 5.0.0)
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
Alamofire: 2d95912bf4c34f164fdfc335872e8c312acaea4a
|
||||
Alamofire: 907e0a98eb68cdb7f9d1f541a563d6ac5dc77b25
|
||||
CocoaLumberjack: 3c8c74683302f9012bb168e1c4b7ae3c0b558431
|
||||
IDZSwiftCommonCrypto: 4eef2c46e262dfbcbc1fd76365e066336680ad7d
|
||||
InputMask: 37c273bde6705187d80cf0b4240cb42ea92096c3
|
||||
KeychainAccess: 94c5540b32eabf7bc32bfb976a268e8ea05fd6da
|
||||
LeadKit: 583c724f25852e40eebad8af5a945e101c282fde
|
||||
LeadKit: 7d84bb111e7b6aca0c5d3ac5aee6f99d375d94d4
|
||||
ObjectMapper: 92230db59bf8f341a5c3a3cf0b9fbdde3cf0d87f
|
||||
RxAlamofire: 6ea579ac53bf14cb4bc7049a3866e5a769989b1d
|
||||
RxCocoa: d62846ca96495d862fa4c59ea7d87e5031d7340e
|
||||
RxSwift: fd680d75283beb5e2559486f3c0ff852f0d35334
|
||||
SwiftLint: e14651157288e9e01d6e1a71db7014fb5744a8ea
|
||||
SwiftValidator: 46cdd2061962df3ee8bab3c536dea9b34191d459
|
||||
TableKit: 42d4dff2944f273cdeec2ef6352064eb6a9a355b
|
||||
UIScrollView-InfiniteScroll: c132d6d5851daff229ab4a1060ccf70a05a051c9
|
||||
|
||||
PODFILE CHECKSUM: 9ba64f509b50aaf860b0df0c12cca7969aa50842
|
||||
PODFILE CHECKSUM: d2f39766e2e1169f9216c0dc43b52873927b77cc
|
||||
|
||||
COCOAPODS: 1.3.1
|
||||
COCOAPODS: 1.4.0
|
||||
|
|
@ -109,13 +109,13 @@ open class BaseDateFormatter {
|
|||
|
||||
/// Transformer to workaround with dates in Mappable (ObjectMapper) objects
|
||||
public static var transformFromStringToDate: TransformOf<Date, String> {
|
||||
return TransformOf<Date, String>(fromJSON: { (stringValue) -> Date? in
|
||||
return TransformOf<Date, String>(fromJSON: { stringValue -> Date? in
|
||||
if let stringValue = stringValue {
|
||||
return backendDate(fromStrDate: stringValue)
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}, toJSON: { (dateValue) -> String? in
|
||||
}, toJSON: { dateValue -> String? in
|
||||
if let dateValue = dateValue {
|
||||
return backendStrDate(withDate: dateValue)
|
||||
} else {
|
||||
|
|
@ -81,7 +81,7 @@ public class LoadingBarButton {
|
|||
|
||||
}
|
||||
|
||||
extension Observable {
|
||||
public extension Observable {
|
||||
|
||||
/**
|
||||
Reactive extension for LoadingBarButton
|
||||
|
|
@ -92,7 +92,7 @@ extension Observable {
|
|||
- Returns:
|
||||
- observable, that handles LoadingBarButton behaviour
|
||||
*/
|
||||
public func changeLoadingUI(using barButton: LoadingBarButton) -> Observable<Observable.E> {
|
||||
func changeLoadingUI(using barButton: LoadingBarButton) -> Observable<Observable.E> {
|
||||
return observeOn(MainScheduler.instance)
|
||||
.do(onSubscribe: {
|
||||
barButton.setState(waiting: true)
|
||||
|
|
@ -23,17 +23,17 @@
|
|||
import RxSwift
|
||||
import RxCocoa
|
||||
|
||||
extension PassCodeHolderProtocol {
|
||||
public extension PassCodeHolderProtocol {
|
||||
|
||||
public var passCodeHolderCreate: PassCodeHolderCreate? {
|
||||
var passCodeHolderCreate: PassCodeHolderCreate? {
|
||||
return self as? PassCodeHolderCreate
|
||||
}
|
||||
|
||||
public var passCodeHolderEnter: PassCodeHolderEnter? {
|
||||
var passCodeHolderEnter: PassCodeHolderEnter? {
|
||||
return self as? PassCodeHolderEnter
|
||||
}
|
||||
|
||||
public var passCodeHolderChange: PassCodeHolderChange? {
|
||||
var passCodeHolderChange: PassCodeHolderChange? {
|
||||
return self as? PassCodeHolderChange
|
||||
}
|
||||
}
|
||||
|
|
@ -53,9 +53,9 @@ open class BasePassCodeViewController: UIViewController, ConfigurableController
|
|||
|
||||
// MARK: - IBOutlets
|
||||
|
||||
@IBOutlet public weak var titleLabel: UILabel?
|
||||
@IBOutlet public weak var errorLabel: UILabel?
|
||||
@IBOutlet public weak var dotStackView: UIStackView!
|
||||
@IBOutlet private weak var titleLabel: UILabel?
|
||||
@IBOutlet private weak var errorLabel: UILabel?
|
||||
@IBOutlet private weak var dotStackView: UIStackView!
|
||||
|
||||
public let disposeBag = DisposeBag()
|
||||
|
||||
|
|
@ -140,7 +140,7 @@ open class BasePassCodeViewController: UIViewController, ConfigurableController
|
|||
var statesArray: [PinImageType] = []
|
||||
|
||||
for characterIndex in 0..<viewModel.passCodeConfiguration.passCodeLength {
|
||||
let state: PinImageType = Int(characterIndex) <= passCodeText.characters.count - 1 ? .entered : .clear
|
||||
let state: PinImageType = Int(characterIndex) <= passCodeText.count - 1 ? .entered : .clear
|
||||
statesArray.append(state)
|
||||
}
|
||||
|
||||
|
|
@ -262,4 +262,3 @@ extension BasePassCodeViewController: UITextFieldDelegate {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -71,7 +71,7 @@ open class BasePassCodeViewModel: BaseViewModel {
|
|||
.distinctUntilChanged { $0 == $1 }
|
||||
.drive(onNext: { [weak self] passCode in
|
||||
if let passCode = passCode,
|
||||
passCode.characters.count == Int(self?.passCodeConfiguration.passCodeLength ?? 0) {
|
||||
passCode.count == Int(self?.passCodeConfiguration.passCodeLength ?? 0) {
|
||||
self?.set(passCode: passCode)
|
||||
}
|
||||
})
|
||||
|
|
@ -23,10 +23,10 @@
|
|||
/// Describes error by raw value (more likely - Int code), received from back-end
|
||||
public protocol ApiErrorProtocol: RawRepresentable {}
|
||||
|
||||
extension Error {
|
||||
public extension Error {
|
||||
|
||||
/// Method indicates that error is back-end error
|
||||
public func isApiError<T: ApiErrorProtocol>(_ apiErrorType: T) -> Bool where T.RawValue == Int {
|
||||
func isApiError<T: ApiErrorProtocol>(_ apiErrorType: T) -> Bool where T.RawValue == Int {
|
||||
if let error = self as? ApiError,
|
||||
case let .error(code: code, message: _) = error,
|
||||
code == apiErrorType.rawValue {
|
||||
|
|
@ -44,10 +44,10 @@ public extension Observable {
|
|||
|
||||
return observeOn(CurrentThreadScheduler.instance)
|
||||
.retryWhen { errorsObservable -> Observable<Observable.E> in
|
||||
return errorsObservable.enumerated().flatMap {
|
||||
errorsObservable.enumerated().flatMap {
|
||||
(canRetryClosure($1) && $0 < retryLimit - 1) ? self : .error($1)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -22,10 +22,10 @@
|
|||
|
||||
import UIKit
|
||||
|
||||
extension UIBarButtonItem {
|
||||
public extension UIBarButtonItem {
|
||||
|
||||
/// Creates activity indicator view and bar button item (based on activity indicator)
|
||||
public static var activityIndicator: (barButton: UIBarButtonItem, activityIndicator: UIActivityIndicatorView) {
|
||||
static var activityIndicator: (barButton: UIBarButtonItem, activityIndicator: UIActivityIndicatorView) {
|
||||
let indicatorView = UIActivityIndicatorView(activityIndicatorStyle: .white)
|
||||
let indicatorBar = UIBarButtonItem(customView: indicatorView)
|
||||
return (indicatorBar, indicatorView)
|
||||
|
|
@ -45,12 +45,10 @@ public final class BiometricsService {
|
|||
fallback fallbackTitle: String? = nil,
|
||||
cancel cancelTitle: String? = nil,
|
||||
authHandler: @escaping BiometricsAuthHandler) {
|
||||
if #available(iOS 10.0, *), let cancel = cancelTitle {
|
||||
if #available(iOS 10.0, *) {
|
||||
laContext.localizedCancelTitle = cancelTitle
|
||||
}
|
||||
if let fallback = fallbackTitle {
|
||||
laContext.localizedFallbackTitle = fallbackTitle
|
||||
}
|
||||
laContext.localizedFallbackTitle = fallbackTitle
|
||||
|
||||
laContext.evaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, localizedReason: description) { success, error in
|
||||
authHandler(success, error)
|
||||
|
|
@ -75,12 +75,12 @@ public final class ValidationItem {
|
|||
|
||||
private func validate(text: String?, isManual: Bool = false) {
|
||||
let error = rules.filter {
|
||||
return !$0.validate(text ?? "")
|
||||
}
|
||||
.map { rule -> ValidationError in
|
||||
return ValidationError(failedRule: rule, errorMessage: rule.errorMessage())
|
||||
}
|
||||
.first
|
||||
!$0.validate(text ?? "")
|
||||
}
|
||||
.map { rule -> ValidationError in
|
||||
ValidationError(failedRule: rule, errorMessage: rule.errorMessage())
|
||||
}
|
||||
.first
|
||||
|
||||
if let validationError = error {
|
||||
switch validationStateHolder.value {
|
||||
|
|
@ -96,7 +96,7 @@ public final class ValidationService {
|
|||
stateObservables.forEach { observable in
|
||||
observable
|
||||
.map { states -> Bool in
|
||||
return states.map { $0.isValid }.reduce(true) { $0 && $1 }
|
||||
states.map { $0.isValid }.reduce(true) { $0 && $1 }
|
||||
}
|
||||
.map { $0 ? ValidationServiceState.valid : .invalid }
|
||||
.bind(to: stateHolder)
|
||||
|
|
@ -57,8 +57,8 @@ class CellTextFieldToolBar: UIToolbar, CellFieldsToolBarProtocol {
|
|||
|
||||
private(set) lazy var closeButton: UIBarButtonItem = {
|
||||
let doneButton = UIBarButtonItem(barButtonSystemItem: .done,
|
||||
target: self,
|
||||
action: #selector(doneAction))
|
||||
target: self,
|
||||
action: #selector(doneAction))
|
||||
return doneButton
|
||||
}()
|
||||
|
||||
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 817e845592f02fb0d22bf52ff9bb8db3210ddd89
|
||||
Loading…
Reference in New Issue