I had just updated my code to swift 4.2 and fixed all the errors. Now I am trying to use 'MessageKit' to put a messenger into my app. Everything is updated yet I am having these problems... now it is saying for MessagesInputBarDelegate
"Use of undeclared type 'MessagesInputBarDelegate'"
and
"Use of undeclared type 'MessageInputBar'"
Also,
"Argument Labels '(type:)' do not match any available overloads"
and
"Cannot convert value of type'_?' to expected argument type 'URL?"
Use of undeclared type 'MessagesInputBarDelegate'
Use of undeclared type 'MessageInputBar'
extension CustomerChatViewController: MessagesInputBarDelegate {
func messageInputBar(_ inputBar: MessageInputBar, didPressSendButtonWith text: String) {
let message = Message(user: user, content: text)
save(message)
inputBar.inputTextView.text = ""
}
}
Argument labels '(type:)' do not match any available overloads
let cameraItem = UIBarButtonItem(type: .system)
Cannot convert value of type '_?' to expected argument type 'URL?'
let imageName = [UUID().uuidString, String(Date().timeIntervalSince1970)].joined()
storage.child(channelID).child(imageName).putData(data, metadata: metadata) { meta, error in
completion(meta?.downloadURL())
}
MessageInputBar
pod is required to use theMessageKit
pod, it seems like the podspec ofMessageKit
should be updated to reflect that dependency. Manually adding a dependency to your ownPodfile
seems like a workaround rather than a real solution. – Sideway