我正在尝试使用预先指定的参与者创建一个 ConversationViewController。当我创建对话并推动控制器时,参与者地址栏不显示任何名称。此外,如果启动了现有对话,则会引发错误。
如何使用指定的参与者推送 ConversationViewController?
这是代码和调试器输出,可帮助您了解我的位置:
ConversationViewController *controller = [ConversationViewController conversationViewControllerWithLayerClient:SingletonCenter.layerClient];
NSError *error;
LYRConversation *conversation = [SingletonCenter.layerClient newConversationWithParticipants:[NSSet setWithArray:@[User.objectId,self.requestForView.serviceProvider.objectId]] options:nil error:&error];
NSLog(@"conversation is: %@\nerror is: %@",conversation, [error localizedDescription]);
controller.conversation = conversation;
controller.displaysAddressBar = YES;
[self.navigationController pushViewController:controller animated:YES];
对话是:“LYRConversation:0x7faa724a7730 identifier=layer:///conversations/c8eeaf04-085b-4c11-a985-a23aeeeb5f3e databaseIdentifier=LYRDatabaseIdentifierNotDefined version=LYRVersionNotDefined isDeleted=NO streamUUID=(null)参与者={(Y8Ak1U1Mbj)}, AdW9c2FY distinct是的”
对话是:(null)错误是:参与者已经存在具有不同参与者列表的对话{(Y8Ak1U1Mbj,AdW9c2FYeN)}