From 7a942711a6e42f9b27f5b318b44bb5c106cd9ef9 Mon Sep 17 00:00:00 2001 From: Nathan Tannar Date: Fri, 5 Apr 2019 09:37:57 -0700 Subject: [PATCH 01/12] Convert to Swift 5 / Fix Linting --- .circleci/config.yml | 2 +- .swift-version | 2 +- .swiftlint.yml | 1 - Cartfile | 2 +- Cartfile.private | 4 +-- Cartfile.resolved | 6 ++--- MessageKit.podspec | 8 +++--- MessageKit.xcodeproj/project.pbxproj | 13 +++++---- .../xcschemes/MessageKit.xcscheme | 2 +- .../xcschemes/MessageKitTests.xcscheme | 2 +- .../MessagesViewController+Keyboard.swift | 10 +++---- .../MessagesViewController+Menu.swift | 6 ++--- Sources/Extensions/Bundle+Extensions.swift | 4 +-- Sources/Extensions/CGRect+Extensions.swift | 4 +-- .../NSAttributedString+Extensions.swift | 4 +-- Sources/Extensions/UIColor+Extensions.swift | 12 ++++----- .../Extensions/UIEdgeInsets+Extensions.swift | 6 ++--- Sources/Extensions/UIImage+Extension.swift | 2 +- Sources/Extensions/UIView+Extensions.swift | 10 +++---- Sources/Models/AvatarPosition.swift | 8 +++--- Sources/Models/DetectorType.swift | 4 +-- Sources/Models/HorizontalEdgeInsets.swift | 12 +++++---- Sources/Models/LabelAlignment.swift | 6 ++--- Sources/Models/Sender.swift | 6 ++--- Sources/Supporting/MessageInputBar.swift | 27 ++----------------- 25 files changed, 72 insertions(+), 91 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e4c9ab21..e2a5ffbc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,7 +12,7 @@ jobs: # Specify the Xcode version to use. macos: - xcode: "10.0.0" + xcode: "10.2.0" # Define the steps required to build the project. steps: diff --git a/.swift-version b/.swift-version index bf77d549..819e07a2 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -4.2 +5.0 diff --git a/.swiftlint.yml b/.swiftlint.yml index 8bf8a3da..5ebf9e77 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -12,7 +12,6 @@ custom_rules: message: "Use like open override or public override instead" # violation message. optional. severity: warning # violation severity. optional. opt_in_rules: - - explicit_acl - explicit_top_level_acl explicit_acl: error explicit_top_level_acl: error diff --git a/Cartfile b/Cartfile index 50814158..ed7bec6d 100644 --- a/Cartfile +++ b/Cartfile @@ -1 +1 @@ -github "nathantannar4/InputBarAccessoryView" "4.2.1" +github "nathantannar4/InputBarAccessoryView" "4.3.0" diff --git a/Cartfile.private b/Cartfile.private index afc87ddb..29d169d6 100644 --- a/Cartfile.private +++ b/Cartfile.private @@ -1,2 +1,2 @@ -github "Quick/Quick" ~> 1.2.0 -github "Quick/Nimble" ~> 7.0.3 +github "Quick/Quick" ~> 2.0.0 +github "Quick/Nimble" ~> 8.0.0 diff --git a/Cartfile.resolved b/Cartfile.resolved index c12c3fca..7acd3164 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,3 +1,3 @@ -github "Quick/Nimble" "v7.3.4" -github "Quick/Quick" "v1.3.4" -github "nathantannar4/InputBarAccessoryView" "4.2.1" +github "Quick/Nimble" "v8.0.1" +github "Quick/Quick" "v2.0.0" +github "nathantannar4/InputBarAccessoryView" "4.3.0" diff --git a/MessageKit.podspec b/MessageKit.podspec index f6948f72..c486d5b6 100644 --- a/MessageKit.podspec +++ b/MessageKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'MessageKit' - s.version = '3.0.0-beta-swift4-2' + s.version = '3.0.0-beta-swift5' s.license = { :type => "MIT", :file => "LICENSE.md" } s.summary = 'An elegant messages UI library for iOS.' @@ -12,16 +12,16 @@ Pod::Spec.new do |s| s.source_files = 'Sources/**/*.swift' s.pod_target_xcconfig = { - "SWIFT_VERSION" => "4.2", + "SWIFT_VERSION" => "5.0", } - s.swift_version = '4.2' + s.swift_version = '5.0' s.ios.deployment_target = '9.0' s.ios.resource_bundle = { 'MessageKitAssets' => 'Assets/MessageKitAssets.bundle/Images' } s.requires_arc = true - s.dependency 'InputBarAccessoryView' + s.dependency 'InputBarAccessoryView', '~> 4.3.0' end diff --git a/MessageKit.xcodeproj/project.pbxproj b/MessageKit.xcodeproj/project.pbxproj index 08abc0b6..d178c1d6 100644 --- a/MessageKit.xcodeproj/project.pbxproj +++ b/MessageKit.xcodeproj/project.pbxproj @@ -563,7 +563,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0730; - LastUpgradeCheck = 0940; + LastUpgradeCheck = 1020; ORGANIZATIONNAME = MessageKit; TargetAttributes = { 88916B211CF0DF2F00469F91 = { @@ -580,6 +580,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, ); mainGroup = 88916B181CF0DF2F00469F91; @@ -737,6 +738,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -786,7 +788,7 @@ ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -797,6 +799,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -838,7 +841,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 9.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -868,7 +871,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -894,7 +897,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Release; }; diff --git a/MessageKit.xcodeproj/xcshareddata/xcschemes/MessageKit.xcscheme b/MessageKit.xcodeproj/xcshareddata/xcschemes/MessageKit.xcscheme index 0bb9eb20..1f6e5d93 100644 --- a/MessageKit.xcodeproj/xcshareddata/xcschemes/MessageKit.xcscheme +++ b/MessageKit.xcodeproj/xcshareddata/xcschemes/MessageKit.xcscheme @@ -1,6 +1,6 @@ CGFloat { + func requiredInitialScrollViewBottomInset() -> CGFloat { guard let inputAccessoryView = inputAccessoryView else { return 0 } return max(0, inputAccessoryView.frame.height + additionalBottomInset - automaticallyAddedBottomInset) } diff --git a/Sources/Controllers/MessagesViewController+Menu.swift b/Sources/Controllers/MessagesViewController+Menu.swift index fc1cb5a2..9a02f20b 100644 --- a/Sources/Controllers/MessagesViewController+Menu.swift +++ b/Sources/Controllers/MessagesViewController+Menu.swift @@ -24,15 +24,15 @@ import Foundation -extension MessagesViewController { +internal extension MessagesViewController { // MARK: - Register / Unregister Observers - internal func addMenuControllerObservers() { + func addMenuControllerObservers() { NotificationCenter.default.addObserver(self, selector: #selector(MessagesViewController.menuControllerWillShow(_:)), name: UIMenuController.willShowMenuNotification, object: nil) } - internal func removeMenuControllerObservers() { + func removeMenuControllerObservers() { NotificationCenter.default.removeObserver(self, name: UIMenuController.willShowMenuNotification, object: nil) } diff --git a/Sources/Extensions/Bundle+Extensions.swift b/Sources/Extensions/Bundle+Extensions.swift index 17dda2e8..ea13d297 100644 --- a/Sources/Extensions/Bundle+Extensions.swift +++ b/Sources/Extensions/Bundle+Extensions.swift @@ -24,9 +24,9 @@ import Foundation -extension Bundle { +internal extension Bundle { - internal static func messageKitAssetBundle() -> Bundle { + static func messageKitAssetBundle() -> Bundle { let podBundle = Bundle(for: MessagesViewController.self) guard let resourceBundleUrl = podBundle.url(forResource: "MessageKitAssets", withExtension: "bundle") else { diff --git a/Sources/Extensions/CGRect+Extensions.swift b/Sources/Extensions/CGRect+Extensions.swift index 17e4347e..f5112a3d 100644 --- a/Sources/Extensions/CGRect+Extensions.swift +++ b/Sources/Extensions/CGRect+Extensions.swift @@ -24,9 +24,9 @@ import Foundation -extension CGRect { +internal extension CGRect { - internal init(_ x: CGFloat, _ y: CGFloat, _ w: CGFloat, _ h: CGFloat) { + init(_ x: CGFloat, _ y: CGFloat, _ w: CGFloat, _ h: CGFloat) { self.init(x: x, y: y, width: w, height: h) } diff --git a/Sources/Extensions/NSAttributedString+Extensions.swift b/Sources/Extensions/NSAttributedString+Extensions.swift index 430a64c5..e0fe3760 100644 --- a/Sources/Extensions/NSAttributedString+Extensions.swift +++ b/Sources/Extensions/NSAttributedString+Extensions.swift @@ -24,9 +24,9 @@ import Foundation -extension NSAttributedString { +internal extension NSAttributedString { - internal func width(considering height: CGFloat) -> CGFloat { + func width(considering height: CGFloat) -> CGFloat { let constraintBox = CGSize(width: .greatestFiniteMagnitude, height: height) let rect = self.boundingRect(with: constraintBox, options: [.usesLineFragmentOrigin, .usesFontLeading], context: nil) diff --git a/Sources/Extensions/UIColor+Extensions.swift b/Sources/Extensions/UIColor+Extensions.swift index 02f5819c..0d85ba9e 100644 --- a/Sources/Extensions/UIColor+Extensions.swift +++ b/Sources/Extensions/UIColor+Extensions.swift @@ -24,16 +24,16 @@ import Foundation -extension UIColor { +internal extension UIColor { - internal static let incomingGray = UIColor(red: 230/255, green: 230/255, blue: 235/255, alpha: 1.0) + static let incomingGray = UIColor(red: 230/255, green: 230/255, blue: 235/255, alpha: 1.0) - internal static let outgoingGreen = UIColor(red: 69/255, green: 214/255, blue: 93/255, alpha: 1.0) + static let outgoingGreen = UIColor(red: 69/255, green: 214/255, blue: 93/255, alpha: 1.0) - internal static let inputBarGray = UIColor(red: 247/255, green: 247/255, blue: 247/255, alpha: 1.0) + static let inputBarGray = UIColor(red: 247/255, green: 247/255, blue: 247/255, alpha: 1.0) - internal static let playButtonLightGray = UIColor(red: 230/255, green: 230/255, blue: 230/255, alpha: 1.0) + static let playButtonLightGray = UIColor(red: 230/255, green: 230/255, blue: 230/255, alpha: 1.0) - internal static let sendButtonBlue = UIColor(red: 15/255, green: 135/255, blue: 255/255, alpha: 1.0) + static let sendButtonBlue = UIColor(red: 15/255, green: 135/255, blue: 255/255, alpha: 1.0) } diff --git a/Sources/Extensions/UIEdgeInsets+Extensions.swift b/Sources/Extensions/UIEdgeInsets+Extensions.swift index 8e259f56..bd938be8 100644 --- a/Sources/Extensions/UIEdgeInsets+Extensions.swift +++ b/Sources/Extensions/UIEdgeInsets+Extensions.swift @@ -24,13 +24,13 @@ import Foundation -extension UIEdgeInsets { +internal extension UIEdgeInsets { - internal var vertical: CGFloat { + var vertical: CGFloat { return top + bottom } - internal var horizontal: CGFloat { + var horizontal: CGFloat { return left + right } diff --git a/Sources/Extensions/UIImage+Extension.swift b/Sources/Extensions/UIImage+Extension.swift index 157fd0f4..5195a1e7 100644 --- a/Sources/Extensions/UIImage+Extension.swift +++ b/Sources/Extensions/UIImage+Extension.swift @@ -33,7 +33,7 @@ import UIKit /// This extension provide a way to access image resources with in framework public extension UIImage { - public class func messageKitImageWith(type: ImageType) -> UIImage? { + class func messageKitImageWith(type: ImageType) -> UIImage? { let assetBundle = Bundle.messageKitAssetBundle() let imagePath = assetBundle.path(forResource: type.rawValue, ofType: "png", inDirectory: "Images") let image = UIImage(contentsOfFile: imagePath ?? "") diff --git a/Sources/Extensions/UIView+Extensions.swift b/Sources/Extensions/UIView+Extensions.swift index 8eb50bbf..42bbbbd9 100644 --- a/Sources/Extensions/UIView+Extensions.swift +++ b/Sources/Extensions/UIView+Extensions.swift @@ -24,9 +24,9 @@ import UIKit -extension UIView { +internal extension UIView { - internal func fillSuperview() { + func fillSuperview() { guard let superview = self.superview else { return } @@ -41,7 +41,7 @@ extension UIView { NSLayoutConstraint.activate(constraints) } - internal func centerInSuperview() { + func centerInSuperview() { guard let superview = self.superview else { return } @@ -53,7 +53,7 @@ extension UIView { NSLayoutConstraint.activate(constraints) } - internal func constraint(equalTo size: CGSize) { + func constraint(equalTo size: CGSize) { guard superview != nil else { return } translatesAutoresizingMaskIntoConstraints = false let constraints: [NSLayoutConstraint] = [ @@ -65,7 +65,7 @@ extension UIView { } @discardableResult - internal func addConstraints(_ top: NSLayoutYAxisAnchor? = nil, left: NSLayoutXAxisAnchor? = nil, bottom: NSLayoutYAxisAnchor? = nil, right: NSLayoutXAxisAnchor? = nil, centerY: NSLayoutYAxisAnchor? = nil, centerX: NSLayoutXAxisAnchor? = nil, topConstant: CGFloat = 0, leftConstant: CGFloat = 0, bottomConstant: CGFloat = 0, rightConstant: CGFloat = 0, centerYConstant: CGFloat = 0, centerXConstant: CGFloat = 0, widthConstant: CGFloat = 0, heightConstant: CGFloat = 0) -> [NSLayoutConstraint] { + func addConstraints(_ top: NSLayoutYAxisAnchor? = nil, left: NSLayoutXAxisAnchor? = nil, bottom: NSLayoutYAxisAnchor? = nil, right: NSLayoutXAxisAnchor? = nil, centerY: NSLayoutYAxisAnchor? = nil, centerX: NSLayoutXAxisAnchor? = nil, topConstant: CGFloat = 0, leftConstant: CGFloat = 0, bottomConstant: CGFloat = 0, rightConstant: CGFloat = 0, centerYConstant: CGFloat = 0, centerXConstant: CGFloat = 0, widthConstant: CGFloat = 0, heightConstant: CGFloat = 0) -> [NSLayoutConstraint] { if self.superview == nil { return [] diff --git a/Sources/Models/AvatarPosition.swift b/Sources/Models/AvatarPosition.swift index 6421e48f..c62c99fe 100644 --- a/Sources/Models/AvatarPosition.swift +++ b/Sources/Models/AvatarPosition.swift @@ -26,7 +26,7 @@ import Foundation /// Used to determine the `Horizontal` and `Vertical` position of // an `AvatarView` in a `MessageCollectionViewCell`. -public struct AvatarPosition { +public struct AvatarPosition: Equatable { /// An enum representing the horizontal alignment of an `AvatarView`. public enum Horizontal { @@ -89,10 +89,10 @@ public struct AvatarPosition { // MARK: - Equatable Conformance -extension AvatarPosition: Equatable { +public extension AvatarPosition { - public static func == (lhs: AvatarPosition, rhs: AvatarPosition) -> Bool { + static func == (lhs: AvatarPosition, rhs: AvatarPosition) -> Bool { return lhs.vertical == rhs.vertical && lhs.horizontal == rhs.horizontal } - + } diff --git a/Sources/Models/DetectorType.swift b/Sources/Models/DetectorType.swift index 0dfd651a..1b711a77 100644 --- a/Sources/Models/DetectorType.swift +++ b/Sources/Models/DetectorType.swift @@ -58,8 +58,8 @@ public enum DetectorType: Hashable { } ///The hashValue of the `DetectorType` so we can conform to `Hashable` and be sorted. - public var hashValue: Int { - return self.toInt() + public func hash(into hasher: inout Hasher) { + hasher.combine(toInt()) } /// Return an 'Int' value for each `DetectorType` type so `DetectorType` can conform to `Hashable` diff --git a/Sources/Models/HorizontalEdgeInsets.swift b/Sources/Models/HorizontalEdgeInsets.swift index 7e92b030..91461fa9 100644 --- a/Sources/Models/HorizontalEdgeInsets.swift +++ b/Sources/Models/HorizontalEdgeInsets.swift @@ -25,7 +25,7 @@ import Foundation /// A varient of `UIEdgeInsets` that only has horizontal inset properties -public struct HorizontalEdgeInsets { +public struct HorizontalEdgeInsets: Equatable { public var left: CGFloat public var right: CGFloat @@ -40,16 +40,18 @@ public struct HorizontalEdgeInsets { } } -extension HorizontalEdgeInsets: Equatable { +// MARK: Equatable Conformance - public static func == (lhs: HorizontalEdgeInsets, rhs: HorizontalEdgeInsets) -> Bool { +public extension HorizontalEdgeInsets { + + static func == (lhs: HorizontalEdgeInsets, rhs: HorizontalEdgeInsets) -> Bool { return lhs.left == rhs.left && lhs.right == rhs.right } } -extension HorizontalEdgeInsets { +internal extension HorizontalEdgeInsets { - internal var horizontal: CGFloat { + var horizontal: CGFloat { return left + right } } diff --git a/Sources/Models/LabelAlignment.swift b/Sources/Models/LabelAlignment.swift index 2c6b0ba2..31465075 100644 --- a/Sources/Models/LabelAlignment.swift +++ b/Sources/Models/LabelAlignment.swift @@ -24,7 +24,7 @@ import UIKit -public struct LabelAlignment { +public struct LabelAlignment: Equatable { public var textAlignment: NSTextAlignment public var textInsets: UIEdgeInsets @@ -38,9 +38,9 @@ public struct LabelAlignment { // MARK: - Equatable Conformance -extension LabelAlignment: Equatable { +public extension LabelAlignment { - public static func == (lhs: LabelAlignment, rhs: LabelAlignment) -> Bool { + static func == (lhs: LabelAlignment, rhs: LabelAlignment) -> Bool { return lhs.textAlignment == rhs.textAlignment && lhs.textInsets == rhs.textInsets } diff --git a/Sources/Models/Sender.swift b/Sources/Models/Sender.swift index 28468785..bd5a31c5 100644 --- a/Sources/Models/Sender.swift +++ b/Sources/Models/Sender.swift @@ -25,7 +25,7 @@ import Foundation /// An object that groups the metadata of a messages sender. -@available(*, deprecated: 3.0.0, message: "`Sender` has been replaced with the `SenderType` protocol in 3.0.0") +@available(*, deprecated, message: "`Sender` has been replaced with the `SenderType` protocol in 3.0.0") public struct Sender: SenderType { /// MARK: - Properties @@ -35,7 +35,7 @@ public struct Sender: SenderType { /// Note: This value must be unique across all senders. public let senderId: String - @available(*, deprecated: 3.0.0, message: "`id` has been renamed `senderId` as defined in the `SenderType` protocol") + @available(*, deprecated, message: "`id` has been renamed `senderId` as defined in the `SenderType` protocol") public var id: String { return senderId } @@ -50,7 +50,7 @@ public struct Sender: SenderType { self.displayName = displayName } - @available(*, deprecated: 3.0.0, message: "`id` has been renamed `senderId` as defined in the `SenderType` protocol") + @available(*, deprecated, message: "`id` has been renamed `senderId` as defined in the `SenderType` protocol") public init(id: String, displayName: String) { self.init(senderId: id, displayName: displayName) } diff --git a/Sources/Supporting/MessageInputBar.swift b/Sources/Supporting/MessageInputBar.swift index 575edd50..a2c2919c 100644 --- a/Sources/Supporting/MessageInputBar.swift +++ b/Sources/Supporting/MessageInputBar.swift @@ -25,31 +25,8 @@ import UIKit import InputBarAccessoryView -@available(*, obsoleted: 3.0.0, renamed: "InputBarAccessoryView") +@available(*, deprecated, renamed: "InputBarAccessoryView") public typealias MessageInputBar = InputBarAccessoryView -@available(*, obsoleted: 3.0.0, renamed: "InputBarAccessoryViewDelegate") +@available(*, deprecated, renamed: "InputBarAccessoryViewDelegate") public typealias MessageInputBarDelegate = InputBarAccessoryViewDelegate - -//public extension MessageInputBarDelegate { -// -// @available(*, obsoleted: 3.0.0, message: "`MessageInputBar` has been replaced with `InputBarAccessoryView` in 3.0.0. Use `inputBar(_ inputBar: InputBarAccessoryView, didPressSendButtonWith text: String)` instead.") -// func messageInputBar(_ inputBar: MessageInputBar, didPressSendButtonWith text: String) { -// } -// -// @available(*, obsoleted: 3.0.0, message: "`MessageInputBar` has been replaced with `InputBarAccessoryView` in 3.0.0. Use `inputBar(_ inputBar: InputBarAccessoryView, textViewTextDidChangeTo text: String)` instead.") -// func messageInputBar(_ inputBar: MessageInputBar, textViewTextDidChangeTo text: String) { -// } -// -// @available(*, obsoleted: 3.0.0, message: "`MessageInputBar` has been replaced with `InputBarAccessoryView` in 3.0.0. Use `inputBar(_ inputBar: InputBarAccessoryView, didChangeIntrinsicContentTo size: CGSize)` instead.") -// func messageInputBar(_ inputBar: MessageInputBar, didChangeIntrinsicContentTo size: CGSize) { -// } -//} -// -//extension InputBarButtonItem { -// -// @available(*, renamed: "inputBarAccessoryView") -// public var messageInputBar: MessageInputBar? { -// return inputBarAccessoryView -// } -//} From 5edb955e52a519be3317611e347f1bc2b5311247 Mon Sep 17 00:00:00 2001 From: Nathan Tannar Date: Fri, 5 Apr 2019 09:51:15 -0700 Subject: [PATCH 02/12] Update Example to Swift 5 --- Example/.Podfile.un~ | Bin 628 -> 0 bytes Example/ChatExample.xcodeproj/project.pbxproj | 21 ++++++++++-------- .../xcschemes/ChatExample.xcscheme | 2 +- .../xcschemes/ChatExampleUITests.xcscheme | 2 +- Example/Podfile.lock | 10 ++++----- Example/Podfile~ | 16 ------------- Example/Sources/Data Generation/Lorem.swift | 8 +++---- 7 files changed, 23 insertions(+), 36 deletions(-) delete mode 100644 Example/.Podfile.un~ delete mode 100644 Example/Podfile~ diff --git a/Example/.Podfile.un~ b/Example/.Podfile.un~ deleted file mode 100644 index 8e635e873c954879ae48535cb0638240cdf80041..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 628 zcmWH`%$*;a=aT=FfvJX1uI8zJ&VRp+HftVn-1)vg!s@o?+VAtHCSSQEcItls0|Ns; z5F-OdAP0m&0LBLMV~T~MSRf+t7a;N|BuI)4Ch{K$;KslNM`@Md~^VR_U1~3bu9%>KP>^1;tkS`aph0 sX_8)Yey%=LwRdI-j0w}I2UG>poK%#Umz)9CpPN`*l3Jv0+W34G05;o29{>OV diff --git a/Example/ChatExample.xcodeproj/project.pbxproj b/Example/ChatExample.xcodeproj/project.pbxproj index 7cc41a7f..63b5cfe8 100644 --- a/Example/ChatExample.xcodeproj/project.pbxproj +++ b/Example/ChatExample.xcodeproj/project.pbxproj @@ -368,7 +368,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0730; - LastUpgradeCheck = 0930; + LastUpgradeCheck = 1020; ORGANIZATIONNAME = MessageKit; TargetAttributes = { 882B5E321CF7D4B900B6E160 = { @@ -391,6 +391,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, Base, ); @@ -599,6 +600,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -647,7 +649,7 @@ ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -656,6 +658,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -696,7 +699,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 9.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; @@ -713,7 +716,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.messagekit.ChatExample; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -729,7 +732,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.messagekit.ChatExample; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Release; }; @@ -742,7 +745,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.hexedbits.ChatExampleTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ChatExample.app/ChatExample"; }; name = Debug; @@ -757,7 +760,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.hexedbits.ChatExampleTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ChatExample.app/ChatExample"; }; name = Release; @@ -770,7 +773,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.hexedbits.ChatExampleUITests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TEST_TARGET_NAME = ChatExample; }; name = Debug; @@ -784,7 +787,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.hexedbits.ChatExampleUITests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TEST_TARGET_NAME = ChatExample; }; name = Release; diff --git a/Example/ChatExample.xcodeproj/xcshareddata/xcschemes/ChatExample.xcscheme b/Example/ChatExample.xcodeproj/xcshareddata/xcschemes/ChatExample.xcscheme index e34206a1..31f17b89 100644 --- a/Example/ChatExample.xcodeproj/xcshareddata/xcschemes/ChatExample.xcscheme +++ b/Example/ChatExample.xcodeproj/xcshareddata/xcschemes/ChatExample.xcscheme @@ -1,6 +1,6 @@ 4.3.0) DEPENDENCIES: - MessageKit (from `../`) @@ -15,8 +15,8 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: - InputBarAccessoryView: 2b937602598e2fab3149f37f51dd7ad795653812 - MessageKit: 4226995f0811d3a51b8e80b56d2e95c97fa879e8 + InputBarAccessoryView: 28dca73f28df7822fe5377f83cfc4547e22f90ff + MessageKit: 96420f1fe84d037451cc7b11800a559189f40c25 PODFILE CHECKSUM: cecdb7bc8129cf99f66de9f68eea3256fec30c3d diff --git a/Example/Podfile~ b/Example/Podfile~ deleted file mode 100644 index bf44d23b..00000000 --- a/Example/Podfile~ +++ /dev/null @@ -1,16 +0,0 @@ -platform :ios, '9.0' - -target 'ChatExample' do - use_frameworks! - pod 'MessageKit', :path => '../' - pod 'MessageInputBar', :git => 'https://github.com/MessageKit/MessageInputBar.git', :branch => 'master' - -target 'ChatExampleTests' do - inherit! :search_paths -end - -target 'ChatExampleUITests' do - inherit! :search_paths -end - -end diff --git a/Example/Sources/Data Generation/Lorem.swift b/Example/Sources/Data Generation/Lorem.swift index 47597730..b368af71 100755 --- a/Example/Sources/Data Generation/Lorem.swift +++ b/Example/Sources/Data Generation/Lorem.swift @@ -222,7 +222,7 @@ public extension Array { /** Shuffle the array in-place using the Fisher-Yates algorithm. */ - public mutating func shuffle() { + mutating func shuffle() { for i in 0..<(count - 1) { let j = Int(arc4random_uniform(UInt32(count - i))) + i if j != i { @@ -237,7 +237,7 @@ public extension Array { - returns: Returns a shuffled version of the array. */ - public func shuffled() -> [Element] { + func shuffled() -> [Element] { var list = self list.shuffle() @@ -249,7 +249,7 @@ public extension Array { - returns: Returns a random element from the array or `nil` if the array is empty. */ - public func random() -> Element? { + func random() -> Element? { return (count > 0) ? self.shuffled()[0] : nil } @@ -257,7 +257,7 @@ public extension Array { Return a random subset of `cnt` elements from the array. - returns: Returns a random subset of `cnt` elements from the array. */ - public func random(_ count: Int = 1) -> [Element] { + func random(_ count: Int = 1) -> [Element] { let result = shuffled() return (count > result.count) ? result : Array(result[0.. Date: Tue, 30 Apr 2019 17:08:54 -0700 Subject: [PATCH 03/12] Specify dependency version --- MessageKit.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MessageKit.podspec b/MessageKit.podspec index f6510642..b1cdfadd 100644 --- a/MessageKit.podspec +++ b/MessageKit.podspec @@ -22,6 +22,6 @@ Pod::Spec.new do |s| s.requires_arc = true - s.dependency 'InputBarAccessoryView' + s.dependency 'InputBarAccessoryView', '~> 4.2.2' end From e1b6148c9a1b77870d808d6b3230eaa0e1da52f8 Mon Sep 17 00:00:00 2001 From: Khoren Markosyan Date: Mon, 13 May 2019 00:36:25 +0400 Subject: [PATCH 04/12] Update README.md Added SwiftHub in used apps --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b970ec77..568d2fe0 100644 --- a/README.md +++ b/README.md @@ -155,6 +155,7 @@ Add your app to the list of apps using this library and make a pull request. - [MediQuo](https://www.mediquo.com) - [RappresentaMe](https://itunes.apple.com/it/app/rappresentame/id1330914443) - [WiseEyes](https://itunes.apple.com/us/app/wiseeyes/id1391408511?mt=8) +- [SwiftHub](https://github.com/khoren93/SwiftHub) *Please provide attribution, it is greatly appreciated.* From 754a5a14c231a5b1d03d24161d9a1151afd21423 Mon Sep 17 00:00:00 2001 From: Nathan Tannar Date: Mon, 13 May 2019 09:38:11 -0700 Subject: [PATCH 05/12] Update MessageKit.podspec --- MessageKit.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MessageKit.podspec b/MessageKit.podspec index b1cdfadd..ec98c59e 100644 --- a/MessageKit.podspec +++ b/MessageKit.podspec @@ -5,8 +5,8 @@ Pod::Spec.new do |s| s.summary = 'An elegant messages UI library for iOS.' s.homepage = 'https://github.com/MessageKit/MessageKit' - s.social_media_url = 'https://twitter.com/nathantannar4' - s.author = { "Nathan Tannar" => "nathantannar4@gmail.com" } + s.social_media_url = 'https://twitter.com/_SD10_' + s.author = { "Steven Deutsch" => "stevensdeutsch@yahoo.com" } s.source = { :git => 'https://github.com/MessageKit/MessageKit.git', :tag => s.version } s.source_files = 'Sources/**/*.swift' From ba2e8264c7509cc618b8841cc06b9686970f8290 Mon Sep 17 00:00:00 2001 From: Marc Etcheverry Date: Tue, 4 Jun 2019 16:26:50 -0700 Subject: [PATCH 06/12] Add loading indicator to audio message cell --- Example/Podfile.lock | 6 ++--- Sources/Views/Cells/AudioMessageCell.swift | 31 +++++++++++++++++++++- 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 16b0475c..c76c9353 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,6 +1,6 @@ PODS: - InputBarAccessoryView (4.3.0) - - MessageKit (3.0.0-beta-swift5): + - MessageKit (3.1.0): - InputBarAccessoryView (~> 4.3.0) DEPENDENCIES: @@ -16,8 +16,8 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: InputBarAccessoryView: 28dca73f28df7822fe5377f83cfc4547e22f90ff - MessageKit: 96420f1fe84d037451cc7b11800a559189f40c25 + MessageKit: 72add24fcba6c6ca1e09385285f6f66757340769 PODFILE CHECKSUM: cecdb7bc8129cf99f66de9f68eea3256fec30c3d -COCOAPODS: 1.6.1 +COCOAPODS: 1.7.0 diff --git a/Sources/Views/Cells/AudioMessageCell.swift b/Sources/Views/Cells/AudioMessageCell.swift index a9251ce5..1a37272a 100644 --- a/Sources/Views/Cells/AudioMessageCell.swift +++ b/Sources/Views/Cells/AudioMessageCell.swift @@ -47,18 +47,44 @@ open class AudioMessageCell: MessageContentCell { return durationLabel }() + private lazy var activityIndicatorView: UIActivityIndicatorView = { + let activityIndicatorView = UIActivityIndicatorView(style: .gray) + activityIndicatorView.hidesWhenStopped = true + activityIndicatorView.isHidden = true + return activityIndicatorView + }() + public lazy var progressView: UIProgressView = { let progressView = UIProgressView(progressViewStyle: .default) progressView.progress = 0.0 return progressView }() + public var isLoadingIndicatorVisible: Bool { + get { + return activityIndicatorView.isHidden + } + set { + if newValue { + activityIndicatorView.isHidden = false + playButton.isHidden = true + activityIndicatorView.startAnimating() + } + else { + playButton.isHidden = false + activityIndicatorView.stopAnimating() + } + } + } + // MARK: - Methods /// Responsible for setting up the constraints of the cell's subviews. open func setupConstraints() { playButton.constraint(equalTo: CGSize(width: 25, height: 25)) - playButton.addConstraints(left: messageContainerView.leftAnchor, centerY: messageContainerView.centerYAnchor, leftConstant: 5) + playButton.addConstraints(left: messageContainerView.leftAnchor, centerY: messageContainerView.centerYAnchor, leftConstant: 10) + activityIndicatorView.constraint(equalTo: CGSize(width: 25, height: 25)) + activityIndicatorView.addConstraints(centerY: playButton.centerYAnchor, centerX: playButton.centerXAnchor) durationLabel.addConstraints(right: messageContainerView.rightAnchor, centerY: messageContainerView.centerYAnchor, rightConstant: 15) progressView.addConstraints(left: playButton.rightAnchor, right: durationLabel.leftAnchor, centerY: messageContainerView.centerYAnchor, leftConstant: 5, rightConstant: 5) } @@ -66,6 +92,7 @@ open class AudioMessageCell: MessageContentCell { open override func setupSubviews() { super.setupSubviews() messageContainerView.addSubview(playButton) + messageContainerView.addSubview(activityIndicatorView) messageContainerView.addSubview(durationLabel) messageContainerView.addSubview(progressView) setupConstraints() @@ -75,6 +102,8 @@ open class AudioMessageCell: MessageContentCell { super.prepareForReuse() progressView.progress = 0 playButton.isSelected = false + activityIndicatorView.stopAnimating() + playButton.isHidden = false durationLabel.text = "0:00" } From 78757db1f8082199b1c6cec8d8b7392d2e0e109c Mon Sep 17 00:00:00 2001 From: Marc Etcheverry Date: Tue, 4 Jun 2019 18:47:38 -0700 Subject: [PATCH 07/12] Remove size constraint, ideally there woudl be a >= 0 from all edges just to be safe --- Sources/Views/Cells/AudioMessageCell.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/Sources/Views/Cells/AudioMessageCell.swift b/Sources/Views/Cells/AudioMessageCell.swift index 1a37272a..922aa60c 100644 --- a/Sources/Views/Cells/AudioMessageCell.swift +++ b/Sources/Views/Cells/AudioMessageCell.swift @@ -83,7 +83,6 @@ open class AudioMessageCell: MessageContentCell { open func setupConstraints() { playButton.constraint(equalTo: CGSize(width: 25, height: 25)) playButton.addConstraints(left: messageContainerView.leftAnchor, centerY: messageContainerView.centerYAnchor, leftConstant: 10) - activityIndicatorView.constraint(equalTo: CGSize(width: 25, height: 25)) activityIndicatorView.addConstraints(centerY: playButton.centerYAnchor, centerX: playButton.centerXAnchor) durationLabel.addConstraints(right: messageContainerView.rightAnchor, centerY: messageContainerView.centerYAnchor, rightConstant: 15) progressView.addConstraints(left: playButton.rightAnchor, right: durationLabel.leftAnchor, centerY: messageContainerView.centerYAnchor, leftConstant: 5, rightConstant: 5) From c7c31d67b3cc6fa72bc99691e3c5266a629eee9c Mon Sep 17 00:00:00 2001 From: Marc Etcheverry Date: Tue, 11 Jun 2019 09:41:33 -0700 Subject: [PATCH 08/12] Address comments. --- CHANGELOG.md | 6 ++++++ Sources/Views/Cells/AudioMessageCell.swift | 21 ++------------------- 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7aba7f2d..6a2149d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ The changelog for `MessageKit`. Also see the [releases](https://github.com/MessageKit/MessageKit/releases) on GitHub. +## Upcoming Release + +### Added + +- Add loading indicator to AudioMessageCell. [#1084](hub.com/MessageKit/MessageKit/pull/1084) by [@marcetcheverry](https://github.com/marcetcheverry)) + ## 3.0.0 ### Dependency Changes diff --git a/Sources/Views/Cells/AudioMessageCell.swift b/Sources/Views/Cells/AudioMessageCell.swift index 922aa60c..b08d7ad5 100644 --- a/Sources/Views/Cells/AudioMessageCell.swift +++ b/Sources/Views/Cells/AudioMessageCell.swift @@ -47,7 +47,7 @@ open class AudioMessageCell: MessageContentCell { return durationLabel }() - private lazy var activityIndicatorView: UIActivityIndicatorView = { + public lazy var activityIndicatorView: UIActivityIndicatorView = { let activityIndicatorView = UIActivityIndicatorView(style: .gray) activityIndicatorView.hidesWhenStopped = true activityIndicatorView.isHidden = true @@ -59,30 +59,13 @@ open class AudioMessageCell: MessageContentCell { progressView.progress = 0.0 return progressView }() - - public var isLoadingIndicatorVisible: Bool { - get { - return activityIndicatorView.isHidden - } - set { - if newValue { - activityIndicatorView.isHidden = false - playButton.isHidden = true - activityIndicatorView.startAnimating() - } - else { - playButton.isHidden = false - activityIndicatorView.stopAnimating() - } - } - } // MARK: - Methods /// Responsible for setting up the constraints of the cell's subviews. open func setupConstraints() { playButton.constraint(equalTo: CGSize(width: 25, height: 25)) - playButton.addConstraints(left: messageContainerView.leftAnchor, centerY: messageContainerView.centerYAnchor, leftConstant: 10) + playButton.addConstraints(left: messageContainerView.leftAnchor, centerY: messageContainerView.centerYAnchor, leftConstant: 5) activityIndicatorView.addConstraints(centerY: playButton.centerYAnchor, centerX: playButton.centerXAnchor) durationLabel.addConstraints(right: messageContainerView.rightAnchor, centerY: messageContainerView.centerYAnchor, rightConstant: 15) progressView.addConstraints(left: playButton.rightAnchor, right: durationLabel.leftAnchor, centerY: messageContainerView.centerYAnchor, leftConstant: 5, rightConstant: 5) From fbc427f7a3016a5f463998632a07e221105c7a1b Mon Sep 17 00:00:00 2001 From: Marc Etcheverry Date: Wed, 12 Jun 2019 01:10:50 -0700 Subject: [PATCH 09/12] Lazily initialize the messageInputBar for those that don't want to use it. --- Sources/Controllers/MessagesViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Controllers/MessagesViewController.swift b/Sources/Controllers/MessagesViewController.swift index 0e154c4f..db05420f 100644 --- a/Sources/Controllers/MessagesViewController.swift +++ b/Sources/Controllers/MessagesViewController.swift @@ -34,7 +34,7 @@ UICollectionViewDelegateFlowLayout, UICollectionViewDataSource { open var messagesCollectionView = MessagesCollectionView() /// The `InputBarAccessoryView` used as the `inputAccessoryView` in the view controller. - open var messageInputBar = InputBarAccessoryView() + open lazy var messageInputBar = InputBarAccessoryView() /// A Boolean value that determines whether the `MessagesCollectionView` scrolls to the /// bottom whenever the `InputTextView` begins editing. From 6878b35e035f02a8114d39e0e32a9f112d4b7bcc Mon Sep 17 00:00:00 2001 From: Marc Etcheverry Date: Wed, 12 Jun 2019 01:18:06 -0700 Subject: [PATCH 10/12] Update CHANGELOG --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7aba7f2d..77ee828b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ The changelog for `MessageKit`. Also see the [releases](https://github.com/MessageKit/MessageKit/releases) on GitHub. +## Upcoming Release + +### Added +- Lazily initialize the MessageInputBar on MessagesViewController. [#1092](https://github.com/MessageKit/MessageKit/pull/1092) by [@marcetcheverry](https://github.com/marcetcheverry) + ## 3.0.0 ### Dependency Changes From 4e72543fa00218f19844ccda4cf12db02c09dd3e Mon Sep 17 00:00:00 2001 From: Marc Etcheverry Date: Mon, 17 Jun 2019 17:23:50 -0700 Subject: [PATCH 11/12] Fix a typo in CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d26aaf31..d969b110 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ The changelog for `MessageKit`. Also see the [releases](https://github.com/Messa ### Added -- Add loading indicator to AudioMessageCell. [#1084](hub.com/MessageKit/MessageKit/pull/1084) by [@marcetcheverry](https://github.com/marcetcheverry)) +- Add loading indicator to AudioMessageCell. [#1084](https://github.com/MessageKit/MessageKit/pull/1084) by [@marcetcheverry](https://github.com/marcetcheverry)) - Lazily initialize the MessageInputBar on MessagesViewController. [#1092](https://github.com/MessageKit/MessageKit/pull/1092) by [@marcetcheverry](https://github.com/marcetcheverry) From 85b3a202902dc2ceb1c0c634ef0d32c0fb7ff616 Mon Sep 17 00:00:00 2001 From: Marc Etcheverry Date: Mon, 17 Jun 2019 17:25:10 -0700 Subject: [PATCH 12/12] Fix second typo --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d969b110..cbe6a90b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ The changelog for `MessageKit`. Also see the [releases](https://github.com/Messa ### Added -- Add loading indicator to AudioMessageCell. [#1084](https://github.com/MessageKit/MessageKit/pull/1084) by [@marcetcheverry](https://github.com/marcetcheverry)) +- Add loading indicator to AudioMessageCell. [#1084](https://github.com/MessageKit/MessageKit/pull/1084) by [@marcetcheverry](https://github.com/marcetcheverry) - Lazily initialize the MessageInputBar on MessagesViewController. [#1092](https://github.com/MessageKit/MessageKit/pull/1092) by [@marcetcheverry](https://github.com/marcetcheverry)