diff --git a/Cartfile.resolved b/Cartfile.resolved index 93fce34..32369d0 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,5 +1,5 @@ -github "SnapKit/SnapKit" "4.0.0" -github "SwiftKickMobile/SwiftMessages" "4.1.2" +github "SnapKit/SnapKit" "4.0.1" +github "SwiftKickMobile/SwiftMessages" "4.1.4" github "SwipeCellKit/SwipeCellKit" "1.9.1" github "eggswift/ESTabBarController" "2.6.2" github "fahlout/PasswordExtension" "4.1.2" diff --git a/Timeu.xcodeproj/project.pbxproj b/Timeu.xcodeproj/project.pbxproj index 360a31a..ecb2307 100644 --- a/Timeu.xcodeproj/project.pbxproj +++ b/Timeu.xcodeproj/project.pbxproj @@ -435,16 +435,18 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0930; - LastUpgradeCheck = 0930; + LastUpgradeCheck = 1000; ORGANIZATIONNAME = "Sebastian Limbach"; TargetAttributes = { FD8D548120853DCC004F1C85 = { CreatedOnToolsVersion = 9.3; + LastSwiftMigration = 1000; ProvisioningStyle = Automatic; TestTargetID = FDD678651F7D9051002F4D33; }; FDD678651F7D9051002F4D33 = { CreatedOnToolsVersion = 9.0; + LastSwiftMigration = 1000; ProvisioningStyle = Automatic; }; }; @@ -617,7 +619,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.sebastianlimbach.TimeuUITests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; TEST_TARGET_NAME = Timeu; }; @@ -634,7 +636,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.sebastianlimbach.TimeuUITests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; TEST_TARGET_NAME = Timeu; }; @@ -768,8 +770,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.sebastianlimbach.Timeu; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - SWIFT_WHOLE_MODULE_OPTIMIZATION = YES; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -788,8 +789,8 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.sebastianlimbach.Timeu; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - SWIFT_WHOLE_MODULE_OPTIMIZATION = YES; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; diff --git a/Timeu.xcodeproj/xcshareddata/xcschemes/Timeu.xcscheme b/Timeu.xcodeproj/xcshareddata/xcschemes/Timeu.xcscheme index faee5b8..9598c17 100644 --- a/Timeu.xcodeproj/xcshareddata/xcschemes/Timeu.xcscheme +++ b/Timeu.xcodeproj/xcshareddata/xcschemes/Timeu.xcscheme @@ -1,6 +1,6 @@ Bool { + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { resetStateForUITesting() UIApplication.shared.isStatusBarHidden = false window = UIWindow(frame: UIScreen.main.bounds) diff --git a/Timeu/Login/Controller/LoginViewController.swift b/Timeu/Login/Controller/LoginViewController.swift index 66018bb..2d99783 100644 --- a/Timeu/Login/Controller/LoginViewController.swift +++ b/Timeu/Login/Controller/LoginViewController.swift @@ -43,19 +43,19 @@ class LoginViewController: UIViewController { NotificationCenter.default.addObserver( self, selector: #selector(keyboardWillShow), - name: NSNotification.Name.UIKeyboardWillShow, + name: UIResponder.keyboardWillShowNotification, object: nil ) NotificationCenter.default.addObserver( self, selector: #selector(keyboardWillHide), - name: NSNotification.Name.UIKeyboardWillHide, + name: UIResponder.keyboardWillHideNotification, object: nil ) } @objc private func keyboardWillShow(notification: NSNotification) { - if let keyboardSize = (notification.userInfo?[UIKeyboardFrameBeginUserInfoKey] as? NSValue)?.cgRectValue { + if let keyboardSize = (notification.userInfo?[UIResponder.keyboardFrameBeginUserInfoKey] as? NSValue)?.cgRectValue { let keyboardHeight = keyboardSize.height var newContentInset = loginView.scrollViewInset newContentInset.bottom = keyboardHeight diff --git a/Timeu/Login/View/LoginButton.swift b/Timeu/Login/View/LoginButton.swift index 1ae1945..2baf6d8 100644 --- a/Timeu/Login/View/LoginButton.swift +++ b/Timeu/Login/View/LoginButton.swift @@ -15,7 +15,7 @@ import UIKit class LoginButton: UIButton { struct ButtonState { - var state: UIControlState + var state: UIControl.State var title: String? var image: UIImage? } @@ -75,7 +75,7 @@ class LoginButton: UIButton { func showLoading() { activityIndicator.startAnimating() var buttonStates: [ButtonState] = [] - for state in [UIControlState.disabled] { + for state in [UIControl.State.disabled] { let buttonState = ButtonState(state: state, title: title(for: state), image: image(for: state)) buttonStates.append(buttonState) setTitle("", for: state) diff --git a/Timeu/Login/View/LoginView.swift b/Timeu/Login/View/LoginView.swift index bef2033..92bcc42 100644 --- a/Timeu/Login/View/LoginView.swift +++ b/Timeu/Login/View/LoginView.swift @@ -188,7 +188,7 @@ class LoginView: UIView { addSubview(backgroundImageView) addSubview(appLogoView) addSubview(scrollView) - bringSubview(toFront: appLogoView) + bringSubviewToFront(appLogoView) scrollView.addSubview(contentView) contentView.addSubview(kimaiURLInput) contentView.addSubview(usernameInput) diff --git a/Timeu/TabBar/Views/TabBarAddItemView.swift b/Timeu/TabBar/Views/TabBarAddItemView.swift index e9e331d..66c921e 100644 --- a/Timeu/TabBar/Views/TabBarAddItemView.swift +++ b/Timeu/TabBar/Views/TabBarAddItemView.swift @@ -31,7 +31,7 @@ class TabBarAddItemView: ESTabBarItemContentView { let transform = CGAffineTransform.identity imageView.transform = transform - superview?.bringSubview(toFront: self) + superview?.bringSubviewToFront(self) insets = UIEdgeInsets(top: -22, left: 0, bottom: 0, right: 0) iconColor = UIColor.init(white: 255.0 / 255.0, alpha: 1.0) diff --git a/Timeu/Timesheet/Controller/ActivityTableViewDelegate.swift b/Timeu/Timesheet/Controller/ActivityTableViewDelegate.swift index 3f5e3f2..54024b1 100644 --- a/Timeu/Timesheet/Controller/ActivityTableViewDelegate.swift +++ b/Timeu/Timesheet/Controller/ActivityTableViewDelegate.swift @@ -21,7 +21,7 @@ class ActivityTableViewDelegate: NSObject, UITableViewDelegate { if section == 0 { return CGFloat.leastNonzeroMagnitude } - return UITableViewAutomaticDimension + return UITableView.automaticDimension } func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { diff --git a/Timeu/Timesheet/View/ActivityStatsTableViewCell.swift b/Timeu/Timesheet/View/ActivityStatsTableViewCell.swift index 417ddf8..e549477 100644 --- a/Timeu/Timesheet/View/ActivityStatsTableViewCell.swift +++ b/Timeu/Timesheet/View/ActivityStatsTableViewCell.swift @@ -18,7 +18,7 @@ class ActivityStatsTableViewCell: UITableViewCell { let collectionView: UICollectionView = { let layout = UICollectionViewFlowLayout() layout.scrollDirection = .horizontal - layout.estimatedItemSize = UICollectionViewFlowLayoutAutomaticSize + layout.estimatedItemSize = UICollectionViewFlowLayout.automaticSize layout.sectionInset = UIEdgeInsets.init(top: 0, left: 20, bottom: 0, right: 20) layout.minimumInteritemSpacing = 20 layout.minimumLineSpacing = 20 @@ -29,7 +29,7 @@ class ActivityStatsTableViewCell: UITableViewCell { return collectionView }() - override init(style: UITableViewCellStyle, reuseIdentifier: String?) { + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { super.init(style: style, reuseIdentifier: reuseIdentifier) backgroundColor = .clear selectionStyle = .none diff --git a/Timeu/Timesheet/View/ActivityTableView.swift b/Timeu/Timesheet/View/ActivityTableView.swift index f0f584d..e2918fe 100644 --- a/Timeu/Timesheet/View/ActivityTableView.swift +++ b/Timeu/Timesheet/View/ActivityTableView.swift @@ -19,12 +19,12 @@ class ActivityTableView: UITableView { case activityStatsCell = "tableViewCellWithCollectionView" } - override init(frame: CGRect, style: UITableViewStyle) { + override init(frame: CGRect, style: UITableView.Style) { super.init(frame: frame, style: style) backgroundColor = .timeuGray separatorStyle = .none estimatedRowHeight = 50 - rowHeight = UITableViewAutomaticDimension + rowHeight = UITableView.automaticDimension estimatedSectionHeaderHeight = 50 refreshControl = UIRefreshControl() diff --git a/Timeu/Timesheet/View/ActivityTableViewCell.swift b/Timeu/Timesheet/View/ActivityTableViewCell.swift index 4575502..596b200 100644 --- a/Timeu/Timesheet/View/ActivityTableViewCell.swift +++ b/Timeu/Timesheet/View/ActivityTableViewCell.swift @@ -104,7 +104,7 @@ class ActivityTableViewCell: SwipeTableViewCell { super.init(coder: aDecoder) } - override init(style: UITableViewCellStyle, reuseIdentifier: String?) { + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { super.init(style: style, reuseIdentifier: reuseIdentifier) backgroundColor = UIColor.clear