0

从第 0.17 层更新到 0.22 后,我收到此构建错误:“使用未解析的标识符 'LYRConversationOptionsDistinctByParticipantsKey'”

代码:

let currentConversation = try! appDelegate.layerClient.newConversation(withParticipants: participantSet, 
    options: [LYRConversationOptionsDistinctByParticipantsKey : 0])

(新行上的选项以提高可读性)

4

1 回答 1

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)
于 2016-10-22T03:37:21.123 回答