Compare commits

...

18 Commits

Author SHA1 Message Date
Ivan Smolin 4c4db7e5a5
Merge pull request #66 from TouchInstinct/feature/xcode_13_1
update libraries to build with Xcode 13.1; bump version
2022-01-26 20:26:33 +03:00
Ivan Smolin b6fe2474f5 update libraries to build with Xcode 13.1; bump version 2022-01-26 18:14:05 +03:00
Nikita 91d4eb2dd9
Merge pull request #65 from TouchInstinct/feature/podspecs_update
Updated podspecs
2020-09-03 12:06:09 +03:00
krasich74 42afb31d73 Updated podspecs 2020-09-03 10:32:40 +03:00
Nikita e22c6813cb
Merge pull request #64 from TouchInstinct/feature/podspecs_update
Updated podspecs
2020-09-02 10:55:04 +03:00
krasich74 0e99ac3ccc updated podspecs 2020-09-01 17:28:13 +03:00
Ivan Smolin de0b3b9da7
Merge pull request #63 from TouchInstinct/carthage__without_binary
Carthage  without binary
2020-01-23 12:11:08 +03:00
Ivan Smolin 6daa551dd3 update changelog 2020-01-22 20:07:27 +03:00
Ivan Smolin ffffc847f7 update LeadKit version 2020-01-22 20:06:33 +03:00
Ivan Smolin 4904449b85 remove Romefile 2020-01-22 19:04:59 +03:00
Ivan Smolin 131d3c7b78 fix swiftlint 2020-01-22 14:12:35 +03:00
Ivan Smolin 4fd075cbc8 add PinLayout 2020-01-16 12:49:17 +03:00
Ivan Smolin b91144f0ff update .gitignore 2020-01-15 22:03:05 +03:00
Ivan Smolin 8320179e01 fix linter warnings 2020-01-15 22:01:54 +03:00
Ivan Smolin cb8a37f9c9 add Romefile 2020-01-15 21:13:13 +03:00
Ivan Smolin 0f0a1861f1 add forgotten KeychainAccess 2020-01-15 21:13:07 +03:00
Ivan Smolin fc168d6d24 update dependencies, pin swiftlint version 2020-01-14 13:35:16 +03:00
Ivan Smolin 4006a3570f carthage without binaries 2020-01-13 19:07:53 +03:00
23 changed files with 217 additions and 159 deletions

3
.gitignore vendored
View File

@ -63,3 +63,6 @@ fastlane/report.xml
fastlane/Preview.html fastlane/Preview.html
fastlane/screenshots fastlane/screenshots
fastlane/test_output fastlane/test_output
# Touch Instinct custom
Downloads/

View File

@ -1,5 +1,15 @@
# Changelog # Changelog
### 0.4.0
- **Update**: update libraries to build with Xcode 13.1
### 0.3.15
- **Update**: update LeadKit dependency
### 0.3.14
- **Update**: remove Carthage binary dependencies, update build scripts.
### 0.3.13 ### 0.3.13
- **[Breaking change]**: `LabelTableViewCell` moved to `LeadKit`. - **[Breaking change]**: `LabelTableViewCell` moved to `LeadKit`.
- **[Breaking change]**: Removed `PinLayout` dependency. - **[Breaking change]**: Removed `PinLayout` dependency.

View File

@ -1,10 +1,5 @@
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/SwiftDate/SwiftDate.json" github "krzyzanowskim/CryptoSwift"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/LeadKit/LeadKit.json" github "TouchInstinct/LeadKit"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/Alamofire/Alamofire.json" github "petropavel13/SwiftValidator"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/RxAlamofire/RxAlamofire.json" github "kishikawakatsumi/KeychainAccess"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/KeychainAccess/KeychainAccess.json" github "layoutBox/PinLayout"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/CryptoSwift/CryptoSwift.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/SwiftValidator/SwiftValidator.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/TableKit/TableKit.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/RxSwift/RxSwift.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/UIScrollView_InfiniteScroll/UIScrollView_InfiniteScroll.json"

View File

@ -1,10 +1,12 @@
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/Alamofire/Alamofire.json" "4.8.1" github "Alamofire/Alamofire" "4.9.1"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/CryptoSwift/CryptoSwift.json" "0.14.0" github "ReactiveX/RxSwift" "4.5.0"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/KeychainAccess/KeychainAccess.json" "3.2.0" github "RxSwiftCommunity/RxAlamofire" "4.5.0"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/LeadKit/LeadKit.json" "0.9.15" github "SnapKit/SnapKit" "4.2.0"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/RxAlamofire/RxAlamofire.json" "4.3.0" github "TouchInstinct/LeadKit" "0.9.29"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/RxSwift/RxSwift.json" "4.4.2" github "TouchInstinct/TableKit" "2.10008.1"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/SwiftDate/SwiftDate.json" "5.1.0" github "krzyzanowskim/CryptoSwift" "1.3.0"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/SwiftValidator/SwiftValidator.json" "5.0.0" github "malcommac/SwiftDate" "6.1.0"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/TableKit/TableKit.json" "2.10008.1" github "petropavel13/SwiftValidator" "be856202cd70e6549ebc8c9d07ec47bbff784b07"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/UIScrollView_InfiniteScroll/UIScrollView_InfiniteScroll.json" "1.1.0" github "pronebird/UIScrollView-InfiniteScroll" "1.1.0"
github "kishikawakatsumi/KeychainAccess" "v3.2.0"
github "layoutBox/PinLayout" "1.8.6"

View File

@ -1,20 +1,20 @@
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = "LeadKitAdditions" s.name = "LeadKitAdditions"
s.version = "0.3.13" s.version = "0.4.0"
s.summary = "iOS framework with a bunch of tools for rapid development" s.summary = "iOS framework with a bunch of tools for rapid development"
s.homepage = "https://github.com/TouchInstinct/LeadKitAdditions" s.homepage = "https://github.com/TouchInstinct/LeadKitAdditions"
s.license = "Apache License, Version 2.0" s.license = "Apache License, Version 2.0"
s.author = "Touch Instinct" s.author = "Touch Instinct"
s.platform = :ios, "9.0" s.platform = :ios, "10.0"
s.source = { :git => "https://github.com/TouchInstinct/LeadKitAdditions.git", :tag => s.version } s.source = { :git => "https://github.com/TouchInstinct/LeadKitAdditions.git", :tag => s.version }
s.subspec 'Core' do |ss| s.subspec 'Core' do |ss|
ss.ios.deployment_target = '9.0' ss.ios.deployment_target = '10.0'
ss.source_files = "Sources/**/*.swift" ss.source_files = "Sources/**/*.swift"
ss.dependency "LeadKit", '~> 0.9.0' ss.dependency "LeadKit", '~> 1.7.0'
ss.dependency "KeychainAccess", '3.1.0' ss.dependency "KeychainAccess", '~> 4.2.0'
ss.dependency "CryptoSwift", '~> 0.9.0' ss.dependency "CryptoSwift", '~> 1.4.0'
ss.dependency "SwiftValidator", '4.0.2' ss.dependency "SwiftValidator", '4.0.2'
end end

View File

@ -7,6 +7,7 @@
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
14E3AD49502B3D81264560DB /* Pods_LeadKitAdditions_LeadKitAdditions_iOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3EDEF7F6C22BB04CBB754C14 /* Pods_LeadKitAdditions_LeadKitAdditions_iOS.framework */; };
67779CBC206986390098F024 /* BaseTextFieldViewEvents+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67779CBB206986390098F024 /* BaseTextFieldViewEvents+Extensions.swift */; }; 67779CBC206986390098F024 /* BaseTextFieldViewEvents+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67779CBB206986390098F024 /* BaseTextFieldViewEvents+Extensions.swift */; };
678D26AA206935B900B05B93 /* BiometricsService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 678D26A9206935B900B05B93 /* BiometricsService.swift */; }; 678D26AA206935B900B05B93 /* BiometricsService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 678D26A9206935B900B05B93 /* BiometricsService.swift */; };
67B4E6F6206945DD00E233EA /* OnlineValidationResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67B4E6F5206945DC00E233EA /* OnlineValidationResult.swift */; }; 67B4E6F6206945DD00E233EA /* OnlineValidationResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67B4E6F5206945DC00E233EA /* OnlineValidationResult.swift */; };
@ -19,7 +20,6 @@
786CBB32220DD7A70017587F /* LeadKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 786CBB25220DD7A70017587F /* LeadKit.framework */; }; 786CBB32220DD7A70017587F /* LeadKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 786CBB25220DD7A70017587F /* LeadKit.framework */; };
786CBB33220DD7A70017587F /* SwiftValidator.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 786CBB26220DD7A70017587F /* SwiftValidator.framework */; }; 786CBB33220DD7A70017587F /* SwiftValidator.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 786CBB26220DD7A70017587F /* SwiftValidator.framework */; };
786CBB34220DD7A70017587F /* UIScrollView_InfiniteScroll.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 786CBB27220DD7A70017587F /* UIScrollView_InfiniteScroll.framework */; }; 786CBB34220DD7A70017587F /* UIScrollView_InfiniteScroll.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 786CBB27220DD7A70017587F /* UIScrollView_InfiniteScroll.framework */; };
786CBB35220DD7A70017587F /* RxAtomic.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 786CBB28220DD7A70017587F /* RxAtomic.framework */; };
786CBB36220DD7A70017587F /* RxAlamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 786CBB29220DD7A70017587F /* RxAlamofire.framework */; }; 786CBB36220DD7A70017587F /* RxAlamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 786CBB29220DD7A70017587F /* RxAlamofire.framework */; };
786CBB37220DD7A70017587F /* SwiftDate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 786CBB2A220DD7A70017587F /* SwiftDate.framework */; }; 786CBB37220DD7A70017587F /* SwiftDate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 786CBB2A220DD7A70017587F /* SwiftDate.framework */; };
786CBB38220DD7A70017587F /* RxCocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 786CBB2B220DD7A70017587F /* RxCocoa.framework */; }; 786CBB38220DD7A70017587F /* RxCocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 786CBB2B220DD7A70017587F /* RxCocoa.framework */; };
@ -46,6 +46,8 @@
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
1AC235099AA10D83D608A253 /* Pods-LeadKitAdditions-LeadKitAdditions iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LeadKitAdditions-LeadKitAdditions iOS.release.xcconfig"; path = "Target Support Files/Pods-LeadKitAdditions-LeadKitAdditions iOS/Pods-LeadKitAdditions-LeadKitAdditions iOS.release.xcconfig"; sourceTree = "<group>"; };
3EDEF7F6C22BB04CBB754C14 /* Pods_LeadKitAdditions_LeadKitAdditions_iOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LeadKitAdditions_LeadKitAdditions_iOS.framework; sourceTree = BUILT_PRODUCTS_DIR; };
67528BCE206E3CC6009F2525 /* iOS.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; path = iOS.playground; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; 67528BCE206E3CC6009F2525 /* iOS.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; path = iOS.playground; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
67779CBB206986390098F024 /* BaseTextFieldViewEvents+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "BaseTextFieldViewEvents+Extensions.swift"; sourceTree = "<group>"; }; 67779CBB206986390098F024 /* BaseTextFieldViewEvents+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "BaseTextFieldViewEvents+Extensions.swift"; sourceTree = "<group>"; };
678D26A9206935B900B05B93 /* BiometricsService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BiometricsService.swift; sourceTree = "<group>"; }; 678D26A9206935B900B05B93 /* BiometricsService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BiometricsService.swift; sourceTree = "<group>"; };
@ -53,13 +55,13 @@
67B4E6F5206945DC00E233EA /* OnlineValidationResult.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OnlineValidationResult.swift; sourceTree = "<group>"; }; 67B4E6F5206945DC00E233EA /* OnlineValidationResult.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OnlineValidationResult.swift; sourceTree = "<group>"; };
67B4E6F8206945F900E233EA /* OnlineValidationState.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OnlineValidationState.swift; sourceTree = "<group>"; }; 67B4E6F8206945F900E233EA /* OnlineValidationState.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OnlineValidationState.swift; sourceTree = "<group>"; };
67D6041721627600002DAF5B /* LegacyConfigurableController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LegacyConfigurableController.swift; sourceTree = "<group>"; }; 67D6041721627600002DAF5B /* LegacyConfigurableController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LegacyConfigurableController.swift; sourceTree = "<group>"; };
6FEE03727D0B955F00DE8429 /* Pods-LeadKitAdditions-LeadKitAdditions iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LeadKitAdditions-LeadKitAdditions iOS.debug.xcconfig"; path = "Target Support Files/Pods-LeadKitAdditions-LeadKitAdditions iOS/Pods-LeadKitAdditions-LeadKitAdditions iOS.debug.xcconfig"; sourceTree = "<group>"; };
786CBB22220DD7A70017587F /* RxSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = RxSwift.framework; path = Carthage/Build/iOS/RxSwift.framework; sourceTree = "<group>"; }; 786CBB22220DD7A70017587F /* RxSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = RxSwift.framework; path = Carthage/Build/iOS/RxSwift.framework; sourceTree = "<group>"; };
786CBB23220DD7A70017587F /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Alamofire.framework; path = Carthage/Build/iOS/Alamofire.framework; sourceTree = "<group>"; }; 786CBB23220DD7A70017587F /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Alamofire.framework; path = Carthage/Build/iOS/Alamofire.framework; sourceTree = "<group>"; };
786CBB24220DD7A70017587F /* TableKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = TableKit.framework; path = Carthage/Build/iOS/TableKit.framework; sourceTree = "<group>"; }; 786CBB24220DD7A70017587F /* TableKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = TableKit.framework; path = Carthage/Build/iOS/TableKit.framework; sourceTree = "<group>"; };
786CBB25220DD7A70017587F /* LeadKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = LeadKit.framework; path = Carthage/Build/iOS/LeadKit.framework; sourceTree = "<group>"; }; 786CBB25220DD7A70017587F /* LeadKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = LeadKit.framework; path = Carthage/Build/iOS/LeadKit.framework; sourceTree = "<group>"; };
786CBB26220DD7A70017587F /* SwiftValidator.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftValidator.framework; path = Carthage/Build/iOS/SwiftValidator.framework; sourceTree = "<group>"; }; 786CBB26220DD7A70017587F /* SwiftValidator.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftValidator.framework; path = Carthage/Build/iOS/SwiftValidator.framework; sourceTree = "<group>"; };
786CBB27220DD7A70017587F /* UIScrollView_InfiniteScroll.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIScrollView_InfiniteScroll.framework; path = Carthage/Build/iOS/UIScrollView_InfiniteScroll.framework; sourceTree = "<group>"; }; 786CBB27220DD7A70017587F /* UIScrollView_InfiniteScroll.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIScrollView_InfiniteScroll.framework; path = Carthage/Build/iOS/UIScrollView_InfiniteScroll.framework; sourceTree = "<group>"; };
786CBB28220DD7A70017587F /* RxAtomic.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = RxAtomic.framework; path = Carthage/Build/iOS/RxAtomic.framework; sourceTree = "<group>"; };
786CBB29220DD7A70017587F /* RxAlamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = RxAlamofire.framework; path = Carthage/Build/iOS/RxAlamofire.framework; sourceTree = "<group>"; }; 786CBB29220DD7A70017587F /* RxAlamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = RxAlamofire.framework; path = Carthage/Build/iOS/RxAlamofire.framework; sourceTree = "<group>"; };
786CBB2A220DD7A70017587F /* SwiftDate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftDate.framework; path = Carthage/Build/iOS/SwiftDate.framework; sourceTree = "<group>"; }; 786CBB2A220DD7A70017587F /* SwiftDate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftDate.framework; path = Carthage/Build/iOS/SwiftDate.framework; sourceTree = "<group>"; };
786CBB2B220DD7A70017587F /* RxCocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = RxCocoa.framework; path = Carthage/Build/iOS/RxCocoa.framework; sourceTree = "<group>"; }; 786CBB2B220DD7A70017587F /* RxCocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = RxCocoa.framework; path = Carthage/Build/iOS/RxCocoa.framework; sourceTree = "<group>"; };
@ -100,12 +102,12 @@
786CBB32220DD7A70017587F /* LeadKit.framework in Frameworks */, 786CBB32220DD7A70017587F /* LeadKit.framework in Frameworks */,
786CBB33220DD7A70017587F /* SwiftValidator.framework in Frameworks */, 786CBB33220DD7A70017587F /* SwiftValidator.framework in Frameworks */,
786CBB34220DD7A70017587F /* UIScrollView_InfiniteScroll.framework in Frameworks */, 786CBB34220DD7A70017587F /* UIScrollView_InfiniteScroll.framework in Frameworks */,
786CBB35220DD7A70017587F /* RxAtomic.framework in Frameworks */,
786CBB36220DD7A70017587F /* RxAlamofire.framework in Frameworks */, 786CBB36220DD7A70017587F /* RxAlamofire.framework in Frameworks */,
786CBB37220DD7A70017587F /* SwiftDate.framework in Frameworks */, 786CBB37220DD7A70017587F /* SwiftDate.framework in Frameworks */,
786CBB38220DD7A70017587F /* RxCocoa.framework in Frameworks */, 786CBB38220DD7A70017587F /* RxCocoa.framework in Frameworks */,
786CBB39220DD7A70017587F /* CryptoSwift.framework in Frameworks */, 786CBB39220DD7A70017587F /* CryptoSwift.framework in Frameworks */,
786CBB3A220DD7A70017587F /* KeychainAccess.framework in Frameworks */, 786CBB3A220DD7A70017587F /* KeychainAccess.framework in Frameworks */,
14E3AD49502B3D81264560DB /* Pods_LeadKitAdditions_LeadKitAdditions_iOS.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@ -137,13 +139,13 @@
786CBB25220DD7A70017587F /* LeadKit.framework */, 786CBB25220DD7A70017587F /* LeadKit.framework */,
786CBB2E220DD7A70017587F /* PinLayout.framework */, 786CBB2E220DD7A70017587F /* PinLayout.framework */,
786CBB29220DD7A70017587F /* RxAlamofire.framework */, 786CBB29220DD7A70017587F /* RxAlamofire.framework */,
786CBB28220DD7A70017587F /* RxAtomic.framework */,
786CBB2B220DD7A70017587F /* RxCocoa.framework */, 786CBB2B220DD7A70017587F /* RxCocoa.framework */,
786CBB22220DD7A70017587F /* RxSwift.framework */, 786CBB22220DD7A70017587F /* RxSwift.framework */,
786CBB2A220DD7A70017587F /* SwiftDate.framework */, 786CBB2A220DD7A70017587F /* SwiftDate.framework */,
786CBB26220DD7A70017587F /* SwiftValidator.framework */, 786CBB26220DD7A70017587F /* SwiftValidator.framework */,
786CBB24220DD7A70017587F /* TableKit.framework */, 786CBB24220DD7A70017587F /* TableKit.framework */,
786CBB27220DD7A70017587F /* UIScrollView_InfiniteScroll.framework */, 786CBB27220DD7A70017587F /* UIScrollView_InfiniteScroll.framework */,
3EDEF7F6C22BB04CBB754C14 /* Pods_LeadKitAdditions_LeadKitAdditions_iOS.framework */,
); );
name = Frameworks; name = Frameworks;
sourceTree = "<group>"; sourceTree = "<group>";
@ -155,6 +157,7 @@
CAE698E41E968820000394B0 /* Products */, CAE698E41E968820000394B0 /* Products */,
CAE698E51E968820000394B0 /* Sources */, CAE698E51E968820000394B0 /* Sources */,
67528BCE206E3CC6009F2525 /* iOS.playground */, 67528BCE206E3CC6009F2525 /* iOS.playground */,
FBC34E01DAB566B85ED77BAD /* Pods */,
); );
sourceTree = "<group>"; sourceTree = "<group>";
}; };
@ -279,6 +282,15 @@
path = ValidationService; path = ValidationService;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
FBC34E01DAB566B85ED77BAD /* Pods */ = {
isa = PBXGroup;
children = (
6FEE03727D0B955F00DE8429 /* Pods-LeadKitAdditions-LeadKitAdditions iOS.debug.xcconfig */,
1AC235099AA10D83D608A253 /* Pods-LeadKitAdditions-LeadKitAdditions iOS.release.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
};
/* End PBXGroup section */ /* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */ /* Begin PBXHeadersBuildPhase section */
@ -297,6 +309,7 @@
isa = PBXNativeTarget; isa = PBXNativeTarget;
buildConfigurationList = CAE698EB1E968820000394B0 /* Build configuration list for PBXNativeTarget "LeadKitAdditions iOS" */; buildConfigurationList = CAE698EB1E968820000394B0 /* Build configuration list for PBXNativeTarget "LeadKitAdditions iOS" */;
buildPhases = ( buildPhases = (
DA96E76177E2633117FCBE55 /* [CP] Check Pods Manifest.lock */,
CAE698DE1E968820000394B0 /* Sources */, CAE698DE1E968820000394B0 /* Sources */,
CAE698DF1E968820000394B0 /* Frameworks */, CAE698DF1E968820000394B0 /* Frameworks */,
CAE698E01E968820000394B0 /* Headers */, CAE698E01E968820000394B0 /* Headers */,
@ -369,7 +382,29 @@
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "CONFIG_PATH=${PROJECT_DIR}/build-scripts/xcode/.swiftlint.yml\n\nif which swiftlint >/dev/null; then\nswiftlint autocorrect --path Sources --config ${CONFIG_PATH} && swiftlint --path Sources --config ${CONFIG_PATH}\nelse\necho \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; shellScript = ". run_swiftlint.sh\n";
};
DA96E76177E2633117FCBE55 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-LeadKitAdditions-LeadKitAdditions iOS-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
}; };
/* End PBXShellScriptBuildPhase section */ /* End PBXShellScriptBuildPhase section */
@ -528,6 +563,7 @@
}; };
CAE698EC1E968820000394B0 /* Debug */ = { CAE698EC1E968820000394B0 /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = 6FEE03727D0B955F00DE8429 /* Pods-LeadKitAdditions-LeadKitAdditions iOS.debug.xcconfig */;
buildSettings = { buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES; APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
@ -537,13 +573,9 @@
DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1; DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath"; DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/iOS",
);
INFOPLIST_FILE = "$(SRCROOT)/Sources/Info-iOS.plist"; INFOPLIST_FILE = "$(SRCROOT)/Sources/Info-iOS.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 9.0; IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "touchinstinct.LeadKitAdditions-iOS"; PRODUCT_BUNDLE_IDENTIFIER = "touchinstinct.LeadKitAdditions-iOS";
PRODUCT_NAME = LeadKitAdditions; PRODUCT_NAME = LeadKitAdditions;
@ -556,6 +588,7 @@
}; };
CAE698ED1E968820000394B0 /* Release */ = { CAE698ED1E968820000394B0 /* Release */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = 1AC235099AA10D83D608A253 /* Pods-LeadKitAdditions-LeadKitAdditions iOS.release.xcconfig */;
buildSettings = { buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES; APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
@ -565,13 +598,9 @@
DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1; DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath"; DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/iOS",
);
INFOPLIST_FILE = "$(SRCROOT)/Sources/Info-iOS.plist"; INFOPLIST_FILE = "$(SRCROOT)/Sources/Info-iOS.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 9.0; IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "touchinstinct.LeadKitAdditions-iOS"; PRODUCT_BUNDLE_IDENTIFIER = "touchinstinct.LeadKitAdditions-iOS";
PRODUCT_NAME = LeadKitAdditions; PRODUCT_NAME = LeadKitAdditions;

12
Podfile
View File

@ -1,20 +1,20 @@
source "https://github.com/CocoaPods/Specs.git" source 'https://cdn.cocoapods.org/'
source "https://github.com/TouchInstinct/Podspecs.git" source "https://github.com/TouchInstinct/Podspecs.git"
abstract_target 'LeadKitAdditions' do abstract_target 'LeadKitAdditions' do
pod "KeychainAccess", '3.1.0' pod "KeychainAccess", '~> 4.2.0'
pod "CryptoSwift", "~> 0.9.0" pod "CryptoSwift", "~> 1.4.0"
pod "SwiftValidator", '4.0.2' pod "SwiftValidator", '4.0.2'
pod "SwiftLint", '~> 0.25' pod "SwiftLint", '~> 0.45.0'
pod "PinLayout", '~> 1.6' pod "PinLayout", '~> 1.6'
inhibit_all_warnings! inhibit_all_warnings!
use_frameworks! use_frameworks!
target 'LeadKitAdditions iOS' do target 'LeadKitAdditions iOS' do
platform :ios, '9.0' platform :ios, '10.0'
pod 'LeadKit', '~> 0.9.0' pod 'LeadKit', '~> 1.7.0'
end end
end end

View File

@ -1,78 +1,81 @@
PODS: PODS:
- Alamofire (4.7.3) - Alamofire (5.5.0)
- CryptoSwift (0.9.0) - CryptoSwift (1.4.2)
- KeychainAccess (3.1.0) - KeychainAccess (4.2.2)
- LeadKit (0.9.0): - LeadKit (1.7.0):
- LeadKit/Core (= 0.9.0) - LeadKit/Core (= 1.7.0)
- LeadKit/Core (0.9.0): - LeadKit/Core (1.7.0):
- RxAlamofire (~> 4.3) - RxAlamofire (~> 6.1)
- RxCocoa (~> 4.3) - RxCocoa (~> 6.2)
- RxSwift (~> 4.3) - RxSwift (~> 6.2)
- SwiftDate (~> 5.0) - SnapKit (~> 5.0.1)
- TableKit (~> 2.8) - SwiftDate (~> 6)
- TableKit (~> 2.11)
- UIScrollView-InfiniteScroll (~> 1.1.0) - UIScrollView-InfiniteScroll (~> 1.1.0)
- LeadKit/Core-iOS-Extension (0.9.0):
- RxAlamofire (~> 4.3)
- RxCocoa (~> 4.3)
- RxSwift (~> 4.3)
- SwiftDate (~> 5.0)
- TableKit (~> 2.8)
- PinLayout (1.8.6) - PinLayout (1.8.6)
- RxAlamofire (4.3.0): - RxAlamofire (6.1.1):
- RxAlamofire/Core (= 4.3.0) - RxAlamofire/Core (= 6.1.1)
- RxAlamofire/Core (4.3.0): - RxAlamofire/Core (6.1.1):
- Alamofire (~> 4.5) - Alamofire (~> 5.4)
- RxSwift (~> 4) - RxSwift (~> 6.0)
- RxCocoa (4.3.1): - RxCocoa (6.2.0):
- RxSwift (~> 4.0) - RxRelay (= 6.2.0)
- RxSwift (4.3.1) - RxSwift (= 6.2.0)
- SwiftDate (5.0.10) - RxRelay (6.2.0):
- SwiftLint (0.27.0) - RxSwift (= 6.2.0)
- RxSwift (6.2.0)
- SnapKit (5.0.1)
- SwiftDate (6.3.1)
- SwiftLint (0.45.1)
- SwiftValidator (4.0.2) - SwiftValidator (4.0.2)
- TableKit (2.8.0) - TableKit (2.11.0)
- UIScrollView-InfiniteScroll (1.1.0) - UIScrollView-InfiniteScroll (1.1.0)
DEPENDENCIES: DEPENDENCIES:
- CryptoSwift (~> 0.9.0) - CryptoSwift (~> 1.4.0)
- KeychainAccess (= 3.1.0) - KeychainAccess (~> 4.2.0)
- LeadKit (~> 0.9.0) - LeadKit (~> 1.7.0)
- LeadKit/Core-iOS-Extension (~> 0.9.0)
- PinLayout (~> 1.6) - PinLayout (~> 1.6)
- SwiftLint (~> 0.25) - SwiftLint (~> 0.45.0)
- SwiftValidator (= 4.0.2) - SwiftValidator (= 4.0.2)
SPEC REPOS: SPEC REPOS:
https://github.com/cocoapods/specs.git: https://github.com/CocoaPods/Specs.git:
- PinLayout
https://github.com/TouchInstinct/Podspecs.git:
- LeadKit
- SwiftValidator
trunk:
- Alamofire - Alamofire
- CryptoSwift - CryptoSwift
- KeychainAccess - KeychainAccess
- PinLayout
- RxAlamofire - RxAlamofire
- RxCocoa - RxCocoa
- RxRelay
- RxSwift - RxSwift
- SnapKit
- SwiftDate - SwiftDate
- SwiftLint - SwiftLint
- TableKit - TableKit
- UIScrollView-InfiniteScroll - UIScrollView-InfiniteScroll
https://github.com/TouchInstinct/Podspecs.git:
- LeadKit
- SwiftValidator
SPEC CHECKSUMS: SPEC CHECKSUMS:
Alamofire: c7287b6e5d7da964a70935e5db17046b7fde6568 Alamofire: 1c4fb5369c3fe93d2857c780d8bbe09f06f97e7c
CryptoSwift: bca8c5b653dcc2d9734409242a070ff53bafac86 CryptoSwift: a532e74ed010f8c95f611d00b8bbae42e9fe7c17
KeychainAccess: 94c5540b32eabf7bc32bfb976a268e8ea05fd6da KeychainAccess: c0c4f7f38f6fc7bbe58f5702e25f7bd2f65abf51
LeadKit: 80787b6215648cf9bfedf2c591fbe924ba4940a1 LeadKit: e5765a6edac2813042304e940fd7a43b37be80ca
PinLayout: fe2a2432d6982588e208572005c941aeeae417ab PinLayout: fe2a2432d6982588e208572005c941aeeae417ab
RxAlamofire: 09624d0f2d48ed8b686e4eb4cf68e28cbd2df556 RxAlamofire: beb75a1c452d0de225651db4903f5d29d034a620
RxCocoa: 78763c7b07d02455598d9fc3c1ad091a28b73635 RxCocoa: 4baf94bb35f2c0ab31bc0cb9f1900155f646ba42
RxSwift: fe0fd770a43acdb7d0a53da411c9b892e69bb6e4 RxRelay: e72dbfd157807478401ef1982e1c61c945c94b2f
SwiftDate: fcdaa7ca22a903faf6d7ed231239a88d174dcae3 RxSwift: d356ab7bee873611322f134c5f9ef379fa183d8f
SwiftLint: 3207c1faa2240bf8973b191820a116113cd11073 SnapKit: 97b92857e3df3a0c71833cce143274bf6ef8e5eb
SwiftDate: 72d28954e8e1c6c1c0f917ccc8005e4f83c7d4b2
SwiftLint: 06ac37e4d38c7068e0935bb30cda95f093bec761
SwiftValidator: 8517a67bceebd7286cb487da259db7dd44c5fc74 SwiftValidator: 8517a67bceebd7286cb487da259db7dd44c5fc74
TableKit: d635663343d00e209f258e35d4ee0072ad1beb1a TableKit: 8a1a267d841a2da638ea09bdb0db33aedb459fa8
UIScrollView-InfiniteScroll: 3ef456bcbe759c19f510a383cff96e6647c98c98 UIScrollView-InfiniteScroll: 3ef456bcbe759c19f510a383cff96e6647c98c98
PODFILE CHECKSUM: 447350715f27bad97492296a2ed066c844cfaf5a PODFILE CHECKSUM: 1d0f91b670998d56b8cf9bc24d5b265a89e8409b
COCOAPODS: 1.6.0.beta.2 COCOAPODS: 1.10.1

View File

@ -99,14 +99,13 @@ public extension BaseTextFieldViewModelEvents {
using offlineRules: [Rule] = [], using offlineRules: [Rule] = [],
validationClosure: @escaping OnlineValidationClosure) -> Driver<OnlineValidationState> { validationClosure: @escaping OnlineValidationClosure) -> Driver<OnlineValidationState> {
return textDriver.flatMap { string -> Driver<OnlineValidationState> in textDriver.flatMap { string -> Driver<OnlineValidationState> in
guard let nonEmptyString = string, !nonEmptyString.isEmpty else { guard let nonEmptyString = string, !nonEmptyString.isEmpty else {
return .just(.initial) return .just(.initial)
} }
let passedRules = offlineRules let passedRules = offlineRules
.map { $0.validate(nonEmptyString) } .allSatisfy { $0.validate(nonEmptyString) }
.reduce(true) { $0 && $1 }
guard passedRules else { guard passedRules else {
return .just(.initial) return .just(.initial)
@ -137,7 +136,7 @@ public extension BaseTextFieldViewModelEvents {
rules: [Rule] = [RequiredRule()], rules: [Rule] = [RequiredRule()],
validationService: ValidationService, validationService: ValidationService,
onlineValidationClosure: OnlineValidationClosure? = nil, onlineValidationClosure: OnlineValidationClosure? = nil,
onlineValidationThrottle: RxTimeInterval = 0.5) { onlineValidationThrottle: RxTimeInterval = .milliseconds(500)) {
let dataModelFieldDriver = binding.fieldDriver let dataModelFieldDriver = binding.fieldDriver

View File

@ -93,8 +93,8 @@ public extension Observable {
- Returns: - Returns:
- observable, that handles LoadingBarButton behaviour - observable, that handles LoadingBarButton behaviour
*/ */
func changeLoadingUI(using barButton: LoadingBarButton) -> Observable<Observable.E> { func changeLoadingUI(using barButton: LoadingBarButton) -> Observable<Observable.Element> {
return observeOn(MainScheduler.instance) observe(on: MainScheduler.instance)
.do(onSubscribe: { .do(onSubscribe: {
barButton.setState(waiting: true) barButton.setState(waiting: true)
}, onDispose: { }, onDispose: {

View File

@ -40,6 +40,6 @@ public struct PassCodeConfiguration {
/// Returns configuration with default values /// Returns configuration with default values
public static var defaultConfiguration: PassCodeConfiguration { public static var defaultConfiguration: PassCodeConfiguration {
return PassCodeConfiguration() PassCodeConfiguration()
} }
} }

View File

@ -26,15 +26,15 @@ import RxCocoa
public extension PassCodeHolderProtocol { public extension PassCodeHolderProtocol {
var passCodeHolderCreate: PassCodeHolderCreate? { var passCodeHolderCreate: PassCodeHolderCreate? {
return self as? PassCodeHolderCreate self as? PassCodeHolderCreate
} }
var passCodeHolderEnter: PassCodeHolderEnter? { var passCodeHolderEnter: PassCodeHolderEnter? {
return self as? PassCodeHolderEnter self as? PassCodeHolderEnter
} }
var passCodeHolderChange: PassCodeHolderChange? { var passCodeHolderChange: PassCodeHolderChange? {
return self as? PassCodeHolderChange self as? PassCodeHolderChange
} }
} }
@ -55,7 +55,7 @@ public class PassCodeHolderCreate: PassCodeHolderProtocol {
} }
public var shouldValidate: Bool { public var shouldValidate: Bool {
return firstPassCode != nil && secondPassCode != nil firstPassCode != nil && secondPassCode != nil
} }
public var passCode: String? { public var passCode: String? {
@ -100,7 +100,7 @@ public class PassCodeHolderEnter: PassCodeHolderProtocol {
public let enterStep: PassCodeControllerState = .enter public let enterStep: PassCodeControllerState = .enter
public var shouldValidate: Bool { public var shouldValidate: Bool {
return passCode != nil passCode != nil
} }
public var passCode: String? public var passCode: String?
@ -153,7 +153,7 @@ public class PassCodeHolderChange: PassCodeHolderProtocol {
public var passCode: String? { public var passCode: String? {
switch (oldPassCode, newFirstPassCode, newSecondPassCode) { switch (oldPassCode, newFirstPassCode, newSecondPassCode) {
case (let oldPassCode?, nil, nil): case let (oldPassCode?, nil, nil):
return oldPassCode return oldPassCode
case (_, _?, nil): case (_, _?, nil):

View File

@ -201,7 +201,8 @@ open class BasePassCodeViewController: UIViewController, LegacyConfigurableContr
.sorted { $0.delay < $1.delay } .sorted { $0.delay < $1.delay }
.map { [weak self] delayedDescription in .map { [weak self] delayedDescription in
Observable<Int> Observable<Int>
.interval(delayedDescription.delay, scheduler: MainScheduler.instance) .interval(.seconds(Int(delayedDescription.delay)),
scheduler: MainScheduler.instance)
.take(1) .take(1)
.do(onNext: { _ in .do(onNext: { _ in
self?.errorLabel?.attributedText = delayedDescription.description self?.errorLabel?.attributedText = delayedDescription.description
@ -260,7 +261,7 @@ open class BasePassCodeViewController: UIViewController, LegacyConfigurableContr
self?.setStates(for: text ?? "") self?.setStates(for: text ?? "")
self?.hideError() self?.hideError()
}) })
.delay(0.1) // time to draw dots .delay(.milliseconds(100)) // time to draw dots
.drive(onNext: { [weak self] text in .drive(onNext: { [weak self] text in
self?.viewModel.setPassCodeText(text) self?.viewModel.setPassCodeText(text)
}) })

View File

@ -20,7 +20,6 @@
// THE SOFTWARE. // THE SOFTWARE.
// //
import LeadKit
import RxSwift import RxSwift
import RxCocoa import RxCocoa
@ -31,7 +30,7 @@ public enum PassCodeAuthType {
} }
/// Base view model for passCodeViewController /// Base view model for passCodeViewController
open class BasePassCodeViewModel: BaseViewModel { open class BasePassCodeViewModel {
public let operationType: PassCodeOperationType public let operationType: PassCodeOperationType
@ -43,17 +42,17 @@ open class BasePassCodeViewModel: BaseViewModel {
/// Contains configuration for pass code operations /// Contains configuration for pass code operations
public let passCodeConfiguration: PassCodeConfiguration public let passCodeConfiguration: PassCodeConfiguration
private let validationResultHolder = Variable<PassCodeValidationResult?>(nil) private let validationResultHolder = BehaviorRelay<PassCodeValidationResult?>(value: nil)
public var validationResultDriver: Driver<PassCodeValidationResult?> { public var validationResultDriver: Driver<PassCodeValidationResult?> {
return validationResultHolder.asDriver() validationResultHolder.asDriver()
} }
private let passCodeControllerStateVariable = Variable<PassCodeControllerState>(.enter) private let passCodeControllerStateVariable = BehaviorRelay<PassCodeControllerState>(value: .enter)
public var passCodeControllerStateDriver: Driver<PassCodeControllerState> { public var passCodeControllerStateDriver: Driver<PassCodeControllerState> {
return passCodeControllerStateVariable.asDriver() passCodeControllerStateVariable.asDriver()
} }
private let passCodeText = Variable<String?>(nil) private let passCodeText = BehaviorRelay<String?>(value: nil)
private var attemptsNumber = 0 private var attemptsNumber = 0
@ -85,17 +84,17 @@ open class BasePassCodeViewModel: BaseViewModel {
// MARK: - Public // MARK: - Public
public var passCodeTextValue: String? { public var passCodeTextValue: String? {
return passCodeText.value passCodeText.value
} }
public func setPassCodeText(_ value: String?) { public func setPassCodeText(_ value: String?) {
passCodeText.value = value passCodeText.accept(value)
} }
public func reset() { public func reset() {
passCodeText.value = nil passCodeText.accept(nil)
validationResultHolder.value = nil validationResultHolder.accept(nil)
passCodeControllerStateVariable.value = operationType == .change ? .oldEnter : .enter passCodeControllerStateVariable.accept(operationType == .change ? .oldEnter : .enter)
attemptsNumber = 0 attemptsNumber = 0
passCodeHolder.reset() passCodeHolder.reset()
} }
@ -136,7 +135,7 @@ open class BasePassCodeViewModel: BaseViewModel {
/// Posibility to use biometrics for authentication /// Posibility to use biometrics for authentication
open var isBiometricsEnabled: Bool { open var isBiometricsEnabled: Bool {
return false false
} }
/// Notify about activation for biometrics. Remember to save user choice /// Notify about activation for biometrics. Remember to save user choice
@ -153,7 +152,7 @@ open class BasePassCodeViewModel: BaseViewModel {
private extension BasePassCodeViewModel { private extension BasePassCodeViewModel {
var validationResultBinder: Binder<PassCodeValidationResult?> { var validationResultBinder: Binder<PassCodeValidationResult?> {
return Binder(self) { model, validationResult in Binder(self) { model, validationResult in
let isValid = validationResult?.isValid ?? false let isValid = validationResult?.isValid ?? false
let passCode = validationResult?.passCode let passCode = validationResult?.passCode
@ -161,13 +160,13 @@ private extension BasePassCodeViewModel {
if isValid, model.passCodeHolder.enterStep == .repeatEnter, let passCode = passCode { if isValid, model.passCodeHolder.enterStep == .repeatEnter, let passCode = passCode {
model.authSucceed(.passCode(passCode)) model.authSucceed(.passCode(passCode))
} else { } else {
model.passCodeControllerStateVariable.value = model.passCodeHolder.enterStep model.passCodeControllerStateVariable.accept(model.passCodeHolder.enterStep)
} }
} else { } else {
if isValid, let passCode = passCode { if isValid, let passCode = passCode {
model.authSucceed(.passCode(passCode)) model.authSucceed(.passCode(passCode))
} else { } else {
model.passCodeControllerStateVariable.value = model.passCodeHolder.enterStep model.passCodeControllerStateVariable.accept(model.passCodeHolder.enterStep)
} }
} }
} }
@ -181,12 +180,12 @@ extension BasePassCodeViewModel {
validateIfNeeded() validateIfNeeded()
if shouldUpdateControllerState { if shouldUpdateControllerState {
passCodeControllerStateVariable.value = passCodeHolder.enterStep passCodeControllerStateVariable.accept(passCodeHolder.enterStep)
} }
} }
private var shouldUpdateControllerState: Bool { private var shouldUpdateControllerState: Bool {
return !passCodeHolder.shouldValidate || !passCodeHolder.shouldValidate ||
!(validationResultHolder.value?.isValid ?? true) || !(validationResultHolder.value?.isValid ?? true) ||
validationResultHolder.value?.error?.isTooManyAttempts ?? false validationResultHolder.value?.error?.isTooManyAttempts ?? false
} }
@ -231,6 +230,6 @@ extension BasePassCodeViewModel {
passCodeHolder.reset() passCodeHolder.reset()
} }
validationResultHolder.value = validationResult validationResultHolder.accept(validationResult)
} }
} }

View File

@ -15,6 +15,6 @@ public extension Error {
/// Returns: true if server json response is not valid /// Returns: true if server json response is not valid
var isResponseSerializationError: Bool { var isResponseSerializationError: Bool {
return (self as? AFError)?.isResponseSerializationError ?? false (self as? AFError)?.isResponseSerializationError ?? false
} }
} }

View File

@ -32,7 +32,7 @@ public extension UserDefaults {
/// Default place to store session id /// Default place to store session id
var sessionId: String? { var sessionId: String? {
get { get {
return string(forKey: Keys.sessionId) string(forKey: Keys.sessionId)
} }
set { set {
set(newValue, forKey: Keys.sessionId) set(newValue, forKey: Keys.sessionId)
@ -42,7 +42,7 @@ public extension UserDefaults {
/// Default place to store userLogin /// Default place to store userLogin
var userLogin: String? { var userLogin: String? {
get { get {
return string(forKey: Keys.userLogin) string(forKey: Keys.userLogin)
} }
set { set {
set(newValue, forKey: Keys.userLogin) set(newValue, forKey: Keys.userLogin)

View File

@ -39,7 +39,7 @@ open class BasePassCodeService {
/// Override to set specific keychain service name /// Override to set specific keychain service name
open class var keychainServiceString: String { open class var keychainServiceString: String {
return Bundle.main.bundleIdentifier ?? "" Bundle.main.bundleIdentifier ?? ""
} }
public init() { public init() {
@ -55,7 +55,7 @@ open class BasePassCodeService {
private lazy var keychain = Keychain(service: BasePassCodeService.keychainServiceString).synchronizable(false) private lazy var keychain = Keychain(service: BasePassCodeService.keychainServiceString).synchronizable(false)
private var passCodeHash: String? { private var passCodeHash: String? {
return keychain[Keys.passCodeHash] keychain[Keys.passCodeHash]
} }
} }
@ -63,13 +63,13 @@ public extension BasePassCodeService {
/// Indicates is pass code already saved on this device /// Indicates is pass code already saved on this device
var isPassCodeSaved: Bool { var isPassCodeSaved: Bool {
return keychain[Keys.passCodeHash] != nil keychain[Keys.passCodeHash] != nil
} }
/// Possibility to authenticate via biometrics. TouchID or FaceID /// Possibility to authenticate via biometrics. TouchID or FaceID
var isBiometricsAuthorizationEnabled: Bool { var isBiometricsAuthorizationEnabled: Bool {
get { get {
return keychain[Keys.isBiometricsEnabled] == Values.biometricsEnabled keychain[Keys.isBiometricsEnabled] == Values.biometricsEnabled
} }
set { set {
keychain[Keys.isBiometricsEnabled] = newValue ? Values.biometricsEnabled : nil keychain[Keys.isBiometricsEnabled] = newValue ? Values.biometricsEnabled : nil
@ -87,7 +87,7 @@ public extension BasePassCodeService {
/// Check if pass code is correct /// Check if pass code is correct
func check(passCode: String) -> Bool { func check(passCode: String) -> Bool {
return passCode.sha256() == passCodeHash passCode.sha256() == passCodeHash
} }
/// Reset pass code settings /// Reset pass code settings

View File

@ -21,7 +21,6 @@
// //
import RxSwift import RxSwift
import LeadKit
/// Represents service that store basic user information /// Represents service that store basic user information
open class BaseUserService { open class BaseUserService {
@ -51,7 +50,7 @@ open class BaseUserService {
/// Indicates if user is logged in /// Indicates if user is logged in
open var isLoggedIn: Bool { open var isLoggedIn: Bool {
return UserDefaults.standard.sessionId != nil UserDefaults.standard.sessionId != nil
} }
/// Reset user information /// Reset user information

View File

@ -41,7 +41,7 @@ public final class BiometricsService {
/// If the user unlocks the device using biometrics within the specified time interval, /// If the user unlocks the device using biometrics within the specified time interval,
/// then authentication for the receiver succeeds automatically, without prompting the user for biometrics. /// then authentication for the receiver succeeds automatically, without prompting the user for biometrics.
/// Works only after device unlock event, no other apps authentications counts. /// Works only after device unlock event, no other apps authentications counts.
public var allowableReuseDuration: TimeInterval? = nil { public var allowableReuseDuration: TimeInterval? {
didSet { didSet {
guard let duration = allowableReuseDuration else { guard let duration = allowableReuseDuration else {
return return
@ -85,7 +85,7 @@ public final class BiometricsService {
/// Indicates is it possible to authenticate on this device via any biometric. /// Indicates is it possible to authenticate on this device via any biometric.
/// Returns false if not enrolled or lockedout. /// Returns false if not enrolled or lockedout.
public var canAuthenticateWithBiometrics: Bool { public var canAuthenticateWithBiometrics: Bool {
return laContext.canEvaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, error: nil) laContext.canEvaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, error: nil)
} }
/** /**

View File

@ -36,15 +36,15 @@ public final class ValidationItem {
private let disposeBag = DisposeBag() private let disposeBag = DisposeBag()
private let validationStateHolder = Variable<ValidationItemState>(.initial) private let validationStateHolder = BehaviorRelay<ValidationItemState>(value: .initial)
public var validationState: ValidationItemState { public var validationState: ValidationItemState {
return validationStateHolder.value validationStateHolder.value
} }
public var validationStateObservable: Observable<ValidationItemState> { public var validationStateObservable: Observable<ValidationItemState> {
return validationStateHolder.asObservable() validationStateHolder.asObservable()
} }
private let text = Variable<String?>(nil) private let text = BehaviorRelay<String?>(value: nil)
private(set) var rules: [Rule] = [] private(set) var rules: [Rule] = []
@ -90,13 +90,13 @@ public final class ValidationItem {
.correction where !isManual, .correction where !isManual,
.valid where !isManual: .valid where !isManual:
validationStateHolder.value = .correction(validationError) validationStateHolder.accept(.correction(validationError))
default: default:
validationStateHolder.value = .error(validationError) validationStateHolder.accept(.error(validationError))
} }
} else { } else {
validationStateHolder.value = .valid validationStateHolder.accept(.valid)
} }
} }
} }

View File

@ -17,7 +17,7 @@ public enum ValidationServiceState {
public extension ValidationServiceState { public extension ValidationServiceState {
var isValid: Bool { var isValid: Bool {
return self == .valid self == .valid
} }
} }
@ -27,12 +27,12 @@ public final class ValidationService {
private(set) var validationItems: [ValidationItem] = [] private(set) var validationItems: [ValidationItem] = []
private let stateHolder = Variable<ValidationServiceState>(.initial) private let stateHolder = BehaviorRelay<ValidationServiceState>(value: .initial)
public var state: ValidationServiceState { public var state: ValidationServiceState {
return stateHolder.value stateHolder.value
} }
public var stateObservable: Observable<ValidationServiceState> { public var stateObservable: Observable<ValidationServiceState> {
return stateHolder.asObservable() stateHolder.asObservable()
} }
private var validationStateReactType: ValidationServiceStateReactType = .none private var validationStateReactType: ValidationServiceStateReactType = .none
@ -71,7 +71,7 @@ public final class ValidationService {
public func validate() -> Bool { public func validate() -> Bool {
validationStateReactType = .all validationStateReactType = .all
let isValid = validationItems.map { $0.manualValidate() }.reduce(true) { $0 && $1 } let isValid = validationItems.allSatisfy { $0.manualValidate() }
validationStateReactType = .each validationStateReactType = .each
return isValid return isValid
@ -84,18 +84,22 @@ public final class ValidationService {
let zipStates = Observable let zipStates = Observable
.zip(allValidationStateObservables) { $0 } .zip(allValidationStateObservables) { $0 }
.filter { [weak self] _ in self?.validationStateReactType == .all } .filter { [weak self] _ in
self?.validationStateReactType == .all
}
let combineLatestStates = Observable let combineLatestStates = Observable
.combineLatest(allValidationStateObservables) { $0 } .combineLatest(allValidationStateObservables) { $0 }
.filter { [weak self] _ in self?.validationStateReactType == .each } .filter { [weak self] _ in
self?.validationStateReactType == .each
}
let stateObservables = [zipStates, combineLatestStates] let stateObservables = [zipStates, combineLatestStates]
stateObservables.forEach { observable in stateObservables.forEach { observable in
observable observable
.map { states -> Bool in .map { states -> Bool in
states.map { $0.isValid }.reduce(true) { $0 && $1 } states.allSatisfy { $0.isValid }
} }
.map { $0 ? ValidationServiceState.valid : .invalid } .map { $0 ? ValidationServiceState.valid : .invalid }
.bind(to: stateHolder) .bind(to: stateHolder)

@ -1 +1 @@
Subproject commit 54935bbe26063cdf04e72b8cb76d61c727ff99a7 Subproject commit 2799169e2103c034b0e1be221860a23292766f36

14
run_swiftlint.sh Normal file
View File

@ -0,0 +1,14 @@
#!/bin/sh
readonly CONFIG_PATH=${PROJECT_DIR}/build-scripts/xcode/.swiftlint.yml
readonly SWIFTLINT_VERSION=0.45.1
readonly SWIFTLINT_PORTABLE_FILENAME=portable_swiftlint.zip
readonly SWIFTLINT_PORTABLE_URL=https://github.com/realm/SwiftLint/releases/download/${SWIFTLINT_VERSION}/${SWIFTLINT_PORTABLE_FILENAME}
. build-scripts/xcode/aux_scripts/download_file.sh ${SWIFTLINT_PORTABLE_FILENAME} ${SWIFTLINT_PORTABLE_URL} Downloads --remove-cached
cd Downloads && unzip -o ${SWIFTLINT_PORTABLE_FILENAME}
${PROJECT_DIR}/Downloads/swiftlint autocorrect --path ${PROJECT_DIR}/Sources --config ${CONFIG_PATH} && ${PROJECT_DIR}/Downloads/swiftlint --path ${PROJECT_DIR}/Sources --config ${CONFIG_PATH}