I am trying to use MessageKit inside my application, and I have the view loading and showing messages.
However, the "Send" button never triggers the messageInputBar delegate and I am unsure why. There is not much to hook up, if I downgrade to version 1.0.0, it works and triggers when you press Send, upgrade to the newest version and it breaks.
import UIKit
import MessageKit
import InputBarAccessoryView
private var messages: [Message] = []
class InboxThreadViewController: MessagesViewController, MessageInputBarDelegate {
@objc public var myValue:String?
private var messages: [Message] = []
override func viewDidLoad() {
super.viewDidLoad()
messageInputBar.delegate = self
messagesCollectionView.messagesDataSource = self
messagesCollectionView.messagesLayoutDelegate = self
messagesCollectionView.messagesDisplayDelegate = self
title = "MessageKit"
func messageInputBar(_ inputBar: MessageInputBar, didPressSendButtonWith text: String) {
print("Message : \(text)")
NSLog("HELLO")
}
}