0

After updating from Layer 0.17 to 0.22, I'm getting this build error: "Use of unresolved identifier 'LYRConversationOptionsDistinctByParticipantsKey'"

Code:

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

(options on new line for readability)

D_________
  • 563
  • 5
  • 14

1 Answers1

0

It always pays to read the changelog!

0.22.0 Introduced the LYRConversationOptions object meant for configuring conversation instance upon initialization. It replaces the LYRConversationOptionsMetadataKey, LYRConversationOptionsDeliveryReceiptsEnabledKey and LYRConversationOptionsDistinctByParticipantsKey which was previously passed through the options argument with a dictionary.

LYRClient.newConversation(withParticipants: participantSet, 
   options: [LYRConversationOptionsDistinctByParticipantsKey : 0])

becomes

let options = LYRConversationOptions()
options.distintByParticipants = false
layerClient.newConversation(withParticipants: participantSet, 
    options: options)
D_________
  • 563
  • 5
  • 14