Merge pull request #53 from TouchInstinct/feature/swift4_2_wip

Swift 4.2
This commit is contained in:
iON1k 2018-10-15 17:03:16 +03:00 committed by GitHub
commit 36d8602e8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 138 additions and 99 deletions

View File

@ -1 +1 @@
4.0
4.2

View File

@ -1,5 +1,8 @@
# Changelog
### 0.3.5
- **Update**: Migrate to Swift 4.2 & Xcode 10. Update dependencies.
### 0.3.4

View File

@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "LeadKitAdditions"
s.version = "0.3.4"
s.version = "0.3.5"
s.summary = "iOS framework with a bunch of tools for rapid development"
s.homepage = "https://github.com/TouchInstinct/LeadKitAdditions"
s.license = "Apache License, Version 2.0"
@ -16,7 +16,7 @@ Pod::Spec.new do |s|
"Sources/Services/Network/DefaultNetworkService+ActivityIndicator+Extension.swift",
]
ss.dependency "LeadKit", '~> 0.8.0'
ss.dependency "LeadKit", '~> 0.9.0'
ss.dependency "KeychainAccess", '3.1.0'
ss.dependency "CryptoSwift", '~> 0.9.0'
ss.dependency "SwiftValidator", '5.0.0'
@ -33,7 +33,7 @@ Pod::Spec.new do |s|
"Sources/Extensions/Cells/**/*.swift"
]
ss.dependency "LeadKit/Core-iOS-Extension", '~> 0.8.0'
ss.dependency "LeadKit/Core-iOS-Extension", '~> 0.9.0'
ss.dependency "KeychainAccess", '3.1.0'
ss.dependency "CryptoSwift", '~> 0.9.0'
ss.dependency "SwiftValidator", '5.0.0'

View File

@ -27,6 +27,7 @@
67C2A41D20725359000A5682 /* LabelTableViewCell+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67C2A41C20725359000A5682 /* LabelTableViewCell+Extensions.swift */; };
67CF05AA206E9880009A2AB9 /* PinLayoutCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67CF05A9206E9880009A2AB9 /* PinLayoutCell.swift */; };
67CF05B0206E99DF009A2AB9 /* PinLayoutTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67CF05AF206E99DF009A2AB9 /* PinLayoutTableViewCell.swift */; };
67D6041821627600002DAF5B /* LegacyConfigurableController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67D6041721627600002DAF5B /* LegacyConfigurableController.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, ); }; };
@ -84,6 +85,7 @@
67C2A41C20725359000A5682 /* LabelTableViewCell+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "LabelTableViewCell+Extensions.swift"; sourceTree = "<group>"; };
67CF05A9206E9880009A2AB9 /* PinLayoutCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PinLayoutCell.swift; sourceTree = "<group>"; };
67CF05AF206E99DF009A2AB9 /* PinLayoutTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PinLayoutTableViewCell.swift; sourceTree = "<group>"; };
67D6041721627600002DAF5B /* LegacyConfigurableController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LegacyConfigurableController.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>"; };
@ -305,6 +307,7 @@
children = (
67CF05A8206E986A009A2AB9 /* Cells */,
67B4E6F4206945DC00E233EA /* ValidationService */,
67D6041721627600002DAF5B /* LegacyConfigurableController.swift */,
);
path = Protocols;
sourceTree = "<group>";
@ -373,7 +376,6 @@
CAE698DF1E968820000394B0 /* Frameworks */,
CAE698E01E968820000394B0 /* Headers */,
CAE698E11E968820000394B0 /* Resources */,
94F6E1BA5AD68C6E2F10062B /* [CP] Copy Pods Resources */,
CAE6990A1E969A7A000394B0 /* Swiftlint */,
);
buildRules = (
@ -394,7 +396,6 @@
EFBD556C1EBB87100062AA63 /* Frameworks */,
EFBD556D1EBB87100062AA63 /* Headers */,
EFBD556E1EBB87100062AA63 /* Resources */,
808FF5474C0E1574D405EFAF /* [CP] Copy Pods Resources */,
ED69E7E91F2AD0E000C74895 /* Swiftlint */,
);
buildRules = (
@ -417,7 +418,7 @@
TargetAttributes = {
CAE698E21E968820000394B0 = {
CreatedOnToolsVersion = 8.3;
LastSwiftMigration = 0900;
LastSwiftMigration = 1000;
ProvisioningStyle = Manual;
};
EFBD556F1EBB87100062AA63 = {
@ -480,36 +481,6 @@
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;
};
808FF5474C0E1574D405EFAF /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-LeadKitAdditions-LeadKitAdditions iOS Extensions/Pods-LeadKitAdditions-LeadKitAdditions iOS Extensions-resources.sh\"\n";
showEnvVarsInLog = 0;
};
94F6E1BA5AD68C6E2F10062B /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-LeadKitAdditions-LeadKitAdditions iOS/Pods-LeadKitAdditions-LeadKitAdditions iOS-resources.sh\"\n";
showEnvVarsInLog = 0;
};
CAE6990A1E969A7A000394B0 /* Swiftlint */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@ -563,6 +534,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
67D6041821627600002DAF5B /* LegacyConfigurableController.swift in Sources */,
67B4E6FB20694A4200E233EA /* BaseTextFieldViewModel.swift in Sources */,
ED0C340F1F2906EC00FAE9FD /* PassCodeHolderProtocol.swift in Sources */,
ED0C343F1F2906EC00FAE9FD /* ValidationError.swift in Sources */,
@ -768,7 +740,7 @@
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
@ -792,7 +764,7 @@
PRODUCT_NAME = LeadKitAdditions;
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
@ -816,7 +788,7 @@
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
@ -840,7 +812,7 @@
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};

View File

@ -9,21 +9,18 @@ abstract_target 'LeadKitAdditions' do
pod "PinLayout", '~> 1.6'
inhibit_all_warnings!
use_frameworks!
target 'LeadKitAdditions iOS' do
platform :ios, '9.0'
use_frameworks!
pod 'LeadKit', '~> 0.7.0'
pod 'LeadKit', '~> 0.9.0'
end
target 'LeadKitAdditions iOS Extensions' do
platform :ios, '9.0'
use_frameworks!
pod "LeadKit/Core-iOS-Extension", '~> 0.7.0'
pod "LeadKit/Core-iOS-Extension", '~> 0.9.0'
end
end

View File

@ -1,64 +1,78 @@
PODS:
- Alamofire (4.7.2)
- Alamofire (4.7.3)
- CryptoSwift (0.9.0)
- KeychainAccess (3.1.0)
- LeadKit (0.7.12):
- LeadKit/Core (= 0.7.12)
- LeadKit/Core (0.7.12):
- ObjectMapper (~> 3.1)
- RxAlamofire (~> 4.1)
- RxCocoa (~> 4.1)
- RxSwift (~> 4.1)
- SwiftDate (~> 4.5)
- TableKit (~> 2.6)
- UIScrollView-InfiniteScroll (~> 1.0.0)
- LeadKit/Core-iOS-Extension (0.7.12):
- ObjectMapper (~> 3.1)
- RxAlamofire (~> 4.1)
- RxCocoa (~> 4.1)
- RxSwift (~> 4.1)
- SwiftDate (~> 4.5)
- ObjectMapper (3.1.0)
- PinLayout (1.6.0)
- RxAlamofire (4.2.0):
- RxAlamofire/Core (= 4.2.0)
- RxAlamofire/Core (4.2.0):
- LeadKit (0.9.0):
- LeadKit/Core (= 0.9.0)
- LeadKit/Core (0.9.0):
- RxAlamofire (~> 4.3)
- RxCocoa (~> 4.3)
- RxSwift (~> 4.3)
- SwiftDate (~> 5.0)
- TableKit (~> 2.8)
- 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)
- RxAlamofire (4.3.0):
- RxAlamofire/Core (= 4.3.0)
- RxAlamofire/Core (4.3.0):
- Alamofire (~> 4.5)
- RxSwift (~> 4)
- RxCocoa (4.1.2):
- RxCocoa (4.3.1):
- RxSwift (~> 4.0)
- RxSwift (4.1.2)
- SwiftDate (4.5.1)
- SwiftLint (0.25.1)
- RxSwift (4.3.1)
- SwiftDate (5.0.10)
- SwiftLint (0.27.0)
- SwiftValidator (5.0.0)
- TableKit (2.6.0)
- UIScrollView-InfiniteScroll (1.0.2)
- TableKit (2.8.0)
- UIScrollView-InfiniteScroll (1.1.0)
DEPENDENCIES:
- CryptoSwift (~> 0.9.0)
- KeychainAccess (= 3.1.0)
- LeadKit (~> 0.7.0)
- LeadKit/Core-iOS-Extension (~> 0.7.0)
- LeadKit (~> 0.9.0)
- LeadKit/Core-iOS-Extension (~> 0.9.0)
- PinLayout (~> 1.6)
- SwiftLint (~> 0.25)
- SwiftValidator (= 5.0.0)
SPEC REPOS:
https://github.com/cocoapods/specs.git:
- Alamofire
- CryptoSwift
- KeychainAccess
- PinLayout
- RxAlamofire
- RxCocoa
- RxSwift
- SwiftDate
- SwiftLint
- TableKit
- UIScrollView-InfiniteScroll
https://github.com/TouchInstinct/Podspecs.git:
- LeadKit
- SwiftValidator
SPEC CHECKSUMS:
Alamofire: e4fa87002c137ba2d8d634d2c51fabcda0d5c223
Alamofire: c7287b6e5d7da964a70935e5db17046b7fde6568
CryptoSwift: bca8c5b653dcc2d9734409242a070ff53bafac86
KeychainAccess: 94c5540b32eabf7bc32bfb976a268e8ea05fd6da
LeadKit: e6628cfa16f5bab6fc001d4fcba9608f60fb6fd3
ObjectMapper: 20505058f54e5c3ca69e1d6de9897d152a5369a6
PinLayout: a2bbe9057d49a1e326b13dc4fe8c14751f8c8844
RxAlamofire: 87a9c588541210cc3e4a1f843ccc3ecf3eb98b31
RxCocoa: d88ba0f1f6abf040011a9eb4b539324fc426843a
RxSwift: e49536837d9901277638493ea537394d4b55f570
SwiftDate: 7b56d42a221f582047287deb256b23fc5ed49a60
SwiftLint: ce933681be10c3266e82576dad676fa815a602e9
LeadKit: 80787b6215648cf9bfedf2c591fbe924ba4940a1
PinLayout: fe2a2432d6982588e208572005c941aeeae417ab
RxAlamofire: 09624d0f2d48ed8b686e4eb4cf68e28cbd2df556
RxCocoa: 78763c7b07d02455598d9fc3c1ad091a28b73635
RxSwift: fe0fd770a43acdb7d0a53da411c9b892e69bb6e4
SwiftDate: fcdaa7ca22a903faf6d7ed231239a88d174dcae3
SwiftLint: 3207c1faa2240bf8973b191820a116113cd11073
SwiftValidator: 46cdd2061962df3ee8bab3c536dea9b34191d459
TableKit: 61880e4c13ac0ba396a308fcb1ae48f6dec8b458
UIScrollView-InfiniteScroll: c132d6d5851daff229ab4a1060ccf70a05a051c9
TableKit: d635663343d00e209f258e35d4ee0072ad1beb1a
UIScrollView-InfiniteScroll: 3ef456bcbe759c19f510a383cff96e6647c98c98
PODFILE CHECKSUM: 18dadbe1461045569b8c35d705ed56bcac3325c6
PODFILE CHECKSUM: 3a69f15c8923b9a8b4798d4e8e1caf8dc6293c6d
COCOAPODS: 1.4.0
COCOAPODS: 1.6.0.beta.1

View File

@ -26,7 +26,7 @@ import PinLayout
/// Cell that uses PinLayout. Contains methods that should be overriden in subclasses.
open class PinLayoutTableViewCell: UITableViewCell, PinLayoutCell {
public override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
initializeCell()

View File

@ -45,14 +45,14 @@ open class SeparatorTableViewCell: PinLayoutTableViewCell {
/// Move separator upward in hierarchy
public func bringSeparatorsToFront() {
contentView.bringSubview(toFront: topSeparator)
contentView.bringSubview(toFront: bottomSeparator)
contentView.bringSubviewToFront(topSeparator)
contentView.bringSubviewToFront(bottomSeparator)
}
/// Move separator backward in hierarchy
public func sendSeparatorsToBack() {
contentView.sendSubview(toBack: topSeparator)
contentView.sendSubview(toBack: bottomSeparator)
contentView.sendSubviewToBack(topSeparator)
contentView.sendSubviewToBack(bottomSeparator)
}
// MARK: - PinLayoutTableViewCell

View File

@ -47,7 +47,7 @@ public enum PassCodeControllerState {
}
/// Base view controller that operates with pass code
open class BasePassCodeViewController: UIViewController, ConfigurableController {
open class BasePassCodeViewController: UIViewController, LegacyConfigurableController {
public var viewModel: BasePassCodeViewModel!
@ -100,7 +100,7 @@ open class BasePassCodeViewController: UIViewController, ConfigurableController
return
}
NotificationCenter.default.rx.notification(.UIApplicationWillResignActive)
NotificationCenter.default.rx.notification(UIApplication.willResignActiveNotification)
.subscribe(onNext: { [weak self] _ in
self?.resetUI()
})

View File

@ -26,7 +26,7 @@ public extension UIBarButtonItem {
/// Creates activity indicator view and bar button item (based on activity indicator)
static var activityIndicator: (barButton: UIBarButtonItem, activityIndicator: UIActivityIndicatorView) {
let indicatorView = UIActivityIndicatorView(activityIndicatorStyle: .white)
let indicatorView = UIActivityIndicatorView(style: .white)
let indicatorBar = UIBarButtonItem(customView: indicatorView)
return (indicatorBar, indicatorView)
}

View File

@ -0,0 +1,53 @@
//
// Copyright (c) 2018 Touch Instinct
//
// 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 LeadKit
public protocol LegacyConfigurableController: InitializableView {
associatedtype ViewModelT
var viewModel: ViewModelT! { get }
func configureBarButtons()
func initialLoadView()
}
public extension LegacyConfigurableController where Self: UIViewController {
func initializeView() {
assertionFailure("Use \(initialLoadView) for UIViewController instead!")
}
/// Method that should be called in viewDidLoad method of UIViewController.
func initialLoadView() {
addViews()
configureLayout()
configureAppearance()
configureBarButtons()
localize()
bindViews()
}
}

@ -1 +1 @@
Subproject commit 622b2d34508fe0d4103af643bc0d91c75f7bf026
Subproject commit ea127636275ceea8abcf3ec9aa62ffe6d13f0b72