Skip to content

Commit 8f99052

Browse files
committed
Conditional imports to allow for builds without MessageInputBar
1 parent cb8990a commit 8f99052

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

Sources/Controllers/MessagesViewController+Keyboard.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@
2323
*/
2424

2525
import Foundation
26+
#if canImport(MessageInputBar)
27+
import MessageInputBar
28+
#else
29+
public typealias InputTextView = UITextView
30+
public extension MessageInputBar {
31+
var inputTextView: InputTextView? { return nil }
32+
}
33+
#endif
2634

2735
extension MessagesViewController {
2836

Sources/Controllers/MessagesViewController.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323
*/
2424

2525
import UIKit
26+
#if canImport(MessageInputBar)
27+
import MessageInputBar
28+
#else
29+
public typealias MessageInputBar = UIView
30+
#endif
2631

2732
/// A subclass of `UIViewController` with a `MessagesCollectionView` object
2833
/// that is used to display conversation interfaces.

0 commit comments

Comments
 (0)