从第0.17层更新到0.22后,我收到此构建错误: "使用未解析的标识符' LYRConversationOptionsDistinctByParticipantsKey'"
代码:
let currentConversation = try! appDelegate.layerClient.newConversation(withParticipants: participantSet,
options: [LYRConversationOptionsDistinctByParticipantsKey : 0])
(新线上的可选性选项)
答案 0 :(得分:0)
阅读更改日志总是值得的!
0.22.0 引入了LYRConversationOptions对象,用于在初始化时配置对话实例。它取代之前通过带有字典的options参数传递的LYRConversationOptionsMetadataKey,LYRConversationOptionsDeliveryReceiptsEnabledKey和LYRConversationOptionsDistinctByParticipantsKey。
LYRClient.newConversation(withParticipants: participantSet,
options: [LYRConversationOptionsDistinctByParticipantsKey : 0])
变为
let options = LYRConversationOptions()
options.distintByParticipants = false
layerClient.newConversation(withParticipants: participantSet,
options: options)