Closed atulawasthimarch closed 7 years ago
@atulawasthimarch, Hello. At a glance: There is no need to join the private dialog. Could you please enable full logs and send us this information?
[QBSettings enableXMPPLogging];
-(void)toChatStart { [QBSettings enableXMPPLogging];
QBChatDialog *chatDialog = [[QBChatDialog alloc] initWithDialogID:nil type:QBChatDialogTypePrivate];
chatDialog.occupantIDs = @[@(24949904), @(24649688)];
//chatDialog.occupantIDs = @[@(recipientID), @(senderID)];
NSLog(@"toChatStart");
[QBRequest createDialog:chatDialog successBlock:^(QBResponse *response, QBChatDialog *createdDialog)
{
NSLog(@"toChatStart createDialog response=%@ ",response);
QBChatMessage *messagetosend = [QBChatMessage message];
// messagetosend.senderID = 24649688;
messagetosend.text = @"test tes1";
messagetosend.dateSent = [NSDate date];
// messagetosend.recipientID = chatDialog.recipientID;
messagetosend.markable = YES;
[createdDialog sendMessage:messagetosend completionBlock:^(NSError * _Nullable error) {
if (error == nil) {
NSLog(@"Message sent successfully");
}
else
{
NSLog(@"error in message sending %@",[error localizedDescription]);
}
}];
} errorBlock:^(QBResponse *response)
{
NSLog(@"error 2=%@", response);
}];
}
and still output is below
2017-03-10 00:55:41.182501 MyAppTest[5194:3528294] toChatStart
2017-03-10 00:55:41.184715 MyAppTest[5194:3528499] [QBCore] Request URL:https://api.quickblox.com/chat/Dialog.json
2017-03-10 00:55:41.184847 MyAppTest[5194:3528499] [QBCore] Request method: POST
2017-03-10 00:55:41.186354 MyAppTest[5194:3528499] [QBCore] Request parameters:{
"occupants_ids" = "24949904,24649688";
type = 3;
}
2017-03-10 00:55:41.186631 MyAppTest[5194:3528499] [QBCore] Request headers: {
"Accept-Language" = "en-IN;q=1";
"Content-Type" = "application/x-www-form-urlencoded";
"QB-OS" = "iOS 10.0";
"QB-SDK" = "iOS 2.9.2";
"QB-Token" = 935e5309b59a1ae82251bdfcbc5dcc604900d316;
"QuickBlox-REST-API-Version" = "0.1.1";
"User-Agent" = "MyAppTest/1.0 (iPhone; iOS 10.0; Scale/2.00)";
}
2017-03-10 00:55:42.875169 MyAppTest[5194:3528363] [QBCore] Response headers: {
"Access-Control-Allow-Origin" = "*";
"Cache-Control" = "max-age=0, private, must-revalidate";
Connection = "keep-alive";
"Content-Length" = 331;
"Content-Type" = "application/json; charset=utf-8";
Date = "Thu, 09 Mar 2017 19:25:41 GMT";
Etag = "\"872b876317cb11c96e9d7ef99b2e8dce\"";
"QB-Token-ExpirationDate" = "2017-03-09 21:25:28 UTC";
"QuickBlox-REST-API-Version" = "0.1.1";
Server = "openresty/1.9.15.1";
Status = "201 Created";
"Strict-Transport-Security" = "max-age=15768000;";
"X-Rack-Cache" = "invalidate, pass";
"X-Request-Id" = 8a2b98c378e4a3049aa4022476a8f7bf;
"X-Runtime" = "0.049776";
"X-UA-Compatible" = "IE=Edge,chrome=1";
}
2017-03-10 00:55:42.877563 MyAppTest[5194:3528294] toChatStart createDialog response=[QBResponse], status: 201
2017-03-10 00:55:42.877765 MyAppTest[5194:3528363] [QBCore] Response object: {
"_id" = 58c1a9e4a0eb47f9ad0000a3;
"created_at" = "2017-03-09T19:15:48Z";
"last_message" = "
Plz help me
yes done ,and sent log to you vy git
On Thu, Mar 9, 2017 at 4:16 PM, 404 notifications@github.com wrote:
@atulawasthimarch https://github.com/atulawasthimarch, Hello.
Could you please enable full logs and send us this information?
[QBSettings enableXMPPLogging];
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/QuickBlox/quickblox-ios-sdk/issues/765#issuecomment-285318420, or mute the thread https://github.com/notifications/unsubscribe-auth/AQyEuw7hkUp3UuiYVvUDddUlRkNlvaluks5rj9h4gaJpZM4MXqfQ .
-- Atul Awasthi Sr. iOS Developer
(BOOL)application:(UIApplication )application didFinishLaunchingWithOptions:(NSDictionary )launchOptions { // Override point for customization after application launch. [QBSettings setApplicationID:kApplicationID]; [QBSettings setAuthKey:kAuthKey]; [QBSettings setAuthSecret:kAuthSecret]; [QBSettings setAccountKey:kAccountKey];
[QBSettings enableXMPPLogging];
return YES; }
-(void)userLoginWithQuickBox { //[self toChatStart];
QBUUser *user = [QBUUser new];
user.login = @"at1@gmail.com";
user.password = @"12345678";
[QBRequest logInWithUserLogin:user.login password:user.password successBlock:^(QBResponse *response, QBUUser *user)
{
NSLog(@"logInWithUserLogin successful=%@", response);
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"successful"
message:[NSString stringWithFormat:@"Welcome %@ _%d",user.fullName,user.ID]
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alert show];
// [self toChatStart];
} errorBlock:^(QBResponse *response) {
NSLog(@"Errors=%@", [response.error description]);
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error"
message:[response.error description]
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alert show];
}];
}
-(void)toChatStart {
QBChatDialog *chatDialog = [[QBChatDialog alloc] initWithDialogID:nil type:QBChatDialogTypePrivate];
chatDialog.occupantIDs = @[@(24949904), @(24649688)];
//chatDialog.occupantIDs = @[@(recipientID), @(senderID)];
NSLog(@"toChatStart");
[QBRequest createDialog:chatDialog successBlock:^(QBResponse *response, QBChatDialog *createdDialog)
{
NSLog(@"toChatStart createDialog response=%@ ",response);
QBChatMessage *messagetosend = [QBChatMessage message];
// messagetosend.senderID = 24649688;
messagetosend.text = @"test tes1";
messagetosend.dateSent = [NSDate date];
// messagetosend.recipientID = chatDialog.recipientID;
messagetosend.markable = YES;
[createdDialog sendMessage:messagetosend completionBlock:^(NSError * _Nullable error) {
if (error == nil) {
NSLog(@"Message sent successfully");
}
else
{
NSLog(@"error in message sending %@",[error localizedDescription]);
}
}];
} errorBlock:^(QBResponse *response)
{
NSLog(@"error 2=%@", response);
}];
}
and the console log is
2017-03-10 10:48:43.597500 MyAppTest[5227:3595395] [QBCore] Access group: SYRUXU5K6J.com.webtechnology.TrueMe
2017-03-10 10:48:43.602226 MyAppTest[5227:3595183] You are logein current as Atul1
2017-03-10 10:48:43.773810 MyAppTest[5227:3595393] [QBCore] Request URL:https://api.quickblox.com/account_settings.json
2017-03-10 10:48:43.773985 MyAppTest[5227:3595393] [QBCore] Request method: GET
2017-03-10 10:48:43.774102 MyAppTest[5227:3595393] [QBCore] Request parameters:(null)
2017-03-10 10:48:43.774219 MyAppTest[5227:3595393] [QBCore] Request headers: {
"Accept-Language" = "en-IN;q=1";
"QB-Account-Key" = UGs86Gx9dPDXSUegT3iz;
"QB-OS" = "iOS 10.0";
"QB-SDK" = "iOS 2.9.2";
"QB-Token" = 935e5309b59a1ae82251bdfcbc5dcc604900d316;
"QuickBlox-REST-API-Version" = "0.1.1";
"User-Agent" = "MyAppTest/1.0 (iPhone; iOS 10.0; Scale/2.00)";
}
2017-03-10 10:48:51.173509 MyAppTest[5227:3595395] [QBCore] Response headers: {
"Access-Control-Allow-Origin" = "";
"Cache-Control" = "max-age=0, private, must-revalidate";
Connection = "keep-alive";
"Content-Length" = 175;
"Content-Type" = "application/json; charset=utf-8";
Date = "Fri, 10 Mar 2017 05:18:48 GMT";
Etag = "\"82645461140420e9821068f69c2bc0f3\"";
"QuickBlox-REST-API-Version" = "0.1.1";
Server = "openresty/1.9.15.1";
Status = "304 Not Modified";
"Strict-Transport-Security" = "max-age=15768000;";
"X-Rack-Cache" = miss;
"X-Request-Id" = c00662fb95375a4a748edad1c48afcf1;
"X-Runtime" = "0.008287";
"X-UA-Compatible" = "IE=Edge,chrome=1";
}
2017-03-10 10:48:51.175083 MyAppTest[5227:3595395] [QBCore] Response object: {
"account_id" = 68024;
"api_endpoint" = "https://api.quickblox.com";
"chat_endpoint" = "chat.quickblox.com";
"s3_bucket_name" = qbprod;
"turnserver_endpoint" = "turnserver.quickblox.com";
}
2017-03-10 10:48:51.180945 MyAppTest[5227:3595395] [Core] accountSettings:
apiEndpoint: https://api.quickblox.com
chatEndpoint: chat.quickblox.com,
turnServerEndpoint: turnserver.quickblox.com,
S3BucketName: qbprod,
lastCheckDate: 2017-03-10 05:18:51 +0000
2017-03-10 10:48:51.186185 MyAppTest[5227:3595415] [QBCore] Request URL:https://api.quickblox.com/session.json
2017-03-10 10:48:51.186361 MyAppTest[5227:3595415] [QBCore] Request method: POST
2017-03-10 10:48:51.186909 MyAppTest[5227:3595415] [QBCore] Request parameters:{
"application_id" = 54038;
"auth_key" = OsmDLZhFwc28vR9;
nonce = 62;
signature = b93a6eed816135361cfe0bc4a3bccd5d2dd2185b;
timestamp = 1489123131;
user = {
login = "at1@gmail.com";
password = 12345678;
};
}
2017-03-10 10:48:51.187048 MyAppTest[5227:3595415] [QBCore] Request headers: {
"Accept-Language" = "en-IN;q=1";
"Content-Type" = "application/x-www-form-urlencoded";
"QB-OS" = "iOS 10.0";
"QB-SDK" = "iOS 2.9.2";
"QB-Token" = 935e5309b59a1ae82251bdfcbc5dcc604900d316;
"QuickBlox-REST-API-Version" = "0.1.1";
"User-Agent" = "MyAppTest/1.0 (iPhone; iOS 10.0; Scale/2.00)";
}
2017-03-10 10:48:57.859003 MyAppTest[5227:3595183] toChatStart
2017-03-10 10:48:57.862161 MyAppTest[5227:3595415] [QBCore] Request URL:https://api.quickblox.com/session.json
2017-03-10 10:48:57.862304 MyAppTest[5227:3595415] [QBCore] Request method: POST
2017-03-10 10:48:57.862405 MyAppTest[5227:3595415] [QBCore] Request parameters:{
"application_id" = 54038;
"auth_key" = OsmDLZhFwc28vR9;
nonce = 271;
signature = 36f1bedcc786e380d941451757206965cbd2c558;
timestamp = 1489123137;
user = {
login = "at1@gmail.com";
password = 12345678;
};
}
2017-03-10 10:48:57.862516 MyAppTest[5227:3595415] [QBCore] Request headers: {
"Accept-Language" = "en-IN;q=1";
"Content-Type" = "application/x-www-form-urlencoded";
"QB-OS" = "iOS 10.0";
"QB-SDK" = "iOS 2.9.2";
"QB-Token" = 935e5309b59a1ae82251bdfcbc5dcc604900d316;
"QuickBlox-REST-API-Version" = "0.1.1";
"User-Agent" = "MyAppTest/1.0 (iPhone; iOS 10.0; Scale/2.00)";
}
2017-03-10 10:48:59.183225 MyAppTest[5227:3595463] [QBCore] Response headers: {
"Access-Control-Allow-Origin" = "";
"Cache-Control" = "max-age=0, private, must-revalidate";
Connection = "keep-alive";
"Content-Length" = 263;
"Content-Type" = "application/json; charset=utf-8";
Date = "Fri, 10 Mar 2017 05:18:58 GMT";
Etag = "\"c17720b5072d23032a424685622cb840\"";
"QB-Token-ExpirationDate" = "2017-03-10 07:18:58 UTC";
"QuickBlox-REST-API-Version" = "0.1.1";
Server = "openresty/1.9.15.1";
Status = "201 Created";
"Strict-Transport-Security" = "max-age=15768000;";
"X-Rack-Cache" = "invalidate, pass";
"X-Request-Id" = 06ffd8708bf43e6c15e3f23e3ccb5758;
"X-Runtime" = "0.022644";
"X-UA-Compatible" = "IE=Edge,chrome=1";
}
2017-03-10 10:48:59.212863 MyAppTest[5227:3595463] [QBCore] Response object: {
session = {
"_id" = 58c23742a28f9af61800002d;
"application_id" = 54038;
"created_at" = "2017-03-10T05:18:58Z";
"device_id" = 0;
id = 56162;
nonce = 62;
token = e6b84b264001ef1cdb30a719909204fb3b00d316;
ts = 1489123131;
"updated_at" = "2017-03-10T05:18:58Z";
"user_id" = 24649688;
};
}
2017-03-10 10:48:59.235945 MyAppTest[5227:3595463] [QBCore] Request URL:https://api.quickblox.com/subscriptions.json
2017-03-10 10:48:59.236111 MyAppTest[5227:3595463] [QBCore] Request method: POST
2017-03-10 10:48:59.236228 MyAppTest[5227:3595463] [QBCore] Request parameters:{
device = {
platform = ios;
udid = "43DE06F2-F815-4C84-80DA-78949EC21654";
};
"notification_channels" = apns;
"push_token" = {
"bundle_identifier" = "com.webtechnology.TrueMe";
"client_identification_sequence" = 809d0e04e97ce85c58bbe32a54d93cff35457c5db5ee253ff2bebef87b76de2a;
environment = development;
};
}
2017-03-10 10:48:59.236437 MyAppTest[5227:3595463] [QBCore] Request headers: {
"Accept-Language" = "en-IN;q=1";
"Content-Type" = "application/x-www-form-urlencoded";
"QB-OS" = "iOS 10.0";
"QB-SDK" = "iOS 2.9.2";
"QB-Token" = e6b84b264001ef1cdb30a719909204fb3b00d316;
"QuickBlox-REST-API-Version" = "0.1.1";
"User-Agent" = "MyAppTest/1.0 (iPhone; iOS 10.0; Scale/2.00)";
}
2017-03-10 10:49:02.130109 MyAppTest[5227:3595416] [QBCore] Response headers: {
"Access-Control-Allow-Origin" = "";
"Cache-Control" = "max-age=0, private, must-revalidate";
Connection = "keep-alive";
"Content-Length" = 2;
"Content-Type" = "application/json; charset=utf-8";
Date = "Fri, 10 Mar 2017 05:18:59 GMT";
Etag = "\"d751713988987e9331980363e24189ce\"";
"QB-Token-ExpirationDate" = "2017-03-10 07:18:58 UTC";
"QuickBlox-REST-API-Version" = "0.1.1";
Server = "openresty/1.9.15.1";
Status = "201 Created";
"Strict-Transport-Security" = "max-age=15768000;";
"X-Rack-Cache" = "invalidate, pass";
"X-Request-Id" = 277caccfd25f3e7599dd6e1b69908b16;
"X-Runtime" = "0.034264";
"X-UA-Compatible" = "IE=Edge,chrome=1";
}
2017-03-10 10:49:02.130840 MyAppTest[5227:3595431] [QBCore] Response object: (
)
2017-03-10 10:49:02.130876 MyAppTest[5227:3595183] Successfull response! didRegisterForRemoteNotificationsWithDeviceToken
2017-03-10 10:49:05.201072 MyAppTest[5227:3595395] [QBCore] Response headers: {
"Access-Control-Allow-Origin" = "";
"Cache-Control" = "max-age=0, private, must-revalidate";
Connection = "keep-alive";
"Content-Length" = 264;
"Content-Type" = "application/json; charset=utf-8";
Date = "Fri, 10 Mar 2017 05:19:02 GMT";
Etag = "\"64d6ef2e9dfac5796297d2c638de8f43\"";
"QB-Token-ExpirationDate" = "2017-03-10 07:19:02 UTC";
"QuickBlox-REST-API-Version" = "0.1.1";
Server = "openresty/1.9.15.1";
Status = "201 Created";
"Strict-Transport-Security" = "max-age=15768000;";
"X-Rack-Cache" = "invalidate, pass";
"X-Request-Id" = 12c312af9c61199b7f6cafabfa039090;
"X-Runtime" = "0.021234";
"X-UA-Compatible" = "IE=Edge,chrome=1";
}
2017-03-10 10:49:05.222045 MyAppTest[5227:3595395] [QBCore] Response object: {
session = {
"_id" = 58c23746a28f9ac30a000089;
"application_id" = 54038;
"created_at" = "2017-03-10T05:19:02Z";
"device_id" = 0;
id = 52506;
nonce = 271;
token = c2bbb4746d093fd443c327d85c82773e2c00d316;
ts = 1489123137;
"updated_at" = "2017-03-10T05:19:02Z";
"user_id" = 24649688;
};
}
2017-03-10 10:49:05.244353 MyAppTest[5227:3595395] [QBCore] Request URL:https://api.quickblox.com/chat/Dialog.json
2017-03-10 10:49:05.244525 MyAppTest[5227:3595395] [QBCore] Request method: POST
2017-03-10 10:49:05.244647 MyAppTest[5227:3595395] [QBCore] Request parameters:{
"occupants_ids" = "24949904,24649688";
type = 3;
}
2017-03-10 10:49:05.244766 MyAppTest[5227:3595395] [QBCore] Request headers: {
"Accept-Language" = "en-IN;q=1";
"Content-Type" = "application/x-www-form-urlencoded";
"QB-OS" = "iOS 10.0";
"QB-SDK" = "iOS 2.9.2";
"QB-Token" = c2bbb4746d093fd443c327d85c82773e2c00d316;
"QuickBlox-REST-API-Version" = "0.1.1";
"User-Agent" = "MyAppTest/1.0 (iPhone; iOS 10.0; Scale/2.00)";
}
2017-03-10 10:49:13.564568 MyAppTest[5227:3595395] [QBCore] Response headers: {
"Access-Control-Allow-Origin" = "*";
"Cache-Control" = "max-age=0, private, must-revalidate";
Connection = "keep-alive";
"Content-Length" = 331;
"Content-Type" = "application/json; charset=utf-8";
Date = "Fri, 10 Mar 2017 05:19:13 GMT";
Etag = "\"872b876317cb11c96e9d7ef99b2e8dce\"";
"QB-Token-ExpirationDate" = "2017-03-10 07:19:02 UTC";
"QuickBlox-REST-API-Version" = "0.1.1";
Server = "openresty/1.9.15.1";
Status = "201 Created";
"Strict-Transport-Security" = "max-age=15768000;";
"X-Rack-Cache" = "invalidate, pass";
"X-Request-Id" = dddef9a47caeb4cd2067382bba6ba413;
"X-Runtime" = "0.014563";
"X-UA-Compatible" = "IE=Edge,chrome=1";
}
2017-03-10 10:49:13.566248 MyAppTest[5227:3595183] toChatStart createDialog response=[QBResponse], status: 201
2017-03-10 10:49:13.567222 MyAppTest[5227:3595395] [QBCore] Response object: {
"_id" = 58c1a9e4a0eb47f9ad0000a3;
"created_at" = "2017-03-09T19:15:48Z";
"last_message" = "
@atulawasthimarch, Have you connected to the QBChat? In order to send messages via chat, you should be connected to it. From your logs, I didn't find the connection to the chat.
[[QBChat instance] connectWithUser:user completion:^(NSError * _Nullable error) {
}];
Take a look at our documentation.
2017-03-09 10:53:27.815366 MyAppTest[5134:3498288] toChatStart 2017-03-09 10:53:27.818248 MyAppTest[5134:3498349] [QBCore] Request URL:https://api.quickblox.com/chat/Dialog.json 2017-03-09 10:53:27.818385 MyAppTest[5134:3498349] [QBCore] Request method: POST 2017-03-09 10:53:27.818484 MyAppTest[5134:3498349] [QBCore] Request parameters:{ "occupants_ids" = 24649826; type = 3; } 2017-03-09 10:53:27.818585 MyAppTest[5134:3498349] [QBCore] Request headers: { "Accept-Language" = "en-IN;q=1"; "Content-Type" = "application/x-www-form-urlencoded"; "QB-OS" = "iOS 10.0"; "QB-SDK" = "iOS 2.9.2"; "QB-Token" = c53281ace7c4e65c9be05508de61a0d13c00d316; "QuickBlox-REST-API-Version" = "0.1.1"; "User-Agent" = "MyAppTest/1.0 (iPhone; iOS 10.0; Scale/2.00)"; } 2017-03-09 10:53:37.651168 MyAppTest[5134:3498350] [QBCore] Response headers: { "Access-Control-Allow-Origin" = "*"; "Cache-Control" = "max-age=0, private, must-revalidate"; Connection = "keep-alive"; "Content-Length" = 326; "Content-Type" = "application/json; charset=utf-8"; Date = "Thu, 09 Mar 2017 05:23:37 GMT"; Etag = "\"ce0564ee71e1a4934011c67db458d596\""; "QB-Token-ExpirationDate" = "2017-03-09 07:22:02 UTC"; "QuickBlox-REST-API-Version" = "0.1.1"; Server = "openresty/1.9.15.1"; Status = "201 Created"; "Strict-Transport-Security" = "max-age=15768000;"; "X-Rack-Cache" = "invalidate, pass"; "X-Request-Id" = 67fca6a96c568707a9458dd6e49ca9ef; "X-Runtime" = "0.094243"; "X-UA-Compatible" = "IE=Edge,chrome=1"; } 2017-03-09 10:53:37.654086 MyAppTest[5134:3498350] [QBCore] Response object: { "_id" = 58c0e6d9a0eb476c430000a3; "created_at" = "2017-03-09T05:23:37Z"; "last_message" = "";
"last_message_date_sent" = "";
"last_message_user_id" = "";
name = Atul2;
"occupants_ids" = (
24649688,
24649826
);
photo = "";
type = 3;
"unread_messages_count" = "";
"updated_at" = "2017-03-09T05:23:37Z";
"user_id" = 24649688;
"xmpp_room_jid" = "";
}
2017-03-09 10:53:37.654167 MyAppTest[5134:3498288] toChatStart createDialog response=[QBResponse], status: 201
2017-03-09 10:53:37.667603 MyAppTest[5134:3498288] error in message sending The operation couldn’t be completed. (com.quickblox.chat error -1002.)