gpt4 book ai didi

Swift MessageKit 问题 - 运行 swift 4.2

转载 作者:搜寻专家 更新时间:2023-10-31 08:24:15 24 4
gpt4 key购买 nike

我刚刚将我的代码更新到 swift 4.2 并修复了所有错误。现在我正在尝试使用“MessageKit”将信使放入我的应用程序中。一切都已更新,但我遇到了这些问题......现在它说的是 MessagesInputBarDelegate

"Use of undeclared type 'MessagesInputBarDelegate'"

"Use of undeclared type 'MessageInputBar'"

此外,

"Argument Labels '(type:)' do not match any available overloads"

"Cannot convert value of type'_?' to expected argument type 'URL?"

使用未声明的类型“MessagesInputBarDelegate”

使用未声明的类型“MessageInputBar”

extension CustomerChatViewController: MessagesInputBarDelegate {

func messageInputBar(_ inputBar: MessageInputBar, didPressSendButtonWith text: String) {
let message = Message(user: user, content: text)

save(message)
inputBar.inputTextView.text = ""
}

}

参数标签“(type:)”不匹配任何可用的重载

let cameraItem = UIBarButtonItem(type: .system)

无法转换“_?”类型的值到预期的参数类型“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 'MessageInputBar'

MessageKit 2.0.0 开始,您必须安装 MessageInputBar

关于Swift MessageKit 问题 - 运行 swift 4.2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53378904/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com