From 1b7798cb1999e4bb9c5b50f2c8ce332a37d5d93f Mon Sep 17 00:00:00 2001 From: manuroe Date: Wed, 20 Feb 2019 16:43:45 +0100 Subject: [PATCH 1/2] Maintenance: Update cocopoads and pods. --- CHANGES.rst | 6 +++++- Podfile | 2 +- Podfile.lock | 18 +++++++++--------- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index b1afaabd7..cfa2d2659 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,8 +1,12 @@ Changes in 0.8.2 (2019-xx-xx) =============================================== +Improvements: + * Upgrade MatrixKit version ([v0.9.6](https://github.com/matrix-org/matrix-ios-kit/releases/tag/v0.9.6). + * Maintenance: Update cocopoads and pods. + Bug fix: -* Reskin: status bar text is no more readable on iPad (#2276). + * Reskin: status bar text is no more readable on iPad (#2276). Changes in 0.8.1 (2019-02-19) =============================================== diff --git a/Podfile b/Podfile index 92626d5a9..796298a32 100644 --- a/Podfile +++ b/Podfile @@ -79,7 +79,7 @@ abstract_target 'RiotPods' do pod 'zxcvbn-ios' # Tools - pod 'SwiftGen', '~> 6.0' + pod 'SwiftGen', '~> 6.1' target "Riot" do import_MatrixKit diff --git a/Podfile.lock b/Podfile.lock index 8a56627bb..38c19fed1 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -71,7 +71,7 @@ PODS: - GZIP (~> 1.2.2) - libbase58 (~> 0.1.4) - OLMKit (~> 3.0.0) - - Realm (~> 3.11.1) + - Realm (~> 3.13.1) - MatrixSDK/JingleCallStack (0.12.2): - MatrixSDK/Core - WebRTC (= 63.11.20455) @@ -85,15 +85,15 @@ PODS: - PiwikTracker (4.4.2): - PiwikTracker/Core (= 4.4.2) - PiwikTracker/Core (4.4.2) - - Realm (3.11.2): - - Realm/Headers (= 3.11.2) - - Realm/Headers (3.11.2) + - Realm (3.13.1): + - Realm/Headers (= 3.13.1) + - Realm/Headers (3.13.1) - Reusable (4.0.5): - Reusable/Storyboard (= 4.0.5) - Reusable/View (= 4.0.5) - Reusable/Storyboard (4.0.5) - Reusable/View (4.0.5) - - SwiftGen (6.0.2) + - SwiftGen (6.1.0) - WebRTC (63.11.20455) - zxcvbn-ios (1.0.4) @@ -155,12 +155,12 @@ SPEC CHECKSUMS: MatrixSDK: 60a9472eacdf51e5110b8bc7beba844debf992ef OLMKit: 88eda69110489f817d59bcb4353b7c247570aa4f PiwikTracker: 42862c7b13028065c3dfd36b4dc38db8a5765acf - Realm: 864477d028db77f7c5a0cba64a4892ad53db128a + Realm: 50071da38fe079e0735e47c9f2eae738c68c5996 Reusable: 188be1a54ac0691bc66e5bb24ec6eb91971b315b - SwiftGen: e5b047067aa84082826a0c4f1c4c2ddc95bcf74c + SwiftGen: f872ca75cbd17bf7103c17f13dcfa0d9a15667b0 WebRTC: f2a6203584745fe53532633397557876b5d71640 zxcvbn-ios: fef98b7c80f1512ff0eec47ac1fa399fc00f7e3c -PODFILE CHECKSUM: e4a36bd00d4da77d377d00e5df6044e3ccce3b4c +PODFILE CHECKSUM: 17a74795e75026048d90793d2ebb0880eac5c55f -COCOAPODS: 1.6.0.beta.2 +COCOAPODS: 1.6.0 From 443aea27f989e1302283a38a45b0f7d117b78501 Mon Sep 17 00:00:00 2001 From: manuroe Date: Wed, 20 Feb 2019 16:45:32 +0100 Subject: [PATCH 2/2] Maintenance: Update cocopoads and pods. Automatic update to Swift4.2 --- CHANGES.rst | 2 +- Riot.xcodeproj/project.pbxproj | 11 ++++++----- Riot/Categories/UIControl.swift | 2 +- Riot/Categories/UIViewController.swift | 8 ++++---- Riot/Generated/Images.swift | 2 +- Riot/Generated/RiotDefaults.swift | 5 ++--- Riot/Generated/Storyboards.swift | 2 +- Riot/Managers/Theme/Theme.swift | 2 +- Riot/Managers/Theme/Themes/DarkTheme.swift | 4 ++-- Riot/Managers/Theme/Themes/DefaultTheme.swift | 4 ++-- .../Common/KeyboardAvoiding/KeyboardAvoider.swift | 10 +++++----- .../KeyboardAvoiding/KeyboardNotification.swift | 12 ++++++------ 12 files changed, 32 insertions(+), 32 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index cfa2d2659..57dc9ae60 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -3,7 +3,7 @@ Changes in 0.8.2 (2019-xx-xx) Improvements: * Upgrade MatrixKit version ([v0.9.6](https://github.com/matrix-org/matrix-ios-kit/releases/tag/v0.9.6). - * Maintenance: Update cocopoads and pods. + * Maintenance: Update cocopoads and pods. Automatic update to Swift4.2 Bug fix: * Reskin: status bar text is no more readable on iPad (#2276). diff --git a/Riot.xcodeproj/project.pbxproj b/Riot.xcodeproj/project.pbxproj index 6ed5783ba..6b4418e00 100644 --- a/Riot.xcodeproj/project.pbxproj +++ b/Riot.xcodeproj/project.pbxproj @@ -3013,6 +3013,7 @@ 24CBEC4D1F0EAD310093EABB = { CreatedOnToolsVersion = 8.3.2; DevelopmentTeam = 7J4U792NQT; + LastSwiftMigration = 1010; ProvisioningStyle = Automatic; SystemCapabilities = { com.apple.ApplicationGroups.iOS = { @@ -3033,7 +3034,7 @@ F094A9A11B78D8F000B1FBBF = { CreatedOnToolsVersion = 6.2; DevelopmentTeam = 7J4U792NQT; - LastSwiftMigration = 0940; + LastSwiftMigration = 1010; ProvisioningStyle = Automatic; SystemCapabilities = { com.apple.ApplicationGroups.iOS = { @@ -3805,7 +3806,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/$(PRODUCT_NAME)/SupportingFiles/RiotShareExtension-Bridging-Header.h"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -3839,7 +3840,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/$(PRODUCT_NAME)/SupportingFiles/RiotShareExtension-Bridging-Header.h"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -4035,7 +4036,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/$(PRODUCT_NAME)/SupportingFiles/Riot-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -4075,7 +4076,7 @@ PRODUCT_BUNDLE_IDENTIFIER = im.vector.app; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/$(PRODUCT_NAME)/SupportingFiles/Riot-Bridging-Header.h"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; diff --git a/Riot/Categories/UIControl.swift b/Riot/Categories/UIControl.swift index a6323581a..0706d4c96 100644 --- a/Riot/Categories/UIControl.swift +++ b/Riot/Categories/UIControl.swift @@ -31,7 +31,7 @@ class ClosureSleeve { } extension UIControl { - func vc_addAction(for controlEvents: UIControlEvents = .primaryActionTriggered, action: @escaping () -> ()) { + func vc_addAction(for controlEvents: UIControl.Event = .primaryActionTriggered, action: @escaping () -> ()) { let sleeve = ClosureSleeve(attachTo: self, closure: action) addTarget(sleeve, action: #selector(ClosureSleeve.invoke), for: controlEvents) } diff --git a/Riot/Categories/UIViewController.swift b/Riot/Categories/UIViewController.swift index 2b0e16155..e3aee9ad3 100644 --- a/Riot/Categories/UIViewController.swift +++ b/Riot/Categories/UIViewController.swift @@ -39,11 +39,11 @@ extension UIViewController { /// - viewController: The child view controller to add. /// - view: The view on which to add the child view controller view. func vc_addChildViewController(viewController: UIViewController, onView view: UIView) { - self.addChildViewController(viewController) + self.addChild(viewController) viewController.view.frame = view.bounds view.vc_addSubViewMatchingParent(viewController.view) - viewController.didMove(toParentViewController: self) + viewController.didMove(toParent: self) } @@ -51,9 +51,9 @@ extension UIViewController { /// /// - Parameter viewController: The child view controller to remove. func vc_removeChildViewController(viewController: UIViewController) { - viewController.willMove(toParentViewController: nil) + viewController.willMove(toParent: nil) viewController.view.removeFromSuperview() - viewController.removeFromParentViewController() + viewController.removeFromParent() } diff --git a/Riot/Generated/Images.swift b/Riot/Generated/Images.swift index 78ad0f5a7..486035dc0 100644 --- a/Riot/Generated/Images.swift +++ b/Riot/Generated/Images.swift @@ -1,5 +1,5 @@ // swiftlint:disable all -// Generated using SwiftGen, by O.Halligon — https://github.com/SwiftGen/SwiftGen +// Generated using SwiftGen — https://github.com/SwiftGen/SwiftGen #if os(OSX) import AppKit.NSImage diff --git a/Riot/Generated/RiotDefaults.swift b/Riot/Generated/RiotDefaults.swift index 66279954e..5c063181b 100644 --- a/Riot/Generated/RiotDefaults.swift +++ b/Riot/Generated/RiotDefaults.swift @@ -1,4 +1,5 @@ -// Generated using SwiftGen, by O.Halligon — https://github.com/SwiftGen/SwiftGen +// swiftlint:disable all +// Generated using SwiftGen — https://github.com/SwiftGen/SwiftGen import Foundation @@ -30,8 +31,6 @@ internal enum RiotDefaults { internal static let presenceColorForUnavailableUser: Int = _document["presenceColorForUnavailableUser"] internal static let pushGatewayURL: String = _document["pushGatewayURL"] internal static let pushKitAppIdProd: String = _document["pushKitAppIdProd"] - internal static let pusherAppIdDev: String = _document["pusherAppIdDev"] - internal static let pusherAppIdProd: String = _document["pusherAppIdProd"] internal static let roomDirectoryServers: [String: Any] = _document["roomDirectoryServers"] internal static let showAllEventsInRoomHistory: Bool = _document["showAllEventsInRoomHistory"] internal static let showLeftMembersInRoomMemberList: Bool = _document["showLeftMembersInRoomMemberList"] diff --git a/Riot/Generated/Storyboards.swift b/Riot/Generated/Storyboards.swift index 7b3025f9f..afafd57f1 100644 --- a/Riot/Generated/Storyboards.swift +++ b/Riot/Generated/Storyboards.swift @@ -1,5 +1,5 @@ // swiftlint:disable all -// Generated using SwiftGen, by O.Halligon — https://github.com/SwiftGen/SwiftGen +// Generated using SwiftGen — https://github.com/SwiftGen/SwiftGen // swiftlint:disable sorted_imports import Foundation diff --git a/Riot/Managers/Theme/Theme.swift b/Riot/Managers/Theme/Theme.swift index 50970fed0..241c9924c 100644 --- a/Riot/Managers/Theme/Theme.swift +++ b/Riot/Managers/Theme/Theme.swift @@ -58,7 +58,7 @@ import UIKit /// Status bar style to use var statusBarStyle: UIStatusBarStyle { get } - var scrollBarStyle: UIScrollViewIndicatorStyle { get } + var scrollBarStyle: UIScrollView.IndicatorStyle { get } var keyboardAppearance : UIKeyboardAppearance { get } diff --git a/Riot/Managers/Theme/Themes/DarkTheme.swift b/Riot/Managers/Theme/Themes/DarkTheme.swift index 8e50e1b7b..4d08afb07 100644 --- a/Riot/Managers/Theme/Themes/DarkTheme.swift +++ b/Riot/Managers/Theme/Themes/DarkTheme.swift @@ -53,7 +53,7 @@ class DarkTheme: NSObject, Theme { UIColor(rgb: 0xAC3BA8)] var statusBarStyle: UIStatusBarStyle = .lightContent - var scrollBarStyle: UIScrollViewIndicatorStyle = .white + var scrollBarStyle: UIScrollView.IndicatorStyle = .white var keyboardAppearance: UIKeyboardAppearance = .dark var placeholderTextColor: UIColor = UIColor(white: 1.0, alpha: 0.3) @@ -70,7 +70,7 @@ class DarkTheme: NSObject, Theme { func applyStyle(onNavigationBar navigationBar: UINavigationBar) { navigationBar.tintColor = self.baseTextPrimaryColor; navigationBar.titleTextAttributes = [ - NSAttributedStringKey.foregroundColor: self.baseTextPrimaryColor + NSAttributedString.Key.foregroundColor: self.baseTextPrimaryColor ] navigationBar.barTintColor = self.baseColor; diff --git a/Riot/Managers/Theme/Themes/DefaultTheme.swift b/Riot/Managers/Theme/Themes/DefaultTheme.swift index fb43f1fec..7690e6685 100644 --- a/Riot/Managers/Theme/Themes/DefaultTheme.swift +++ b/Riot/Managers/Theme/Themes/DefaultTheme.swift @@ -53,7 +53,7 @@ class DefaultTheme: NSObject, Theme { UIColor(rgb: 0xAC3BA8)] var statusBarStyle: UIStatusBarStyle = .lightContent - var scrollBarStyle: UIScrollViewIndicatorStyle = .default + var scrollBarStyle: UIScrollView.IndicatorStyle = .default var keyboardAppearance: UIKeyboardAppearance = .light var placeholderTextColor: UIColor = UIColor(white: 0.7, alpha: 1.0) // Use default 70% gray color @@ -70,7 +70,7 @@ class DefaultTheme: NSObject, Theme { func applyStyle(onNavigationBar navigationBar: UINavigationBar) { navigationBar.tintColor = self.baseTextPrimaryColor; navigationBar.titleTextAttributes = [ - NSAttributedStringKey.foregroundColor: self.baseTextPrimaryColor + NSAttributedString.Key.foregroundColor: self.baseTextPrimaryColor ] navigationBar.barTintColor = self.baseColor; diff --git a/Riot/Modules/Common/KeyboardAvoiding/KeyboardAvoider.swift b/Riot/Modules/Common/KeyboardAvoiding/KeyboardAvoider.swift index aa23f7efc..3413dabd6 100644 --- a/Riot/Modules/Common/KeyboardAvoiding/KeyboardAvoider.swift +++ b/Riot/Modules/Common/KeyboardAvoiding/KeyboardAvoider.swift @@ -23,7 +23,7 @@ final class KeyboardAvoider { private enum KeyboardAnimation { static let defaultDuration: TimeInterval = 0.25 - static let defaultAnimationCurveRawValue: Int = UIViewAnimationCurve.easeInOut.rawValue + static let defaultAnimationCurveRawValue: Int = UIView.AnimationCurve.easeInOut.rawValue } // MARK: - Properties @@ -61,18 +61,18 @@ final class KeyboardAvoider { notificationCenter.addObserver( self, selector: #selector(keyboardWillShow(notification:)), - name: .UIKeyboardWillShow, + name: UIResponder.keyboardWillShowNotification, object: nil) notificationCenter.addObserver( self, selector: #selector(keyboardWillHide(notification:)), - name: .UIKeyboardWillHide, + name: UIResponder.keyboardWillHideNotification, object: nil) } private func unregisterKeyboardNotifications() { - NotificationCenter.default.removeObserver(self, name: .UIKeyboardWillShow, object: nil) - NotificationCenter.default.removeObserver(self, name: .UIKeyboardWillHide, object: nil) + NotificationCenter.default.removeObserver(self, name: UIResponder.keyboardWillShowNotification, object: nil) + NotificationCenter.default.removeObserver(self, name: UIResponder.keyboardWillHideNotification, object: nil) } @objc private func keyboardWillShow(notification: Notification) { diff --git a/Riot/Modules/Common/KeyboardAvoiding/KeyboardNotification.swift b/Riot/Modules/Common/KeyboardAvoiding/KeyboardNotification.swift index c07af2cc4..cebf3eddd 100644 --- a/Riot/Modules/Common/KeyboardAvoiding/KeyboardNotification.swift +++ b/Riot/Modules/Common/KeyboardAvoiding/KeyboardNotification.swift @@ -29,21 +29,21 @@ public struct KeyboardNotification { } public var keyboardFrameBegin: CGRect? { - guard let value = userInfo[UIKeyboardFrameBeginUserInfoKey] as? NSValue else { + guard let value = userInfo[UIResponder.keyboardFrameBeginUserInfoKey] as? NSValue else { return nil } return value.cgRectValue } public var keyboardFrameEnd: CGRect? { - guard let value = userInfo[UIKeyboardFrameEndUserInfoKey] as? NSValue else { + guard let value = userInfo[UIResponder.keyboardFrameEndUserInfoKey] as? NSValue else { return nil } return value.cgRectValue } public var animationDuration: TimeInterval? { - guard let number = userInfo[UIKeyboardAnimationDurationUserInfoKey] as? NSNumber else { + guard let number = userInfo[UIResponder.keyboardAnimationDurationUserInfoKey] as? NSNumber else { return nil } return number.doubleValue @@ -51,15 +51,15 @@ public struct KeyboardNotification { /// Keyboard UIViewAnimationCurve enum raw value public var animationCurveRawValue: Int? { - guard let number = userInfo[UIKeyboardAnimationCurveUserInfoKey] as? NSNumber else { + guard let number = userInfo[UIResponder.keyboardAnimationCurveUserInfoKey] as? NSNumber else { return nil } return number.intValue } /// Convert UIViewAnimationCurve raw value to UIViewAnimationOptions - public func animationOptions(fallbackAnimationCurveValue: Int = UIViewAnimationCurve.easeInOut.rawValue) -> UIViewAnimationOptions { + public func animationOptions(fallbackAnimationCurveValue: Int = UIView.AnimationCurve.easeInOut.rawValue) -> UIView.AnimationOptions { let animationCurveRawValue = self.animationCurveRawValue ?? fallbackAnimationCurveValue - return UIViewAnimationOptions(rawValue: UInt(animationCurveRawValue << 16)) + return UIView.AnimationOptions(rawValue: UInt(animationCurveRawValue << 16)) } }