QuickBlox / quickblox-ios-sdk

QuickBlox iOS SDK for messaging and video calling
https://quickblox.com/developers/IOS
MIT License
397 stars 358 forks source link

When send message to group, and it's return error "You are not joined to the dialog" #1051

Closed hajakiyasudeen closed 6 years ago

hajakiyasudeen commented 6 years ago

Environment details iOS version, Quickblox iOS SDK version, QuickbloxWebRTC SDK version (optional) iOS 10.2.1 QuickBlox (2.7.3) QMServices (0.4.2)

Did this work before? Yes

Expected behavior User can send messages in group

Actual behavior User is login, while sending a message and receive error "You are not joined to the dialog".

Logs

I have logged with user “Helina(50725108)” and created a QBChatDialog “Z 2” with 3 users(Helina,zahid, tyson) all are working fine, but When I try to send message in this group by using below method

[self.chatDialog sendMessage:message completionBlock:^(NSError * _Nullable error) {}];

And I receive the following messages in logs

Error Error Domain=com.quickblox.chat Code=-1001 "(null)" UserInfo={NSLocalizedRecoverySuggestion=You are not joined to the dialog.}

Here is full log from the app start till "you are not joinedto the dialog" error.

objc[81181]: Class _CDAttachment is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/CoreDuet.framework/CoreDuet (0x12126f898) and /Users/em/Library/Developer/CoreSimulator/Devices/5DF5E29F-3E60-46ED-A5E2-D95A8BDCD503/data/Containers/Bundle/Application/420B867A-3BF1-40B0-813C-F3576143classmatecMate.app/classmate (0x10b503ae8). One of the two will be used. Which one is undefined.
2018-06-07 12:53:05.068586+0400 classmate[81181:11486903] [Crashlytics] Version 3.8.3 (120)
2018-06-07 12:53:05.078092+0400 classmate[81181:11486903] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /Users/em/Library/Developer/CoreSimulator/Devices/5DF5E29F-3E60-46ED-A5E2-D95A8BDCD503/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2018-06-07 12:53:05.078911+0400 classmate[81181:11486903] [MC] Reading from private effective user settings.
2018-06-07 12:53:05.176098+0400 classmate[81181:11486903] 

2018-06-07 12:53:05.595811+0400 classmate[81181:11486903] Lat is 37.78583400 Long is -122.40641700
2018-06-07 12:53:05.598569+0400 classmate[81181:11486903] Lat is 37.78583400 Long is -122.40641700
2018-06-07 12:53:05.609487+0400 classmate[81181:11486903] Init - QMAuthService service...
2018-06-07 12:53:05.610144+0400 classmate[81181:11486903] Init - QMChatService service...
2018-06-07 12:53:05.618145+0400 classmate[81181:11486903] Init - QMUsersService service...
2018-06-07 12:53:05.622562+0400 classmate[81181:11487026] [QBCore] Request URL:https://api.quickblox.com/login.json
2018-06-07 12:53:05.624503+0400 classmate[81181:11487026] [QBCore] Request method: POST
2018-06-07 12:53:05.624653+0400 classmate[81181:11487026] [QBCore] Request parameters:{
    login = helina765;
    password = "Sm0nt3@b70x";
}
2018-06-07 12:53:05.624864+0400 classmate[81181:11487026] [QBCore] Request headers: {
    "Accept-Language" = "en;q=1";
    "Content-Type" = "application/x-www-form-urlencoded";
    "QB-OS" = "iOS 11.3";
    "QB-SDK" = "iOS 2.7.3";
    "QB-Token" = a21c40bc21923f4ce0c3c8027126e7fd3800b0f5;
    "QuickBlox-REST-API-Version" = "0.1.1";
    "User-Agent" = "classmate/1.1 (iPhone; iOS 11.3; Scale/2.00)";
}
2018-06-07 12:53:05.626949+0400 classmate[81181:11486903] Lat is 37.78583400 Long is -122.40641700
2018-06-07 12:53:05.649194+0400 classmate[81181:11487026] [Core] Set default chat endpoint for QBConnectionZoneTypeAutomatic
2018-06-07 12:53:05.670044+0400 classmate[81181:11487025] [QMChatCache] Dialogs to insert 0, update 0
2018-06-07 12:53:06.746733+0400 classmate[81181:11487051] [QBCore] Response headers: {
    "Access-Control-Allow-Origin" = "*";
    "Cache-Control" = "no-cache";
    Connection = "keep-alive";
    "Content-Length" = 352;
    "Content-Type" = "application/json; charset=utf-8";
    Date = "Thu, 07 Jun 2018 08:53:06 GMT";
    "QB-Token-ExpirationDate" = "2018-06-07 10:52:30 +0000";
    "QuickBlox-REST-API-Version" = "0.1.1";
    Server = "nginx/1.8.1";
    "Set-Cookie" = "_mkra_ctxt=c9455b4bc3a6a1f14edfa0517812affc--202; path=/; max-age=5; HttpOnly; secure";
    Status = "202 Accepted";
    "Strict-Transport-Security" = "max-age=31536000";
    "X-Content-Type-Options" = nosniff;
    "X-Frame-Options" = SAMEORIGIN;
    "X-Request-Id" = "374361ab-32c4-4e21-bb85-534e6941e988";
    "X-Runtime" = "0.031608";
    "X-XSS-Protection" = "1; mode=block";
}
2018-06-07 12:53:06.747907+0400 classmate[81181:11487051] [QBCore] Response object: {
    user =     {
        "blob_id" = "<null>";
        "created_at" = "2018-05-24T16:00:02Z";
        "custom_data" = "<null>";
        email = "helina@gmail.com";
        "external_user_id" = "<null>";
        "facebook_id" = "<null>";
        "full_name" = "helina Benton";
        id = 50725108;
        "last_request_at" = "2018-06-07T08:53:06Z";
        login = helina765;
        phone = "<null>";
        "twitter_id" = "<null>";
        "updated_at" = "2018-06-07T08:52:24Z";
        "user_tags" = "<null>";
        website = "<null>";
    };
}
2018-06-07 12:53:06.763193+0400 classmate[81181:11487052] [ChatService] Connecting to Chat, host: chat.quickblox.com, user JID: 50725108-45301@chat.quickblox.com/90B5FEE1-FA5E-46DF-AA1F-A88191DF91D2
2018-06-07 12:53:06.858932+0400 classmate[81181:11487051] [QBCore] Request URL:https://api.quickblox.com/login.json
2018-06-07 12:53:06.859111+0400 classmate[81181:11487051] [QBCore] Request method: POST
2018-06-07 12:53:06.859411+0400 classmate[81181:11487051] [QBCore] Request parameters:{
    login = helina765;
    password = "Sm0nt3@b70x";
}
2018-06-07 12:53:06.859581+0400 classmate[81181:11487051] [QBCore] Request headers: {
    "Accept-Language" = "en;q=1";
    "Content-Type" = "application/x-www-form-urlencoded";
    "QB-OS" = "iOS 11.3";
    "QB-SDK" = "iOS 2.7.3";
    "QB-Token" = a21c40bc21923f4ce0c3c8027126e7fd3800b0f5;
    "QuickBlox-REST-API-Version" = "0.1.1";
    "User-Agent" = "classmate/1.1 (iPhone; iOS 11.3; Scale/2.00)";
}
2018-06-07 12:53:07.158759+0400 classmate[81181:11487051] [QBCore] Response headers: {
    "Access-Control-Allow-Origin" = "*";
    "Cache-Control" = "no-cache";
    Connection = "keep-alive";
    "Content-Length" = 352;
    "Content-Type" = "application/json; charset=utf-8";
    Date = "Thu, 07 Jun 2018 08:53:07 GMT";
    "QB-Token-ExpirationDate" = "2018-06-07 10:53:06 +0000";
    "QuickBlox-REST-API-Version" = "0.1.1";
    Server = "nginx/1.8.1";
    "Set-Cookie" = "_mkra_ctxt=568af5373f7076556049975277a5886c--202; path=/; max-age=5; HttpOnly; secure";
    Status = "202 Accepted";
    "Strict-Transport-Security" = "max-age=31536000";
    "X-Content-Type-Options" = nosniff;
    "X-Frame-Options" = SAMEORIGIN;
    "X-Request-Id" = "dbd0b79d-1891-4a27-9e2b-b208f6d90f61";
    "X-Runtime" = "0.032647";
    "X-XSS-Protection" = "1; mode=block";
}
2018-06-07 12:53:07.164320+0400 classmate[81181:11487051] [QBCore] Response object: {
    user =     {
        "blob_id" = "<null>";
        "created_at" = "2018-05-24T16:00:02Z";
        "custom_data" = "<null>";
        email = "helina@gmail.com";
        "external_user_id" = "<null>";
        "facebook_id" = "<null>";
        "full_name" = "helina Benton";
        id = 50725108;
        "last_request_at" = "2018-06-07T08:53:07Z";
        login = helina765;
        phone = "<null>";
        "twitter_id" = "<null>";
        "updated_at" = "2018-06-07T08:52:24Z";
        "user_tags" = "<null>";
        website = "<null>";
    };
}
2018-06-07 12:53:07.172627+0400 classmate[81181:11487052] [ChatService] Connecting to Chat, host: chat.quickblox.com, user JID: 50725108-45301@chat.quickblox.com/90B5FEE1-FA5E-46DF-AA1F-A88191DF91D2
2018-06-07 12:53:07.172820+0400 classmate[81181:11486903] failure
2018-06-07 12:53:07.172940+0400 classmate[81181:11487052] [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-06-07 12:53:07.952038+0400 classmate[81181:11487034] [ChatService] Stream did connect, supportsStartTLS: 1
2018-06-07 12:53:07.952387+0400 classmate[81181:11487034] [ChatService] Trying TLS...
2018-06-07 12:53:08.858490+0400 classmate[81181:11487049] [QBCore] Request URL:https://api.quickblox.com/login.json
2018-06-07 12:53:08.858705+0400 classmate[81181:11487049] [QBCore] Request method: POST
2018-06-07 12:53:08.858900+0400 classmate[81181:11487049] [QBCore] Request parameters:{
    login = helina765;
    password = "Sm0nt3@b70x";
}
2018-06-07 12:53:08.859054+0400 classmate[81181:11487049] [QBCore] Request headers: {
    "Accept-Language" = "en;q=1";
    "Content-Type" = "application/x-www-form-urlencoded";
    "QB-OS" = "iOS 11.3";
    "QB-SDK" = "iOS 2.7.3";
    "QB-Token" = a21c40bc21923f4ce0c3c8027126e7fd3800b0f5;
    "QuickBlox-REST-API-Version" = "0.1.1";
    "User-Agent" = "classmate/1.1 (iPhone; iOS 11.3; Scale/2.00)";
}
2018-06-07 12:53:09.189802+0400 classmate[81181:11487039] [QBCore] Response headers: {
    "Access-Control-Allow-Origin" = "*";
    "Cache-Control" = "no-cache";
    Connection = "keep-alive";
    "Content-Length" = 352;
    "Content-Type" = "application/json; charset=utf-8";
    Date = "Thu, 07 Jun 2018 08:53:09 GMT";
    "QB-Token-ExpirationDate" = "2018-06-07 10:53:07 +0000";
    "QuickBlox-REST-API-Version" = "0.1.1";
    Server = "nginx/1.8.1";
    "Set-Cookie" = "_mkra_ctxt=2b8e852333654e442d7cba64bad6b62b--202; path=/; max-age=5; HttpOnly; secure";
    Status = "202 Accepted";
    "Strict-Transport-Security" = "max-age=31536000";
    "X-Content-Type-Options" = nosniff;
    "X-Frame-Options" = SAMEORIGIN;
    "X-Request-Id" = "d50d4546-e9ad-4674-8694-f6af49269bca";
    "X-Runtime" = "0.034790";
    "X-XSS-Protection" = "1; mode=block";
}
2018-06-07 12:53:09.194958+0400 classmate[81181:11487039] [QBCore] Response object: {
    user =     {
        "blob_id" = "<null>";
        "created_at" = "2018-05-24T16:00:02Z";
        "custom_data" = "<null>";
        email = "helina@gmail.com";
        "external_user_id" = "<null>";
        "facebook_id" = "<null>";
        "full_name" = "helina Benton";
        id = 50725108;
        "last_request_at" = "2018-06-07T08:53:09Z";
        login = helina765;
        phone = "<null>";
        "twitter_id" = "<null>";
        "updated_at" = "2018-06-07T08:52:24Z";
        "user_tags" = "<null>";
        website = "<null>";
    };
}
2018-06-07 12:53:09.200652+0400 classmate[81181:11487039] [ChatService] Connecting to Chat, host: chat.quickblox.com, user JID: 50725108-45301@chat.quickblox.com/90B5FEE1-FA5E-46DF-AA1F-A88191DF91D2
2018-06-07 12:53:09.200669+0400 classmate[81181:11486903] failure
2018-06-07 12:53:09.201109+0400 classmate[81181:11487039] [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-06-07 12:53:09.305046+0400 classmate[81181:11487049] [ChatService] Stream isSecure: YES
2018-06-07 12:53:09.831456+0400 classmate[81181:11487049] [ChatService] Stream did connect, supportsStartTLS: 0
2018-06-07 12:53:10.859604+0400 classmate[81181:11487051] [QBCore] Request URL:https://api.quickblox.com/login.json
2018-06-07 12:53:10.859872+0400 classmate[81181:11487051] [QBCore] Request method: POST
2018-06-07 12:53:10.860182+0400 classmate[81181:11487051] [QBCore] Request parameters:{
    login = helina765;
    password = "Sm0nt3@b70x";
}
2018-06-07 12:53:10.860523+0400 classmate[81181:11487051] [QBCore] Request headers: {
    "Accept-Language" = "en;q=1";
    "Content-Type" = "application/x-www-form-urlencoded";
    "QB-OS" = "iOS 11.3";
    "QB-SDK" = "iOS 2.7.3";
    "QB-Token" = a21c40bc21923f4ce0c3c8027126e7fd3800b0f5;
    "QuickBlox-REST-API-Version" = "0.1.1";
    "User-Agent" = "classmate/1.1 (iPhone; iOS 11.3; Scale/2.00)";
}
2018-06-07 12:53:10.938791+0400 classmate[81181:11487051] [ChatService] Did authenticate, user: 50725108
2018-06-07 12:53:10.943678+0400 classmate[81181:11487034] [Core] Keep alive interval should be greater than or equal 20.0, used 20.0
2018-06-07 12:53:10.943946+0400 classmate[81181:11487034] [ChatService] IQ SNT: <iq xmlns="jabber:client" type="set" id="901C703A-CCF5-48D7-8F4A-F6050B7574A0"><enable xmlns="urn:xmpp:carbons:2"></enable></iq>
2018-06-07 12:53:10.944157+0400 classmate[81181:11487034] [ChatService] Presence SNT: <presence></presence>
2018-06-07 12:53:10.944320+0400 classmate[81181:11487034] [ChatService] IQ SNT: <iq type="get" id="E505F0DA-F335-4687-A612-36A705AB6817"><query xmlns="jabber:iq:roster"></query></iq>
2018-06-07 12:53:10.946972+0400 classmate[81181:11486903] Fail to register for remote notifications: Error Domain=NSCocoaErrorDomain Code=3010 "remote notifications are not supported in the simulator" UserInfo={NSLocalizedDescription=remote notifications are not supported in the simulator}
2018-06-07 12:53:11.165907+0400 classmate[81181:11487049] [QBCore] Response headers: {
    "Access-Control-Allow-Origin" = "*";
    "Cache-Control" = "no-cache";
    Connection = "keep-alive";
    "Content-Length" = 352;
    "Content-Type" = "application/json; charset=utf-8";
    Date = "Thu, 07 Jun 2018 08:53:11 GMT";
    "QB-Token-ExpirationDate" = "2018-06-07 10:53:09 +0000";
    "QuickBlox-REST-API-Version" = "0.1.1";
    Server = "nginx/1.8.1";
    "Set-Cookie" = "_mkra_ctxt=45a73dee5de247032bb04f5f979b40f1--202; path=/; max-age=5; HttpOnly; secure";
    Status = "202 Accepted";
    "Strict-Transport-Security" = "max-age=31536000";
    "X-Content-Type-Options" = nosniff;
    "X-Frame-Options" = SAMEORIGIN;
    "X-Request-Id" = "70799e9e-5440-4f5d-b56b-e04594b409e4";
    "X-Runtime" = "0.036515";
    "X-XSS-Protection" = "1; mode=block";
}
2018-06-07 12:53:11.169913+0400 classmate[81181:11487049] [QBCore] Response object: {
    user =     {
        "blob_id" = "<null>";
        "created_at" = "2018-05-24T16:00:02Z";
        "custom_data" = "<null>";
        email = "helina@gmail.com";
        "external_user_id" = "<null>";
        "facebook_id" = "<null>";
        "full_name" = "helina Benton";
        id = 50725108;
        "last_request_at" = "2018-06-07T08:53:11Z";
        login = helina765;
        phone = "<null>";
        "twitter_id" = "<null>";
        "updated_at" = "2018-06-07T08:52:24Z";
        "user_tags" = "<null>";
        website = "<null>";
    };
}
2018-06-07 12:53:11.173964+0400 classmate[81181:11487051] [Core] Keep alive interval should be greater than or equal 20.0, used 20.0
2018-06-07 12:53:11.176112+0400 classmate[81181:11486903] Fail to register for remote notifications: Error Domain=NSCocoaErrorDomain Code=3010 "remote notifications are not supported in the simulator" UserInfo={NSLocalizedDescription=remote notifications are not supported in the simulator}
2018-06-07 12:53:11.205388+0400 classmate[81181:11487034] [ChatService] IQ RCV: <iq xmlns="jabber:client" to="50725108-45301@chat.quickblox.com/90B5FEE1-FA5E-46DF-AA1F-A88191DF91D2" id="901C703A-CCF5-48D7-8F4A-F6050B7574A0" type="result"></iq>
2018-06-07 12:53:11.508476+0400 classmate[81181:11487049] [ChatService] StreamManagement: enabled= <enabled xmlns="urn:xmpp:sm:3"></enabled>
2018-06-07 12:53:11.813223+0400 classmate[81181:11487051] [ChatService] IQ RCV: <iq xmlns="jabber:client" to="50725108-45301@chat.quickblox.com/90B5FEE1-FA5E-46DF-AA1F-A88191DF91D2" id="E505F0DA-F335-4687-A612-36A705AB6817" type="result"><query xmlns="jabber:iq:roster"></query></iq>
2018-06-07 12:53:11.813480+0400 classmate[81181:11487051] [ChatService] Presence RCV: <presence xmlns="jabber:client" to="50725108-45301@chat.quickblox.com" from="50725108-45301@chat.quickblox.com/90B5FEE1-FA5E-46DF-AA1F-A88191DF91D2"></presence>

GET GROUP DIALOGS

2018-06-07 12:55:22.181499+0400 classmate[81181:11487052] [QBCore] Request URL:https://api.quickblox.com/chat/Dialog.json?limit=100
2018-06-07 12:55:22.181740+0400 classmate[81181:11487052] [QBCore] Request method: GET
2018-06-07 12:55:22.181898+0400 classmate[81181:11487052] [QBCore] Request parameters:{
    limit = 100;
}
2018-06-07 12:55:22.182196+0400 classmate[81181:11487052] [QBCore] Request headers: {
    "Accept-Language" = "en;q=1";
    "QB-OS" = "iOS 11.3";
    "QB-SDK" = "iOS 2.7.3";
    "QB-Token" = a21c40bc21923f4ce0c3c8027126e7fd3800b0f5;
    "QuickBlox-REST-API-Version" = "0.1.1";
    "User-Agent" = "classmate/1.1 (iPhone; iOS 11.3; Scale/2.00)";
}

2018-06-07 12:55:23.605106+0400 classmate[81181:11488653] [QBCore] Response headers: {
    "Access-Control-Allow-Origin" = "*";
    "Cache-Control" = "max-age=0, private, must-revalidate";
    Connection = "keep-alive";
    "Content-Length" = 1288;
    "Content-Type" = "application/json; charset=utf-8";
    Date = "Thu, 07 Jun 2018 08:55:23 GMT";
    Etag = "W/\"b1a127c36aa476cce0b1637616dfd647\"";
    "QB-Token-ExpirationDate" = "2018-06-07 10:53:11 +0000";
    "QuickBlox-REST-API-Version" = "0.1.1";
    Server = "openresty/1.9.15.1";
    "Set-Cookie" = "_mkra_ctxt=b05af433d1561c0a311050a22d75cf5a--200; path=/; max-age=5; HttpOnly; secure";
    Status = "304 Not Modified";
    "Strict-Transport-Security" = "max-age=31536000, max-age=15768000;";
    "X-Content-Type-Options" = nosniff;
    "X-Frame-Options" = SAMEORIGIN;
    "X-Request-Id" = "e2efc6e6-90d0-45a0-80db-cea4bb07f18d";
    "X-Runtime" = "0.025060";
    "X-XSS-Protection" = "1; mode=block";
}
2018-06-07 12:55:23.723916+0400 classmate[81181:11488653] [QBCore] Response object: {
    items =     (
                {
            "_id" = 5b17ca7ca0eb477a3bedee77;
            "created_at" = "2018-06-06T11:50:20Z";
            "last_message" = hi;
            "last_message_date_sent" = 1528286008;
            "last_message_id" = 5b17cb38237299401b0fc6c5;
            "last_message_user_id" = 50725108;
            name = "z 2";
            "occupants_ids" =             (
                50724776,
                50725108,
                51205131
            );
            photo = "http://69.64.88.48/assets/images/1528285823__1528285820925.jpg";
            type = 2;
            "unread_messages_count" = 0;
            "updated_at" = "2018-06-06T11:53:28Z";
            "user_id" = 50725108;
            "xmpp_room_jid" = "45301_5b17ca7ca0eb477a3bedee77@muc.chat.quickblox.com";
        },
                {
            "_id" = 5b17c703a28f9a0a5b6685f2;
            "created_at" = "2018-06-06T11:35:31Z";
            "last_message" = nunun;
            "last_message_date_sent" = 1528285050;
            "last_message_id" = 5b17c77a2372902e78afda78;
            "last_message_user_id" = 50725108;
            name = "Tyson mark";
            "occupants_ids" =             (
                50724776,
                50725108
            );
            photo = "<null>";
            type = 3;
            "unread_messages_count" = 1;
            "updated_at" = "2018-06-06T11:37:30Z";
            "user_id" = 50724776;
            "xmpp_room_jid" = "<null>";
        },
                {
            "_id" = 5b17c916a28f9a7e9c668660;
            "created_at" = "2018-06-06T11:44:22Z";
            "last_message" = "<null>";
            "last_message_date_sent" = "<null>";
            "last_message_id" = "<null>";
            "last_message_user_id" = "<null>";
            name = "zahid shaikh";
            "occupants_ids" =             (
                50725108,
                51205131
            );
            photo = "<null>";
            type = 3;
            "unread_messages_count" = 0;
            "updated_at" = "2018-06-06T11:44:22Z";
            "user_id" = 50725108;
            "xmpp_room_jid" = "<null>";
        }
    );
    limit = 100;
    skip = 0;
    "total_entries" = 3;
}
2018-06-07 12:55:23.724523+0400 classmate[81181:11488653] [QBCore] Response object: {
    items =     (
                {
            "_id" = 5b17ca7ca0eb477a3bedee77;
            "created_at" = "2018-06-06T11:50:20Z";
            "last_message" = hi;
            "last_message_date_sent" = 1528286008;
            "last_message_id" = 5b17cb38237299401b0fc6c5;
            "last_message_user_id" = 50725108;
            name = "z 2";
            "occupants_ids" =             (
                50724776,
                50725108,
                51205131
            );
            photo = "http://69.64.88.48/assets/images/1528285823__1528285820925.jpg";
            type = 2;
            "unread_messages_count" = 0;
            "updated_at" = "2018-06-06T11:53:28Z";
            "user_id" = 50725108;
            "xmpp_room_jid" = "45301_5b17ca7ca0eb477a3bedee77@muc.chat.quickblox.com";
        },
                {
            "_id" = 5b17c703a28f9a0a5b6685f2;
            "created_at" = "2018-06-06T11:35:31Z";
        2018-06-07 12:55:23.724714+0400 classmate[81181:11486903] self.dialogs.count 1
    "last_message" = nunun;
            "last_message_date_sent" = 1528285050;
            "last_message_id" = 5b17c77a2372902e78afda78;
            "last_message_user_id" = 50725108;
            name = "Tyson mark";
            "occupants_ids" =             (
                50724776,
                50725108
            );
            photo = "<null>";
            type = 3;
            "unread_messages_count" = 1;
            "updated_at" = "2018-06-06T11:37:30Z";
            "user_id" = 50724776;
            "xmpp_room_jid" = "<null>";
        },
                {
            "_id" = 5b17c916a28f9a7e9c668660;
            "created_at" = "2018-06-06T11:44:22Z";
            "last_message" = "<null>";
            "last_message_date_sent" = "<null>";
            "last_message_id" = "<null>";
            "last_message_user_id" = "<null>";
            name = "zahid shaikh";
            "occupants_ids" =             (
                50725108,
                51205131
            );
            photo = "<null>";
            type = 3;
            "unread_messages_count" = 0;
            "updated_at" = "2018-06-06T11:44:22Z";
            "user_id" = 50725108;
            "xmpp_room_jid" = "<null>";
        }
    );
    limit = 100;
    skip = 0;
    "total_entries" = 3;
}

CLICK ON GROUP 

2018-06-07 12:58:59.160774+0400 classmate[81181:11486903] [Graphics] UIColor created with component values far outside the expected range. Set a breakpoint on UIColorBreakForOutOfRangeColorComponents to debug. This message will only be logged once.
2018-06-07 12:58:59.216020+0400 classmate[81181:11488981] [QBCore] Request URL:https://api.quickblox.com/users.json?filter%5B%5D=number%20id%20in%2050724776%2C50725108%2C51205131&page=1&per_page=3
2018-06-07 12:58:59.216168+0400 classmate[81181:11488981] [QBCore] Request method: GET
2018-06-07 12:58:59.216378+0400 classmate[81181:11488981] [QBCore] Request parameters:{
    "filter[]" = "number id in 50724776,50725108,51205131";
    page = 1;
    "per_page" = 3;
}
2018-06-07 12:58:59.216511+0400 classmate[81181:11488981] [QBCore] Request headers: {
    "Accept-Language" = "en;q=1";
    "QB-OS" = "iOS 11.3";
    "QB-SDK" = "iOS 2.7.3";
    "QB-Token" = a21c40bc21923f4ce0c3c8027126e7fd3800b0f5;
    "QuickBlox-REST-API-Version" = "0.1.1";
    "User-Agent" = "classmate/1.1 (iPhone; iOS 11.3; Scale/2.00)";
}
2018-06-07 12:59:00.285269+0400 classmate[81181:11490878] [QBCore] Response headers: {
    "Access-Control-Allow-Origin" = "*";
    "Cache-Control" = "max-age=0, private, must-revalidate";
    Connection = "keep-alive";
    "Content-Length" = 1105;
    "Content-Type" = "application/json; charset=utf-8";
    Date = "Thu, 07 Jun 2018 08:59:00 GMT";
    Etag = "W/\"ef44285c93cbc16c8f40fc5733b201a1\"";
    "QB-Token-ExpirationDate" = "2018-06-07 10:53:11 +0000";
    "QuickBlox-REST-API-Version" = "0.1.1";
    Server = "openresty/1.9.15.1";
    "Set-Cookie" = "_mkra_ctxt=452f94127155f38a0a666ae95d8498a6--200; path=/; max-age=5; HttpOnly; secure";
    Status = "200 OK";
    "Strict-Transport-Security" = "max-age=31536000, max-age=15768000;";
    "X-Content-Type-Options" = nosniff;
    "X-Frame-Options" = SAMEORIGIN;
    "X-Request-Id" = "232d505d-ba42-40d6-80bb-9abc425d5784";
    "X-Runtime" = "0.021908";
    "X-XSS-Protection" = "1; mode=block";
}
2018-06-07 12:59:00.291323+0400 classmate[81181:11490878] [QBCore] Response object: {
    "current_page" = 1;
    items =     (
                {
            user =             {
                "blob_id" = "<null>";
                "created_at" = "2018-05-24T15:56:29Z";
                "custom_data" = "<null>";
                email = "tyson@gmail.com";
                "external_user_id" = "<null>";
                "facebook_id" = "<null>";
                "full_name" = "Tyson mark";
                id = 50724776;
                "last_request_at" = "2018-06-07T08:52:53Z";
                login = Tyson764;
                phone = "<null>";
                "twitter_id" = "<null>";
                "updated_at" = "2018-06-07T08:52:52Z";
                "user_tags" = "<null>";
                website = "<null>";
            };
        },
                {
            user =             {
                "blob_id" = "<null>";
                "created_at" = "2018-05-24T16:00:02Z";
                "custom_data" = "<null>";
                email = "helina@gmail.com";
                "external_user_id" = "<null>";
                "facebook_id" = "<null>";
                "full_name" = "helina Benton";
                id = 50725108;
                "last_request_at" = "2018-06-07T08:53:11Z";
                login = helina765;
                phone = "<null>";
                "twitter_id" = "<null>";
                "updated_at" = "2018-06-07T08:52:24Z";
                "user_tags" = "<null>";
                website = "<null>";
            };
        },
                {
            user =             {
                "blob_id" = "<null>";
                "created_at" = "2018-05-30T10:20:01Z";
                "custom_data" = "<null>";
                email = "z@yahoo.in";
                "external_user_id" = "<null>";
                "facebook_id" = "<null>";
                "full_name" = "zahid shaikh";
                id = 51205131;
                "last_request_at" = "2018-06-07T08:34:21Z";
                login = zahid778;
                phone = "<null>";
                "twitter_id" = "<null>";
                "updated_at" = "2018-06-07T08:07:08Z";
                "user_tags" = "<null>";
                website = "<null>";
            };
        }
    );
    "per_page" = 3;
    "total_entries" = 3;
}
2018-06-07 12:59:00.292721+0400 classmate[81181:11490878] [QBCore] Response object: {
    "current_page" = 1;
    items =     (
                {
            user =             {
                "blob_id" = "<null>";
                "created_at" = "2018-05-24T15:56:29Z";
                "custom_data" = "<null>";
                email = "tyson@gmail.com";
                "external_user_id" = "<null>";
                "facebook_id" = "<null>";
                "full_name" = "Tyson mark";
                id = 50724776;
                "last_request_at" = "2018-06-07T08:52:53Z";
                login = Tyson764;
                phone = "<null>";
                "twitter_id" = "<null>";
                "updated_at" = "2018-06-07T08:52:52Z";
                "user_tags" = "<null>";
                website = "<null>";
            };
        },
                {
            user =             {
                "blob_id" = "<null>";
                "created_at" = "2018-05-24T16:00:02Z";
                "custom_data" = "<null>";
                email = "helina@gmail.com";
                "external_user_id" = "<null>";
                "facebook_id" = "<null>";
                "full_name" = "helina Benton";
                id = 50725108;
                "last_request_at" = "2018-06-07T08:53:11Z";
                login = helina765;
                phone = "<null>";
                "twitter_id" = "<null>";
                "updated_at" = "2018-06-07T08:52:24Z";
                "user_tags" = "<null>";
                website = "<null>";
            };
        },
                {
            user =             {
                "blob_id" = "<null>";
                "created_at" = "2018-05-30T10:20:01Z";
                "custom_data" = "<null>";
                email = "z@yahoo.in";
                "external_user_id" = "<null>";
                "facebook_id" = "<null>";
                "full_name" = "zahid shaikh";
                id = 51205131;
                "last_request_at" = "2018-06-07T08:34:21Z";
                login = zahid778;
                phone = "<null>";
                "twitter_id" = "<null>";
                "updated_at" = "2018-06-07T08:07:08Z";
                "user_tags" = "<null>";
                website = "<null>";
            };
        }
    );
    "per_page" = 3;
    "total_entries" = 3;
}
2018-06-07 12:59:00.296444+0400 classmate[81181:11486903] self.chatDialog.ID = 5b17ca7ca0eb477a3bedee77
2018-06-07 12:59:00.297453+0400 classmate[81181:11490878] [QBCore] Request URL:https://api.quickblox.com/chat/Message.json?chat_dialog_id=5b17ca7ca0eb477a3bedee77&limit=2000
2018-06-07 12:59:00.297623+0400 classmate[81181:11490878] [QBCore] Request method: GET
2018-06-07 12:59:00.297779+0400 classmate[81181:11490878] [QBCore] Request parameters:{
    "chat_dialog_id" = 5b17ca7ca0eb477a3bedee77;
    limit = 2000;
}
2018-06-07 12:59:00.297975+0400 classmate[81181:11490878] [QBCore] Request headers: {
    "Accept-Language" = "en;q=1";
    "QB-OS" = "iOS 11.3";
    "QB-SDK" = "iOS 2.7.3";
    "QB-Token" = a21c40bc21923f4ce0c3c8027126e7fd3800b0f5;
    "QuickBlox-REST-API-Version" = "0.1.1";
    "User-Agent" = "classmate/1.1 (iPhone; iOS 11.3; Scale/2.00)";
}
2018-06-07 12:59:00.337982+0400 classmate[81181:11490877] [QMUsersCache] Users to insert 3, update 0
2018-06-07 12:59:01.616394+0400 classmate[81181:11488981] [QBCore] Response headers: {
    "Access-Control-Allow-Origin" = "*";
    "Cache-Control" = "max-age=0, private, must-revalidate";
    Connection = "keep-alive";
    "Content-Length" = 1685;
    "Content-Type" = "application/json; charset=utf-8";
    Date = "Thu, 07 Jun 2018 08:59:01 GMT";
    Etag = "W/\"e5f0b1000f31a9212e9d1f58b86a198c\"";
    "QB-Token-ExpirationDate" = "2018-06-07 10:53:11 +0000";
    "QuickBlox-REST-API-Version" = "0.1.1";
    Server = "nginx/1.8.1";
    "Set-Cookie" = "_mkra_ctxt=840c3f95efc8bdb8374b088dd7475fac--200; path=/; max-age=5; HttpOnly; secure";
    Status = "200 OK";
    "Strict-Transport-Security" = "max-age=31536000, max-age=15768000;";
    "X-Content-Type-Options" = nosniff;
    "X-Frame-Options" = SAMEORIGIN;
    "X-Request-Id" = "c3bd47b1-ab95-485d-9a7c-fa8507ab519f";
    "X-Runtime" = "0.035369";
    "X-XSS-Protection" = "1; mode=block";
}
2018-06-07 12:59:01.619082+0400 classmate[81181:11488981] [QBCore] Response object: {
    items =     (
                {
            "_id" = 5b17ca9e2372f362a576c51d;
            attachments =             (
            );
            "chat_dialog_id" = 5b17ca7ca0eb477a3bedee77;
            "created_at" = "2018-06-06T11:50:55Z";
            "date_sent" = 1528285854;
            "delivered_ids" =             (
                50725108,
                50724776,
                51205131
            );
            message = uchc;
            read = 0;
            "read_ids" =             (
                50725108,
                50724776,
                51205131
            );
            "recipient_id" = "<null>";
            "sender_id" = 50725108;
            "updated_at" = "2018-06-06T11:51:20Z";
        },
                {
            "_id" = 5b17caa82372f362a576c51e;
            attachments =             (
            );
            "chat_dialog_id" = 5b17ca7ca0eb477a3bedee77;
            "created_at" = "2018-06-06T11:51:05Z";
            "date_sent" = 1528285864;
            "delivered_ids" =             (
                50725108,
                51205131,
                50724776
            );
            message = bu;
            read = 0;
            "read_ids" =             (
                50725108,
                51205131,
                50724776
            );
            "recipient_id" = "<null>";
            "sender_id" = 50725108;
            "updated_at" = "2018-06-06T11:51:27Z";
        },
                {
            "_id" = 5b17cac02372f362a576c51f;
            attachments =             (
            );
            "chat_dialog_id" = 5b17ca7ca0eb477a3bedee77;
            "created_at" = "2018-06-06T11:51:29Z";
            "date_sent" = 1528285888;
            "delivered_ids" =             (
                50725108,
                51205131
            );
            message = jb;
            read = 0;
            "read_ids" =             (
                50725108,
                51205131
            );
            "recipient_id" = "<null>";
            "sender_id" = 50725108;
            "updated_at" = "2018-06-06T11:52:17Z";
        },
                {
            "_id" = 5b17cb2e237299401b0fc6c4;
            attachments =             (
            );
            "chat_dialog_id" = 5b17ca7ca0eb477a3bedee77;
            "created_at" = "2018-06-06T11:53:19Z";
            "date_sent" = 1528285998;
            "delivered_ids" =             (
                50725108,
                51205131
            );
            message = hi;
            read = 0;
            "read_ids" =             (
                50725108,
                51205131
            );
            "recipient_id" = "<null>";
            "sender_id" = 50725108;
            "updated_at" = "2018-06-06T11:59:20Z";
        },
                {
            "_id" = 5b17cb38237299401b0fc6c5;
            attachments =             (
            );
            "chat_dialog_id" = 5b17ca7ca0eb477a3bedee77;
            "created_at" = "2018-06-06T11:53:28Z";
            "date_sent" = 1528286008;
            "delivered_ids" =             (
                50725108,
                51205131
            );
            message = hi;
            read = 0;
            "read_ids" =             (
                50725108,
                51205131
            );
            "recipient_id" = "<null>";
            "sender_id" = 50725108;
            "updated_at" = "2018-06-06T11:59:20Z";
        }
    );
    limit = 100;
    skip = 0;
}
2018-06-07 12:59:01.619305+0400 classmate[81181:11486903] messageSender NAme = helina Benton
2018-06-07 12:59:01.620080+0400 classmate[81181:11486903] messageSender NAme = helina Benton
2018-06-07 12:59:01.620125+0400 classmate[81181:11488981] [QBCore] Response object: {
    items =     (
                {
            "_id" = 5b17ca9e2372f362a576c51d;
            attachments =             (
            );
            "chat_dialog_id" = 5b17ca7ca0eb477a3bedee77;
            "created_at" = "2018-06-06T11:50:55Z";
            "date_sent" = 1528285854;
            "delivered_ids" =             (
                50725108,
                50724776,
                51205131
            );
            message = uchc;
            read = 0;
            "read_ids" =             (
                50725108,
                50724776,
                51205131
            );
            "recipient_id" = "<null>";
            "sender_id" = 50725108;
            "updated_at" = "2018-06-06T11:51:20Z";
        },
                {
            "_id" = 5b17caa82372f362a576c51e;
            attachments =             (
            );
            "chat_dialog_id" = 5b17ca7ca0eb477a3bedee77;
            "created_at" = "2018-06-06T11:51:05Z";
            "date_sent" = 1528285864;
            "delivered_ids" =             (
                50725108,
                51205131,
                50724776
            );
            message = bu;
            read = 0;
            "read_ids" =             (
                50725108,
                51205131,
                50724776
            );
            "recipient_id" = "<null>";
            "sender_id" = 50725108;
            "updated_at" = "2018-06-06T11:51:27Z";
        },
                {
            "_id" = 5b17cac02372f362a576c51f;
            attachments =             (
            );
            "chat_dialog_id" = 5b17ca7ca0eb477a3bedee77;
            "created_at" = "2018-06-06T11:51:29Z";
            "date_sent" = 1528285888;
            "delivered_ids" =             (
                50725108,
                51205131
            );
            message = jb;
            read2018-06-07 12:59:01.620348+0400 classmate[81181:11486903] messageSender NAme = helina Benton
 = 0;
            "read_ids" =             (
                50725108,
                51205131
            );
            "recipient_id" = "<null>";
            "sender_id" = 50725108;
            "updated_at" = "2018-06-06T11:52:17Z";
        },
                {
            "_id" = 5b17cb2e237299401b0fc6c4;
            attachments =             (
            );
            "chat_dialog_id" = 5b17ca7ca0eb477a3bedee77;
            "created_at" = "2018-06-06T11:53:19Z";
            "date_sent" = 1528285998;
            "delivered_ids" =             (
                50725108,
                51205131
            );
            message = hi;
            read = 0;
            "read_ids" =             (
                50725108,
                51205131
            );
            "recipient_id" = "<null>";
            "sender_id" = 50725108;
            "updated_at" = "2018-06-06T11:59:20Z";
        },
                {
            "_id" = 5b17cb38237299401b0fc6c5;
            attachments =             (
            );
            "chat_dialog_id" = 5b17ca7ca0eb477a3bedee77;
            "created_at" = "2018-06-06T11:53:28Z";
            "date_sent" = 1528286008;
            "delivered_ids" =             (
                50725108,
                51205131
            );
            message = hi;
            read = 0;
            "read_ids" =             (
                50725108,
                51205131
            );
            "recipient_id" = "<null>";
            "sender_id" = 50725108;
            "updated_at" = "2018-06-06T11:59:20Z";
        }
    );
    limit = 100;
    skip = 0;
}

While send message to

Error Error Domain=com.quickblox.chat Code=-1001 "(null)" UserInfo={NSLocalizedRecoverySuggestion=You are not joined to the dialog.}

Steps to reproduce the behavior Application ID: 45301

ghost commented 6 years ago

@hajakiyasudeen, Hello, you should perform join to the group dialog before sending the message.

    QBChatDialog *groupDialog;
    [groupDialog joinWithCompletionBlock:^(NSError * _Nullable error) {
    }];
    let groupDialog: QBChatDialog

    groupDialog.join(completionBlock: { (error) in
        // Handle error here
        if let error = error {
            print("Error:\(error)")
        }
    })
hajakiyasudeen commented 6 years ago

Yes It's working once I added joinWithCompletionBlock method, closed the issue Thank you,