You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to trying to implement a chat feature in my app but it is not going so well.
I was trying to check if the send button was working correctly by printing out "button is pushed", but it didn't get printed.
I realized messageInputBar.delegate = self was not in the code and I thought that was the problem and as I put in the line of code an error below popped up. I don't know how to fix this and it would be a great help if you could give me an advice on what I should do. Cannot assign value of type 'MessageKitChatViewController' to type 'InputBarAccessoryViewDelegate?' Add missing conformance to 'InputBarAccessoryViewDelegate' to class 'MessageKitChatViewController'
I am trying to trying to implement a chat feature in my app but it is not going so well.
I was trying to check if the send button was working correctly by printing out "button is pushed", but it didn't get printed.
I realized
messageInputBar.delegate = self
was not in the code and I thought that was the problem and as I put in the line of code an error below popped up. I don't know how to fix this and it would be a great help if you could give me an advice on what I should do.Cannot assign value of type 'MessageKitChatViewController' to type 'InputBarAccessoryViewDelegate?' Add missing conformance to 'InputBarAccessoryViewDelegate' to class 'MessageKitChatViewController'
`import UIKit
import MessageKit
import MessageInputBar
import FirebaseFirestore
import FirebaseAuth
import FirebaseStorage
import Nuke
struct Sender: SenderType{
var senderId: String
var displayName: String
}
struct MessageKitMessage: MessageType{
var sender: SenderType
var messageId: String
var sentDate: Date
var kind: MessageKind
}
class MessageKitChatViewController: MessagesViewController, MessagesDataSource, MessagesLayoutDelegate, MessagesDisplayDelegate, MessageInputBarDelegate{
// let message = MessageKitMessage(sender: currentUser, messageId: UUID().uuidString, sentDate: Timestamp().dateValue(), kind: .text(text))
print("button is pushed")
}
}
`
The text was updated successfully, but these errors were encountered: