gpt4 book ai didi

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

转载 作者:搜寻专家 更新时间:2023-11-01 05:38:28 29 4
gpt4 key购买 nike

我将 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/

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