Closed manishverma30 closed 6 years ago
Swift Chat issue. reproduced in sample chat swift project.
@manishverma30, Please use the Sample-Chat-Swift project from the latest release. This issue was fixed.
Hi @manishverma30, any updates ?
Hi Anndrey, I have these lines on my project Pod file pod 'QMServicesDevelopment', :git => 'https://github.com/QuickBlox/q-municate-services-ios.git', :branch => 'development' pod 'QMCVDevelopment' , :git => 'https://github.com/QuickBlox/QMChatViewController-ios', :branch => 'development' pod 'SearchEmojiOnString'
and now I should replace these with ?? please suggest Thanks. Manish
Hi @manishverma30, Could you provide your ChatViewController.swift?
ChatViewController.swift.zip Hi Andrey, Please find my ChatViewController.swift attached here. Thanks. Manish
Hi @manishverma30, Please check latest release
For fix your issue, please remove 2 lines from:
override func viewWillAppear(_ animated: Bool) {
....
- ServicesManager.instance().chatService.addDelegate(self) // remove this line
- ServicesManager.instance().chatService.chatAttachmentService.delegate = self // remove this line
....
}
and from:
override func viewDidDisappear(_ animated: Bool) {
....
- ServicesManager.instance().chatService.removeDelegate(self) // remove this line
- ServicesManager.instance().chatService.chatAttachmentService.delegate = nil // remove this line
....
}
and add 2 lines into:
override func viewDidLoad() {
...
+ ServicesManager.instance().chatService.addDelegate(self) //add this line
+ ServicesManager.instance().chatService.chatAttachmentService.delegate = self // add this line
...
}
Thanks!
Thanks you so much Andrey. issue got resolved. Thanks. Manish
New Issue Checklist
Environment details
Did this work before? Yes I saw this woking before. Now in my project and sample-chat-swift this is not working. I can reproduce the issue.
Expected behavior In ChatViewController.swift this condition should get executed when we are entering with valid dialog from other Viewcontroller. print("Dialog= (dialog)") // Retrieving messages if (self.storedMessages()?.count ?? 0 > 0 && self.chatDataSource.messagesCount() == 0) { self.chatDataSource.add(self.storedMessages()!) }
Actual behavior self.storedMessages()?.count returns with zero value.
Logs Attached.
I have printed dialog also just before problem code area. // Your logs here
Attached Sample-Chat-Swift-Logs
I have enabled both debug and XMPP for logging.
Steps to reproduce the behavior
Sample-Chat-Swift-Logs.docx