我正在尝试与JSQMessages建立聊天,但是我的应用程序崩溃了。
这是我的代码
class ChatVC: JSQMessagesViewController {
var userName: String!
var chatRoom: String!
override func viewDidLoad() {
super.viewDidLoad()
self.title = self.chatRoom
self.senderId = self.userName
self.senderDisplayName = self.userName
}
}
这是我得到的错误
2019-02-21 13:56:46.175194 + 0100 WildMarket [9423:503867] *-[WildMarket.ChatVC viewWillAppear:],/ Users / Nacire / Desktop / WildMarket / WildMarketApp / Pods /中的断言失败JSQMessagesViewController / JSQMessagesViewController / Controllers / JSQMessagesViewController.m:276 2019-02-21 13:56:46.181476 + 0100 WildMarket [9423:503867] * 由于未捕获的异常'NSInternalInconsistencyException'而终止应用程序,原因:'无效的参数不令人满意:self.senderId!= nil' ***首先抛出调用堆栈:
有人可以帮忙吗?