我正在嘗試使用預先指定的參與者創建ConversationViewController。當我創建對話並推送控制器時,參與者地址欄不顯示任何名稱。另外,如果現有對話已開始,則會引發錯誤。Layer-Atlas iOS 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標識符=層:///對話/ c8eeaf04-085b-4c11-a985- a23aeeeb5f3e databaseIdentifier = LYRDatabaseIdentifierNotDefined版本= LYRVersionNotDefined請將isDeleted = NO streamUUID =(空)的參與者= {( Y8Ak1U1Mbj, AdW9c2FYeN )} distinctByParticipants = YES」
談話是:(空) 錯誤是:具有鮮明的參與者列表的對話已經存在的參與者{( Y8Ak1U1Mbj, AdW9c2FYeN )}
我認爲,你想用的標籤是「layerkit」而不是「層」 –
你說得對 –