Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
7a94271
Convert to Swift 5 / Fix Linting
nathantannar4 Apr 5, 2019
5edb955
Update Example to Swift 5
nathantannar4 Apr 5, 2019
46f303d
Merge branch 'development' into 3.0.0-swift5
nathantannar4 Apr 5, 2019
bed54d3
Merge branch 'development' into 3.0.0-swift5
nathantannar4 Apr 25, 2019
8f0a171
Merge branch 'development' into 3.0.0-swift5
nathantannar4 Apr 30, 2019
b72a455
Specify dependency version
nathantannar4 May 1, 2019
e1b6148
Update README.md
khoren93 May 12, 2019
207fadd
Merge pull request #1069 from khoren93/master
nathantannar4 May 12, 2019
754a5a1
Update MessageKit.podspec
nathantannar4 May 13, 2019
ba2e826
Add loading indicator to audio message cell
Jun 4, 2019
78757db
Remove size constraint, ideally there woudl be a >= 0 from all edges …
Jun 5, 2019
c7c31d6
Address comments.
Jun 11, 2019
fbc427f
Lazily initialize the messageInputBar for those that don't want to us…
Jun 12, 2019
6878b35
Update CHANGELOG
Jun 12, 2019
6e232ff
Merge pull request #1092 from marcetcheverry/3.0.0-swift5-lazy-input-bar
nathantannar4 Jun 13, 2019
91477d5
Merge branch '3.0.0-swift5' into 3.0.0-swift5-loadingindicator
nathantannar4 Jun 13, 2019
c958e58
Merge pull request #1084 from marcetcheverry/3.0.0-swift5-loadingindi…
nathantannar4 Jun 13, 2019
4e72543
Fix a typo in CHANGELOG.md
Jun 18, 2019
85b3a20
Fix second typo
Jun 18, 2019
c2c44a7
Merge pull request #1099 from marcetcheverry/3.0.0-swift5-fix-cl-typo
nathantannar4 Jun 18, 2019
9a7d4b4
Merge branch 'master' into 3.0.0-swift5
nathantannar4 Jun 28, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.2
5.0
1 change: 0 additions & 1 deletion .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

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](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)

## 3.0.0

### Dependency Changes
Expand Down
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "nathantannar4/InputBarAccessoryView" "4.2.1"
github "nathantannar4/InputBarAccessoryView" "4.3.0"
2 changes: 1 addition & 1 deletion Cartfile.private
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github "Quick/Quick" ~> 2.0.0
github "Quick/Nimble" ~> 8.0.1
github "Quick/Nimble" ~> 8.0.0
6 changes: 3 additions & 3 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
github "Quick/Nimble" "v7.3.4"
github "Quick/Quick" "v1.3.4"
github "nathantannar4/InputBarAccessoryView" "4.2.2"
github "Quick/Nimble" "v8.0.1"
github "Quick/Quick" "v2.0.0"
github "nathantannar4/InputBarAccessoryView" "4.3.0"
Binary file removed Example/.Podfile.un~
Binary file not shown.
21 changes: 12 additions & 9 deletions Example/ChatExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0730;
LastUpgradeCheck = 0930;
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = MessageKit;
TargetAttributes = {
882B5E321CF7D4B900B6E160 = {
Expand All @@ -394,6 +394,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
);
Expand Down Expand Up @@ -603,6 +604,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++";
Expand Down Expand Up @@ -651,7 +653,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;
Expand All @@ -660,6 +662,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++";
Expand Down Expand Up @@ -700,7 +703,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;
};
Expand All @@ -717,7 +720,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;
};
Expand All @@ -733,7 +736,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;
};
Expand All @@ -746,7 +749,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;
Expand All @@ -761,7 +764,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;
Expand All @@ -774,7 +777,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;
Expand All @@ -788,7 +791,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;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1010"
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1010"
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
12 changes: 6 additions & 6 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PODS:
- InputBarAccessoryView (4.2.2)
- MessageKit (3.0.0-beta-swift4-2):
- InputBarAccessoryView
- InputBarAccessoryView (4.3.0)
- MessageKit (3.1.0):
- InputBarAccessoryView (~> 4.3.0)

DEPENDENCIES:
- MessageKit (from `../`)
Expand All @@ -15,9 +15,9 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
InputBarAccessoryView: 2b937602598e2fab3149f37f51dd7ad795653812
MessageKit: feb3ca4fa02a14f3391781323ced1da84a0aa73c
InputBarAccessoryView: 28dca73f28df7822fe5377f83cfc4547e22f90ff
MessageKit: 72add24fcba6c6ca1e09385285f6f66757340769

PODFILE CHECKSUM: cecdb7bc8129cf99f66de9f68eea3256fec30c3d

COCOAPODS: 1.6.1
COCOAPODS: 1.7.0
16 changes: 0 additions & 16 deletions Example/Podfile~

This file was deleted.

8 changes: 4 additions & 4 deletions Example/Sources/Data Generation/Lorem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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()

Expand All @@ -249,15 +249,15 @@ 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
}

/**
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..<count])
Expand Down
12 changes: 6 additions & 6 deletions MessageKit.podspec
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
Pod::Spec.new do |s|
s.name = 'MessageKit'
s.version = '3.0.0'
s.version = '3.1.0'
s.license = { :type => "MIT", :file => "LICENSE.md" }

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'

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
10 changes: 5 additions & 5 deletions MessageKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0730;
LastUpgradeCheck = 1010;
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = MessageKit;
TargetAttributes = {
88916B211CF0DF2F00469F91 = {
Expand Down Expand Up @@ -788,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 = "";
Expand Down Expand Up @@ -841,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";
Expand Down Expand Up @@ -871,7 +871,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -897,7 +897,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1010"
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1010"
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.*

Expand Down
8 changes: 4 additions & 4 deletions Sources/Controllers/MessagesViewController+Keyboard.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ internal extension MessagesViewController {

// MARK: - Register / Unregister Observers

internal func addKeyboardObservers() {
func addKeyboardObservers() {
NotificationCenter.default.addObserver(self, selector: #selector(MessagesViewController.handleKeyboardDidChangeState(_:)), name: UIResponder.keyboardWillChangeFrameNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(MessagesViewController.handleTextViewDidBeginEditing(_:)), name: UITextView.textDidBeginEditingNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(MessagesViewController.adjustScrollViewTopInset), name: UIDevice.orientationDidChangeNotification, object: nil)
}

internal func removeKeyboardObservers() {
func removeKeyboardObservers() {
NotificationCenter.default.removeObserver(self, name: UIResponder.keyboardWillChangeFrameNotification, object: nil)
NotificationCenter.default.removeObserver(self, name: UITextView.textDidBeginEditingNotification, object: nil)
NotificationCenter.default.removeObserver(self, name: UIDevice.orientationDidChangeNotification, object: nil)
Expand Down Expand Up @@ -95,7 +95,7 @@ internal extension MessagesViewController {
// MARK: - Inset Computation

@objc
internal func adjustScrollViewTopInset() {
func adjustScrollViewTopInset() {
if #available(iOS 11.0, *) {
// No need to add to the top contentInset
} else {
Expand All @@ -121,7 +121,7 @@ internal extension MessagesViewController {
}
}

internal func requiredInitialScrollViewBottomInset() -> CGFloat {
func requiredInitialScrollViewBottomInset() -> CGFloat {
guard let inputAccessoryView = inputAccessoryView else { return 0 }
return max(0, inputAccessoryView.frame.height + additionalBottomInset - automaticallyAddedBottomInset)
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/Controllers/MessagesViewController+Menu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ 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)
}

Expand Down
Loading