mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-28 23:32:41 +00:00
Maintenance: Update cocopoads and pods. Automatic update to Swift4.2
This commit is contained in:
parent
16b632fc0c
commit
7a5c0bef99
12 changed files with 32 additions and 32 deletions
|
@ -3,7 +3,7 @@ Changes in 0.8.2 (2019-xx-xx)
|
||||||
|
|
||||||
Improvements:
|
Improvements:
|
||||||
* Upgrade MatrixKit version ([v0.9.6](https://github.com/matrix-org/matrix-ios-kit/releases/tag/v0.9.6).
|
* 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:
|
Bug fix:
|
||||||
* Reskin: status bar text is no more readable on iPad (#2276).
|
* Reskin: status bar text is no more readable on iPad (#2276).
|
||||||
|
|
|
@ -3013,6 +3013,7 @@
|
||||||
24CBEC4D1F0EAD310093EABB = {
|
24CBEC4D1F0EAD310093EABB = {
|
||||||
CreatedOnToolsVersion = 8.3.2;
|
CreatedOnToolsVersion = 8.3.2;
|
||||||
DevelopmentTeam = 7J4U792NQT;
|
DevelopmentTeam = 7J4U792NQT;
|
||||||
|
LastSwiftMigration = 1010;
|
||||||
ProvisioningStyle = Automatic;
|
ProvisioningStyle = Automatic;
|
||||||
SystemCapabilities = {
|
SystemCapabilities = {
|
||||||
com.apple.ApplicationGroups.iOS = {
|
com.apple.ApplicationGroups.iOS = {
|
||||||
|
@ -3033,7 +3034,7 @@
|
||||||
F094A9A11B78D8F000B1FBBF = {
|
F094A9A11B78D8F000B1FBBF = {
|
||||||
CreatedOnToolsVersion = 6.2;
|
CreatedOnToolsVersion = 6.2;
|
||||||
DevelopmentTeam = 7J4U792NQT;
|
DevelopmentTeam = 7J4U792NQT;
|
||||||
LastSwiftMigration = 0940;
|
LastSwiftMigration = 1010;
|
||||||
ProvisioningStyle = Automatic;
|
ProvisioningStyle = Automatic;
|
||||||
SystemCapabilities = {
|
SystemCapabilities = {
|
||||||
com.apple.ApplicationGroups.iOS = {
|
com.apple.ApplicationGroups.iOS = {
|
||||||
|
@ -3805,7 +3806,7 @@
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/$(PRODUCT_NAME)/SupportingFiles/RiotShareExtension-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/$(PRODUCT_NAME)/SupportingFiles/RiotShareExtension-Bridging-Header.h";
|
||||||
SWIFT_VERSION = 4.0;
|
SWIFT_VERSION = 4.2;
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
};
|
};
|
||||||
|
@ -3839,7 +3840,7 @@
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/$(PRODUCT_NAME)/SupportingFiles/RiotShareExtension-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/$(PRODUCT_NAME)/SupportingFiles/RiotShareExtension-Bridging-Header.h";
|
||||||
SWIFT_VERSION = 4.0;
|
SWIFT_VERSION = 4.2;
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
};
|
};
|
||||||
|
@ -4035,7 +4036,7 @@
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/$(PRODUCT_NAME)/SupportingFiles/Riot-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/$(PRODUCT_NAME)/SupportingFiles/Riot-Bridging-Header.h";
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
SWIFT_VERSION = 4.0;
|
SWIFT_VERSION = 4.2;
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
|
@ -4075,7 +4076,7 @@
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = im.vector.app;
|
PRODUCT_BUNDLE_IDENTIFIER = im.vector.app;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/$(PRODUCT_NAME)/SupportingFiles/Riot-Bridging-Header.h";
|
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";
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
|
|
|
@ -31,7 +31,7 @@ class ClosureSleeve {
|
||||||
}
|
}
|
||||||
|
|
||||||
extension UIControl {
|
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)
|
let sleeve = ClosureSleeve(attachTo: self, closure: action)
|
||||||
addTarget(sleeve, action: #selector(ClosureSleeve.invoke), for: controlEvents)
|
addTarget(sleeve, action: #selector(ClosureSleeve.invoke), for: controlEvents)
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,11 +39,11 @@ extension UIViewController {
|
||||||
/// - viewController: The child view controller to add.
|
/// - viewController: The child view controller to add.
|
||||||
/// - view: The view on which to add the child view controller view.
|
/// - view: The view on which to add the child view controller view.
|
||||||
func vc_addChildViewController(viewController: UIViewController, onView view: UIView) {
|
func vc_addChildViewController(viewController: UIViewController, onView view: UIView) {
|
||||||
self.addChildViewController(viewController)
|
self.addChild(viewController)
|
||||||
|
|
||||||
viewController.view.frame = view.bounds
|
viewController.view.frame = view.bounds
|
||||||
view.vc_addSubViewMatchingParent(viewController.view)
|
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.
|
/// - Parameter viewController: The child view controller to remove.
|
||||||
func vc_removeChildViewController(viewController: UIViewController) {
|
func vc_removeChildViewController(viewController: UIViewController) {
|
||||||
viewController.willMove(toParentViewController: nil)
|
viewController.willMove(toParent: nil)
|
||||||
viewController.view.removeFromSuperview()
|
viewController.view.removeFromSuperview()
|
||||||
viewController.removeFromParentViewController()
|
viewController.removeFromParent()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// swiftlint:disable all
|
// 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)
|
#if os(OSX)
|
||||||
import AppKit.NSImage
|
import AppKit.NSImage
|
||||||
|
|
|
@ -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
|
import Foundation
|
||||||
|
|
||||||
|
@ -30,8 +31,6 @@ internal enum RiotDefaults {
|
||||||
internal static let presenceColorForUnavailableUser: Int = _document["presenceColorForUnavailableUser"]
|
internal static let presenceColorForUnavailableUser: Int = _document["presenceColorForUnavailableUser"]
|
||||||
internal static let pushGatewayURL: String = _document["pushGatewayURL"]
|
internal static let pushGatewayURL: String = _document["pushGatewayURL"]
|
||||||
internal static let pushKitAppIdProd: String = _document["pushKitAppIdProd"]
|
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 roomDirectoryServers: [String: Any] = _document["roomDirectoryServers"]
|
||||||
internal static let showAllEventsInRoomHistory: Bool = _document["showAllEventsInRoomHistory"]
|
internal static let showAllEventsInRoomHistory: Bool = _document["showAllEventsInRoomHistory"]
|
||||||
internal static let showLeftMembersInRoomMemberList: Bool = _document["showLeftMembersInRoomMemberList"]
|
internal static let showLeftMembersInRoomMemberList: Bool = _document["showLeftMembersInRoomMemberList"]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// swiftlint:disable all
|
// 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
|
// swiftlint:disable sorted_imports
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
|
@ -58,7 +58,7 @@ import UIKit
|
||||||
/// Status bar style to use
|
/// Status bar style to use
|
||||||
var statusBarStyle: UIStatusBarStyle { get }
|
var statusBarStyle: UIStatusBarStyle { get }
|
||||||
|
|
||||||
var scrollBarStyle: UIScrollViewIndicatorStyle { get }
|
var scrollBarStyle: UIScrollView.IndicatorStyle { get }
|
||||||
|
|
||||||
var keyboardAppearance : UIKeyboardAppearance { get }
|
var keyboardAppearance : UIKeyboardAppearance { get }
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ class DarkTheme: NSObject, Theme {
|
||||||
UIColor(rgb: 0xAC3BA8)]
|
UIColor(rgb: 0xAC3BA8)]
|
||||||
|
|
||||||
var statusBarStyle: UIStatusBarStyle = .lightContent
|
var statusBarStyle: UIStatusBarStyle = .lightContent
|
||||||
var scrollBarStyle: UIScrollViewIndicatorStyle = .white
|
var scrollBarStyle: UIScrollView.IndicatorStyle = .white
|
||||||
var keyboardAppearance: UIKeyboardAppearance = .dark
|
var keyboardAppearance: UIKeyboardAppearance = .dark
|
||||||
|
|
||||||
var placeholderTextColor: UIColor = UIColor(white: 1.0, alpha: 0.3)
|
var placeholderTextColor: UIColor = UIColor(white: 1.0, alpha: 0.3)
|
||||||
|
@ -70,7 +70,7 @@ class DarkTheme: NSObject, Theme {
|
||||||
func applyStyle(onNavigationBar navigationBar: UINavigationBar) {
|
func applyStyle(onNavigationBar navigationBar: UINavigationBar) {
|
||||||
navigationBar.tintColor = self.baseTextPrimaryColor;
|
navigationBar.tintColor = self.baseTextPrimaryColor;
|
||||||
navigationBar.titleTextAttributes = [
|
navigationBar.titleTextAttributes = [
|
||||||
NSAttributedStringKey.foregroundColor: self.baseTextPrimaryColor
|
NSAttributedString.Key.foregroundColor: self.baseTextPrimaryColor
|
||||||
]
|
]
|
||||||
navigationBar.barTintColor = self.baseColor;
|
navigationBar.barTintColor = self.baseColor;
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ class DefaultTheme: NSObject, Theme {
|
||||||
UIColor(rgb: 0xAC3BA8)]
|
UIColor(rgb: 0xAC3BA8)]
|
||||||
|
|
||||||
var statusBarStyle: UIStatusBarStyle = .lightContent
|
var statusBarStyle: UIStatusBarStyle = .lightContent
|
||||||
var scrollBarStyle: UIScrollViewIndicatorStyle = .default
|
var scrollBarStyle: UIScrollView.IndicatorStyle = .default
|
||||||
var keyboardAppearance: UIKeyboardAppearance = .light
|
var keyboardAppearance: UIKeyboardAppearance = .light
|
||||||
|
|
||||||
var placeholderTextColor: UIColor = UIColor(white: 0.7, alpha: 1.0) // Use default 70% gray color
|
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) {
|
func applyStyle(onNavigationBar navigationBar: UINavigationBar) {
|
||||||
navigationBar.tintColor = self.baseTextPrimaryColor;
|
navigationBar.tintColor = self.baseTextPrimaryColor;
|
||||||
navigationBar.titleTextAttributes = [
|
navigationBar.titleTextAttributes = [
|
||||||
NSAttributedStringKey.foregroundColor: self.baseTextPrimaryColor
|
NSAttributedString.Key.foregroundColor: self.baseTextPrimaryColor
|
||||||
]
|
]
|
||||||
navigationBar.barTintColor = self.baseColor;
|
navigationBar.barTintColor = self.baseColor;
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ final class KeyboardAvoider {
|
||||||
|
|
||||||
private enum KeyboardAnimation {
|
private enum KeyboardAnimation {
|
||||||
static let defaultDuration: TimeInterval = 0.25
|
static let defaultDuration: TimeInterval = 0.25
|
||||||
static let defaultAnimationCurveRawValue: Int = UIViewAnimationCurve.easeInOut.rawValue
|
static let defaultAnimationCurveRawValue: Int = UIView.AnimationCurve.easeInOut.rawValue
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Properties
|
// MARK: - Properties
|
||||||
|
@ -61,18 +61,18 @@ final class KeyboardAvoider {
|
||||||
notificationCenter.addObserver(
|
notificationCenter.addObserver(
|
||||||
self,
|
self,
|
||||||
selector: #selector(keyboardWillShow(notification:)),
|
selector: #selector(keyboardWillShow(notification:)),
|
||||||
name: .UIKeyboardWillShow,
|
name: UIResponder.keyboardWillShowNotification,
|
||||||
object: nil)
|
object: nil)
|
||||||
notificationCenter.addObserver(
|
notificationCenter.addObserver(
|
||||||
self,
|
self,
|
||||||
selector: #selector(keyboardWillHide(notification:)),
|
selector: #selector(keyboardWillHide(notification:)),
|
||||||
name: .UIKeyboardWillHide,
|
name: UIResponder.keyboardWillHideNotification,
|
||||||
object: nil)
|
object: nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
private func unregisterKeyboardNotifications() {
|
private func unregisterKeyboardNotifications() {
|
||||||
NotificationCenter.default.removeObserver(self, name: .UIKeyboardWillShow, object: nil)
|
NotificationCenter.default.removeObserver(self, name: UIResponder.keyboardWillShowNotification, object: nil)
|
||||||
NotificationCenter.default.removeObserver(self, name: .UIKeyboardWillHide, object: nil)
|
NotificationCenter.default.removeObserver(self, name: UIResponder.keyboardWillHideNotification, object: nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
@objc private func keyboardWillShow(notification: Notification) {
|
@objc private func keyboardWillShow(notification: Notification) {
|
||||||
|
|
|
@ -29,21 +29,21 @@ public struct KeyboardNotification {
|
||||||
}
|
}
|
||||||
|
|
||||||
public var keyboardFrameBegin: CGRect? {
|
public var keyboardFrameBegin: CGRect? {
|
||||||
guard let value = userInfo[UIKeyboardFrameBeginUserInfoKey] as? NSValue else {
|
guard let value = userInfo[UIResponder.keyboardFrameBeginUserInfoKey] as? NSValue else {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return value.cgRectValue
|
return value.cgRectValue
|
||||||
}
|
}
|
||||||
|
|
||||||
public var keyboardFrameEnd: CGRect? {
|
public var keyboardFrameEnd: CGRect? {
|
||||||
guard let value = userInfo[UIKeyboardFrameEndUserInfoKey] as? NSValue else {
|
guard let value = userInfo[UIResponder.keyboardFrameEndUserInfoKey] as? NSValue else {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return value.cgRectValue
|
return value.cgRectValue
|
||||||
}
|
}
|
||||||
|
|
||||||
public var animationDuration: TimeInterval? {
|
public var animationDuration: TimeInterval? {
|
||||||
guard let number = userInfo[UIKeyboardAnimationDurationUserInfoKey] as? NSNumber else {
|
guard let number = userInfo[UIResponder.keyboardAnimationDurationUserInfoKey] as? NSNumber else {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return number.doubleValue
|
return number.doubleValue
|
||||||
|
@ -51,15 +51,15 @@ public struct KeyboardNotification {
|
||||||
|
|
||||||
/// Keyboard UIViewAnimationCurve enum raw value
|
/// Keyboard UIViewAnimationCurve enum raw value
|
||||||
public var animationCurveRawValue: Int? {
|
public var animationCurveRawValue: Int? {
|
||||||
guard let number = userInfo[UIKeyboardAnimationCurveUserInfoKey] as? NSNumber else {
|
guard let number = userInfo[UIResponder.keyboardAnimationCurveUserInfoKey] as? NSNumber else {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return number.intValue
|
return number.intValue
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Convert UIViewAnimationCurve raw value to UIViewAnimationOptions
|
/// 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
|
let animationCurveRawValue = self.animationCurveRawValue ?? fallbackAnimationCurveValue
|
||||||
return UIViewAnimationOptions(rawValue: UInt(animationCurveRawValue << 16))
|
return UIView.AnimationOptions(rawValue: UInt(animationCurveRawValue << 16))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue