私信 访问主页
weixin_39768247 2020-12-27 14:57 首页 开源项目 Not able to createDialog in QBChatDialogHi,
I have read this documentation https://quickblox.com/developers/IOS for implement Group chat
When I am create chat Dialog, response of the QBRequest createDialog return null
I’m using below source code to create chatDialog,Please check the code and help me.
Source Code :
QBChatDialog *chatDialog [[QBChatDialog alloc] initWithDialogID:NULL type:QBChatDialogTypeGroup];chatDialog.name Chat with User A, User B, User C chatDialog.occupantIDs [ (48636831), (48660982), (48637053)];[QBRequest createDialog:chatDialog successBlock:^(QBResponse *response, QBChatDialog *createdDialog) {NSlog( “result % ”,chatDialog); // return null for (NSString *occupantID in chatDialog.occupantIDs) { QBChatMessage *inviteMessage [self createChatNotificationForGroupChatCreation:chatDialog]; NSTimeInterval timestamp (unsigned long)[[NSDate date] timeIntervalSince1970];
// customParams[ date_sent ] (timestamp);
inviteMessage.recipientID [occupantID integerValue]; [[QBChat instance] sendSystemMessage:inviteMessage completion:^(NSError * _Nullable error) { NSLog( inviteMessage % ,inviteMessage);} errorBlock:^(QBResponse *response) { NSLog( ERROR % ,[response.error description]);
Response :
Printing description of chatDialog:
ID:(null) Created At:(null) Updated At:(null) Room JID:(null) name:Chat with User A, User B, User C photo:(null) type:2 lastMessage:(null) lastMessageDate:(null) occupantIDs:(48636831,48637053
)
userID:0
data:(null)
unreadMessagesCount:0
lastMessageUserID:0
该提问来源于开源项目 QuickBlox/quickblox-ios-sdk
点赞 写回答 收藏 复制链接分享 邀请回答 删除 再等等 结题 再想想 7条回答私信 访问主页
weixin_39789979 2月前if you will have any other problems or questions please let us know by creating a separate issue.
Thanks
点赞 评论 复制链接分享私信 访问主页
weixin_39789979 2月前Replace:
objc NSLog( result % ,chatDialog); // return null
with:
objcNSLog( result % , createdDialog);点赞 评论 复制链接分享
私信 访问主页
weixin_39789979 2月前Hi ,
The dialog is successfully created (from your logs):
logos2018-05-02 19:13:46.857644 ClassMate[32493:1522241] [QBCore] Request URL:https://api.quickblox.com/chat/Dialog.json2018-05-02 19:13:46.862205 ClassMate[32493:1522241] [QBCore] Request method: POST2018-05-02 19:13:46.862531 ClassMate[32493:1522241] [QBCore] Request parameters:{ name Chat with User A, User B, User C occupants_ids 48636831,48637053 type 2018-05-02 19:13:46.864796 ClassMate[32493:1522241] [QBCore] Request headers: { Accept-Language en-CA;q 1 Content-Type application/x-www-form-urlencoded QB-OS iOS 10.2.1 QB-SDK iOS 2.7.3 QB-Token 929e83fd3dd3be0272c35d0ffffddcd3f500b0f5; QuickBlox-REST-API-Version 0.1.1 User-Agent ClassMate/1.1 (iPhone; iOS 10.2.1; Scale/2.00) 2018-05-02 19:13:48.085435 ClassMate[32493:1522239] [QBCore] Response headers: { Access-Control-Allow-Origin * Cache-Control max-age 0, private, must-revalidate Connection keep-alive Content-Length 433; Content-Type application/json; charset utf-8 Date Wed, 02 May 2018 15:13:47 GMT Etag W/\\ 853c0743c9aeaca637e7c142ee0f845f\\ QB-Token-ExpirationDate 2018-05-02 17:09:04 0000 QuickBlox-REST-API-Version 0.1.1 Server openresty/1.9.15.1 Set-Cookie _mkra_ctxt 72fb6d384dd74c49157c5803ca77dd7a--201; path max-age HttpOnly; secure Status 201 Created Strict-Transport-Security max-age 31536000, max-age 15768000; X-Content-Type-Options nosniff; X-Frame-Options SAMEORIGIN; X-Request-Id 322d0397-d2a1-4601-a530-3f6e003dd8a5 X-Runtime 0.044216 X-XSS-Protection mode block 2018-05-02 19:13:48.094376 ClassMate[32493:1522239] [QBCore] Response object: { _id 5ae9d5aba28f9a371e250a81; created_at 2018-05-02T15:13:47Z last_message null last_message_date_sent null last_message_id null last_message_user_id null name Chat with User A, User B, User C occupants_ids ( 48636831, 48637053, 48666250 photo null type unread_messages_count updated_at 2018-05-02T15:13:47Z user_id 48666250; xmpp_room_jid 45301_5ae9d5aba28f9a371e250a81.chat.quickblox.com /null /null /null /null /null点赞 评论 复制链接分享
私信 访问主页
weixin_39768247 2月前please check this logs,
logosCoreData: annotation: Failed to load optimized model at path /var/containers/Bundle/Application/1E443FF5-3013-48BD-8E96-A9C7F642982D/ClassMate.app/QMChatCacheModel.bundle/QMChatServiceModel.momd/QMModel3.omo 2018-05-02 19:09:01.113613 ClassMate[32493:1521252] Init - QMAuthService service...2018-05-02 19:09:01.114031 ClassMate[32493:1521252] Init - QMChatService service...CoreData: annotation: Failed to load optimized model at path /var/containers/Bundle/Application/1E443FF5-3013-48BD-8E96-A9C7F642982D/ClassMate.app/QMUsersCacheModel.bundle/QMUsersModel.momd/QMUsersModel2.omo 2018-05-02 19:09:01.143726 ClassMate[32493:1521252] Init - QMUsersService service...2018-05-02 19:09:01.149636 ClassMate[32493:1521307] [QBCore] Request URL:https://api.quickblox.com/login.json2018-05-02 19:09:01.149801 ClassMate[32493:1521307] [QBCore] Request method: POST2018-05-02 19:09:01.150135 ClassMate[32493:1521307] [QBCore] Request parameters:{ login cool680; password “***********”; //2018-05-02 19:09:01.151034 ClassMate[32493:1521307] [QBCore] Request headers: { Accept-Language en-CA;q 1 Content-Type application/x-www-form-urlencoded QB-OS iOS 10.2.1 QB-SDK iOS 2.7.3 QB-Token 929e83fd3dd3be0272c35d0ffffddcd3f500b0f5; QuickBlox-REST-API-Version 0.1.1 User-Agent ClassMate/1.1 (iPhone; iOS 10.2.1; Scale/2.00) 2018-05-02 19:09:01.730988 ClassMate[32493:1521307] [QBCore] Request URL:https://api.quickblox.com/subscriptions.json2018-05-02 19:09:01.731215 ClassMate[32493:1521307] [QBCore] Request method: POST2018-05-02 19:09:01.731324 ClassMate[32493:1521307] [QBCore] Request parameters:{ device { platform ios; udid D26DC0B8-F833-43B3-8F44-B74EC4ED0BEB notification_channels apns; push_token { client_identification_sequence fb304594d539b68531c34e75094897c90c6c29fba767e09c8af69694cd865429; environment development;2018-05-02 19:09:01.731947 ClassMate[32493:1521307] [QBCore] Request headers: { Accept-Language en-CA;q 1 Content-Type application/x-www-form-urlencoded QB-OS iOS 10.2.1 QB-SDK iOS 2.7.3 QB-Token 929e83fd3dd3be0272c35d0ffffddcd3f500b0f5; QuickBlox-REST-API-Version 0.1.1 User-Agent ClassMate/1.1 (iPhone; iOS 10.2.1; Scale/2.00) 2018-05-02 19:09:01.735762 ClassMate[32493:1521334] [QMChatCache] Dialogs to insert 0, update 02018-05-02 19:09:01.977701 ClassMate[32493:1521332] { progress nsprogress: : Parent: 0x0 / Fraction completed: 1.0000 / Completed: 136 of 136 status Progress;2018-05-02 19:09:02.225798 ClassMate[32493:1521334] [QBCore] Response headers: { Access-Control-Allow-Origin * Cache-Control no-cache Connection keep-alive Content-Length 337; Content-Type application/json; charset utf-8 Date Wed, 02 May 2018 15:09:02 GMT QB-Token-ExpirationDate 2018-05-02 17:09:02 UTC QuickBlox-REST-API-Version 0.1.1 Server openresty/1.9.15.1 Set-Cookie _mkra_ctxt 0bab49eda33fd2585d2156feac86b842--202; path max-age HttpOnly; secure Status 202 Accepted Strict-Transport-Security max-age 31536000 X-Content-Type-Options nosniff; X-Frame-Options SAMEORIGIN; X-Request-Id be45ad8a-e11a-4a0e-9138-0761aa78c57e X-Runtime 0.032836 X-XSS-Protection mode block 2018-05-02 19:09:02.242226 ClassMate[32493:1521307] [QBCore] Response object: { user { blob_id null created_at 2018-04-29T08:53:27Z custom_data null email cool.com external_user_id null facebook_id null full_name null id 48666250; last_request_at 2018-05-02T15:09:02Z login cool680; phone null twitter_id null updated_at 2018-05-02T15:09:02Z user_tags null website null 2018-05-02 19:09:02.251302 ClassMate[32493:1521307] [Core] Set default chat endpoint for QBConnectionZoneTypeAutomatic2018-05-02 19:09:02.256366 ClassMate[32493:1521334] [ChatService] Connecting to Chat, host: chat.quickblox.com, user JID: 48666250-45301.quickblox.com/D26DC0B8-F833-43B3-8F44-B74EC4ED0BEB2018-05-02 19:09:02.304786 ClassMate[32493:1521252] { data ( age 46; company created_at 2018-04-29 08:53:26 device_token fb304594d539b68531c34e75094897c90c6c29fba767e09c8af69694cd865429; device_type distance 7000; email cool.com facebook null first_name cool; gender Male; general id 680; is_business job last_name marcel lat 25.00427367 linkedin long 55.15500563 professional profile_photo 1525000444__file_image.jpg quickblox_id 48666250; remember_token $2y$10$fZLoaiP2DlNZpTUkdG42PeHjLdcTZ3zt/KgTNvdDE.KDIYWGtfBEW server_profile_photo twitter updated_at 2018-05-02 15:09:02 user_type status success;2018-05-02 19:09:02.682508 ClassMate[32493:1521308] [QBCore] Response headers: { Access-Control-Allow-Origin * Cache-Control max-age 0, private, must-revalidate Connection keep-alive Content-Length 281; Content-Type application/json; charset utf-8 Date Wed, 02 May 2018 15:09:02 GMT Etag W/\\ f74831426a25e31ee5017c60915d8731\\ QB-Token-ExpirationDate 2018-05-02 17:09:02 0000 QuickBlox-REST-API-Version 0.1.1 Server nginx/1.8.1 Set-Cookie _mkra_ctxt 8cf24e3decfbbf16f082603a364373c4--201; path max-age HttpOnly; secure Status 201 Created Strict-Transport-Security max-age 31536000, max-age 15768000; X-Content-Type-Options nosniff; X-Frame-Options SAMEORIGIN; X-Request-Id 71dcfdea-b114-44a5-90da-3ddb0b0dc3b2 X-Runtime 0.028546 X-XSS-Protection mode block 2018-05-02 19:09:02.685082 ClassMate[32493:1521308] [QBCore] Response object: ( subscription { device { bundle_identifier null client_identification_sequence fb304594d539b68531c34e75094897c90c6c29fba767e09c8af69694cd865429; platform { name ios; udid D26DC0B8-F833-43B3-8F44-B74EC4ED0BEB id 43934784; notification_channel { name apns;2018-05-02 19:09:02.708103 ClassMate[32493:1521308] [QBCore] Request URL:https://api.quickblox.com/login.json2018-05-02 19:09:02.708479 ClassMate[32493:1521308] [QBCore] Request method: POST2018-05-02 19:09:02.708758 ClassMate[32493:1521308] [QBCore] Request parameters:{ login cool680; password *********** 2018-05-02 19:09:02.709062 ClassMate[32493:1521308] [QBCore] Request headers: { Accept-Language en-CA;q 1 Content-Type application/x-www-form-urlencoded QB-OS iOS 10.2.1 QB-SDK iOS 2.7.3 QB-Token 929e83fd3dd3be0272c35d0ffffddcd3f500b0f5; QuickBlox-REST-API-Version 0.1.1 User-Agent ClassMate/1.1 (iPhone; iOS 10.2.1; Scale/2.00) 2018-05-02 19:09:02.975377 ClassMate[32493:1521307] [QBCore] Response headers: { Access-Control-Allow-Origin * Cache-Control no-cache Connection keep-alive Content-Length 337; Content-Type application/json; charset utf-8 Date Wed, 02 May 2018 15:09:02 GMT QB-Token-ExpirationDate 2018-05-02 17:09:02 0000 QuickBlox-REST-API-Version 0.1.1 Server nginx/1.8.1 Set-Cookie _mkra_ctxt 981bdb73b1b9153012d9634b1cd7899e--202; path max-age HttpOnly; secure Status 202 Accepted Strict-Transport-Security max-age 31536000 X-Content-Type-Options nosniff; X-Frame-Options SAMEORIGIN; X-Request-Id 79f44f30-8dd8-4218-9e93-812b9ee4a59f X-Runtime 0.037207 X-XSS-Protection mode block 2018-05-02 19:09:02.975791 ClassMate[32493:1521307] [QBCore] Response object: { user { blob_id null created_at 2018-04-29T08:53:27Z custom_data null email cool.com external_user_id null facebook_id null full_name null id 48666250; last_request_at 2018-05-02T15:09:02Z login cool680; phone null twitter_id null updated_at 2018-05-02T15:09:02Z user_tags null website null 2018-05-02 19:09:03.017201 ClassMate[32493:1521252] failure2018-05-02 19:09:03.017502 ClassMate[32493:1521313] [ChatService] Connecting to Chat, host: chat.quickblox.com, user JID: 48666250-45301.quickblox.com/D26DC0B8-F833-43B3-8F44-B74EC4ED0BEB2018-05-02 19:09:03.018255 ClassMate[32493:1521313] [ChatService] Connection error: Error Domain XMPPStreamErrorDomain Code 1 Attempting to connect while already connected or connecting. UserInfo {NSLocalizedDescription Attempting to connect while already connected or connecting.}2018-05-02 19:09:03.232486 ClassMate[32493:1521313] [ChatService] Stream did connect, supportsStartTLS: 12018-05-02 19:09:03.232917 ClassMate[32493:1521313] [ChatService] Trying TLS...2018-05-02 19:09:04.369821 ClassMate[32493:1521309] [ChatService] Stream isSecure: YES2018-05-02 19:09:04.708230 ClassMate[32493:1521332] [QBCore] Request URL:https://api.quickblox.com/login.json2018-05-02 19:09:04.708643 ClassMate[32493:1521332] [QBCore] Request method: POST2018-05-02 19:09:04.709224 ClassMate[32493:1521332] [QBCore] Request parameters:{ login cool680; password *********** 2018-05-02 19:09:04.709626 ClassMate[32493:1521332] [QBCore] Request headers: { Accept-Language en-CA;q 1 Content-Type application/x-www-form-urlencoded QB-OS iOS 10.2.1 QB-SDK iOS 2.7.3 QB-Token 929e83fd3dd3be0272c35d0ffffddcd3f500b0f5; QuickBlox-REST-API-Version 0.1.1 User-Agent ClassMate/1.1 (iPhone; iOS 10.2.1; Scale/2.00) 2018-05-02 19:09:04.806744 ClassMate[32493:1521309] [ChatService] Stream did connect, supportsStartTLS: 02018-05-02 19:09:04.951784 ClassMate[32493:1521308] [QBCore] Response headers: { Access-Control-Allow-Origin * Cache-Control no-cache Connection keep-alive Content-Length 337; Content-Type application/json; charset utf-8 Date Wed, 02 May 2018 15:09:04 GMT QB-Token-ExpirationDate 2018-05-02 17:09:02 0000 QuickBlox-REST-API-Version 0.1.1 Server openresty/1.9.15.1 Set-Cookie _mkra_ctxt ac36eb7961e22a5dfa1941ea6d0ab0c9--202; path max-age HttpOnly; secure Status 202 Accepted Strict-Transport-Security max-age 31536000 X-Content-Type-Options nosniff; X-Frame-Options SAMEORIGIN; X-Request-Id 3000255f-ec69-424e-9b95-3e05b1a065cd X-Runtime 0.020974 X-XSS-Protection mode block 2018-05-02 19:09:04.955436 ClassMate[32493:1521308] [QBCore] Response object: { user { blob_id null created_at 2018-04-29T08:53:27Z custom_data null email cool.com external_user_id null facebook_id null full_name null id 48666250; last_request_at 2018-05-02T15:09:04Z login cool680; phone null twitter_id null updated_at 2018-05-02T15:09:02Z user_tags null website null 2018-05-02 19:09:04.986964 ClassMate[32493:1521252] failure2018-05-02 19:09:04.987331 ClassMate[32493:1521332] [ChatService] Connecting to Chat, host: chat.quickblox.com, user JID: 48666250-45301.quickblox.com/D26DC0B8-F833-43B3-8F44-B74EC4ED0BEB2018-05-02 19:09:04.987666 ClassMate[32493:1521332] [ChatService] Connection error: Error Domain XMPPStreamErrorDomain Code 1 Attempting to connect while already connected or connecting. UserInfo {NSLocalizedDescription Attempting to connect while already connected or connecting.}2018-05-02 19:09:05.959249 ClassMate[32493:1521308] [ChatService] Did authenticate, user: 486662502018-05-02 19:09:05.969689 ClassMate[32493:1521308] [Core] Keep alive interval should be greater than or equal 20.0, used 20.02018-05-02 19:09:05.970046 ClassMate[32493:1521308] [ChatService] IQ SNT: iq xmlns jabber:client type set id 3E00187C-8389-4ED6-94B4-2F812CE82A81 enable xmlns urn:xmpp:carbons:2 /enable /iq 2018-05-02 19:09:05.970368 ClassMate[32493:1521308] [ChatService] Presence SNT: presence /presence 2018-05-02 19:09:05.970643 ClassMate[32493:1521308] [ChatService] IQ SNT: iq type get id 9C4F5971-AF37-42F7-8D7A-CD7937F86EE3 query xmlns jabber:iq:roster /query /iq 2018-05-02 19:09:06.009766 ClassMate[32493:1521308] [QBCore] Request URL:https://api.quickblox.com/subscriptions.json2018-05-02 19:09:06.010158 ClassMate[32493:1521308] [QBCore] Request method: POST2018-05-02 19:09:06.010458 ClassMate[32493:1521308] [QBCore] Request parameters:{ device { platform ios; udid D26DC0B8-F833-43B3-8F44-B74EC4ED0BEB notification_channels apns; push_token { client_identification_sequence fb304594d539b68531c34e75094897c90c6c29fba767e09c8af69694cd865429; environment development;2018-05-02 19:09:06.010761 ClassMate[32493:1521308] [QBCore] Request headers: { Accept-Language en-CA;q 1 Content-Type application/x-www-form-urlencoded QB-OS iOS 10.2.1 QB-SDK iOS 2.7.3 QB-Token 929e83fd3dd3be0272c35d0ffffddcd3f500b0f5; QuickBlox-REST-API-Version 0.1.1 User-Agent ClassMate/1.1 (iPhone; iOS 10.2.1; Scale/2.00) 2018-05-02 19:09:06.016280 ClassMate[32493:1521313] { progress nsprogress: : Parent: 0x0 / Fraction completed: 1.0000 / Completed: 136 of 136 status Progress;2018-05-02 19:09:06.185799 ClassMate[32493:1521332] [ChatService] IQ RCV: iq xmlns jabber:client id 3E00187C-8389-4ED6-94B4-2F812CE82A81 to 48666250-45301.quickblox.com/D26DC0B8-F833-43B3-8F44-B74EC4ED0BEB type result /iq 2018-05-02 19:09:06.263929 ClassMate[32493:1521313] [QBCore] Response headers: { Access-Control-Allow-Origin * Cache-Control max-age 0, private, must-revalidate Connection keep-alive Content-Length 281; Content-Type application/json; charset utf-8 Date Wed, 02 May 2018 15:09:06 GMT Etag W/\\ f74831426a25e31ee5017c60915d8731\\ QB-Token-ExpirationDate 2018-05-02 17:09:04 0000 QuickBlox-REST-API-Version 0.1.1 Server nginx/1.8.1 Set-Cookie _mkra_ctxt 2d3a1d65b4de6ef455af58b4c57b3214--201; path max-age HttpOnly; secure Status 201 Created Strict-Transport-Security max-age 31536000, max-age 15768000; X-Content-Type-Options nosniff; X-Frame-Options SAMEORIGIN; X-Request-Id a7b8f690-7fea-4e46-9f06-42ed27ca2215 X-Runtime 0.028572 X-XSS-Protection mode block 2018-05-02 19:09:06.292261 ClassMate[32493:1521313] [QBCore] Response object: ( subscription { device { bundle_identifier null client_identification_sequence fb304594d539b68531c34e75094897c90c6c29fba767e09c8af69694cd865429; platform { name ios; udid D26DC0B8-F833-43B3-8F44-B74EC4ED0BEB id 43934784; notification_channel { name apns;2018-05-02 19:09:06.342047 ClassMate[32493:1521252] { data ( age 46; company created_at 2018-04-29 08:53:26 device_token fb304594d539b68531c34e75094897c90c6c29fba767e09c8af69694cd865429; device_type distance 7000; email cool.com facebook null first_name cool; gender Male; general id 680; is_business job last_name marcel lat 25.00427367 linkedin long 55.15500563 professional profile_photo 1525004__file_image.jpg quickblox_id 48666250; remember_token $2y$10$fZLoaiP2DlNZpTUkdG42PeHjLdcTZ3zt/KgTNvdDE.KDIYWGtfBEW server_profile_photo twitter updated_at 2018-05-02 15:09:06 user_type status success;2018-05-02 19:09:06.403667 ClassMate[32493:1521308] [ChatService] StreamManagement: enabled enabled xmlns urn:xmpp:sm:3 /enabled 2018-05-02 19:09:06.673892 ClassMate[32493:1521332] [ChatService] IQ RCV: iq xmlns jabber:client id 9C4F5971-AF37-42F7-8D7A-CD7937F86EE3 to 48666250-45301.quickblox.com/D26DC0B8-F833-43B3-8F44-B74EC4ED0BEB type result query xmlns jabber:iq:roster /query /iq 2018-05-02 19:09:06.674585 ClassMate[32493:1521307] [ChatService] Presence RCV: presence xmlns jabber:client from 48666250-45301.quickblox.com/00EFE760-3AA1-4BD5-B37B-C7EDF6456C43 to 48666250-45301.quickblox.com /presence 2018-05-02 19:09:06.678131 ClassMate[32493:1521314] [ChatService] Presence RCV: presence xmlns jabber:client from 48666250-45301.quickblox.com/D26DC0B8-F833-43B3-8F44-B74EC4ED0BEB to 48666250-45301.quickblox.com /presence
本文链接: http://mfcachat.immuno-online.com/view-784141.html