ios - LayerKit 的 newConversationWithParticipants 总是在第一次调用时抛出 FMDatabase "not an error"

标签 ios swift fmdb layerkit

我将 LayerKit 0.17.3 与 Swift 一起使用,newConversationWithParticipants 总是在第一次时抛出错误,域设置为 FMDatabase 并且出现“不是错误”错误。任何后续调用都会获得预期结果。

初始错误:

Error with creating LYRConversation: Error Domain=FMDatabase Code=0 "not an error"
UserInfo={NSLocalizedDescription=not an error}

后续错误:(期望的)

Error with creating LYRConversation: Error Domain=com.layer.LayerKit.Errors
Code=1013 "A conversation with a distinct participant list already exists
for participants [...]

这是查找/创建对话的函数:

@IBAction func didTapCompose(sender: AnyObject) {
    var conversation : LYRConversation?

    // create ATLConversationViewController
    let controller = ConversationViewController(layerClient: self.layerClient)
    controller.hidesBottomBarWhenPushed = true;

    // get recipient (user objectID) from member object
    let recipient = member.objectForKey(GlobalConstants.Parse.UserKey)?.objectId!
    // create set for newConversationWithParticipants
    let participants : Set = [recipient!]

    do {
        try conversation = layerClient.newConversationWithParticipants(participants, options: nil)
        controller.conversation = conversation
    } catch {
        print("Error with creating LYRConversation: \(error)")
    }
    self.navigationController!.pushViewController(controller, animated: true)
}

最佳答案

Support over at Layer.com 指出这是一个错误,将在下一个版本中修复。

关于ios - LayerKit 的 newConversationWithParticipants 总是在第一次调用时抛出 FMDatabase "not an error",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33975928/

相关文章:

iphone - 在iPhone中添加两个UITextView问题?

Swift 2 Xcode 7.2.1 Playground 错误 - 文件 "Logs"无法保存在文件夹 "Library"中

ios - FMDB 数据库查询 IOS FIND_IN_SET()

ios - 有人有幸让 FMDB 与 Rubymotion 一起工作吗?

iOS 8 : -[UITableViewWrapperView textField]: unrecognized selector sent to instance

ios - Quickblox API 因无法识别的选择器而快速崩溃

swift - 获取具有多个部分的表中一行的索引路径

swift - 每次 FMDB 查询后内存使用量急剧增加

iphone - iOS- MKAnnotationView 上的获取按钮以删除 pin

ios - 当外部 scrollview 开始滚动时增加 tableview 高度