« first day (2974 days earlier)      last day (1009 days later) » 

8:09 AM
hiii
@Shubhank bro
 
hi
 
9:02 AM
hiii
bro
have you worked with chat using socket @Shubhank
i need one help
.
it show me url only
when i come back then it shows proper image
???
 
9:21 AM
not really worked with socket
which api you using @DilipTiwari
 
pod 'Socket.IO-Client-Swift'
i am using this bro
SocketVc.sharedInstance.sendMessage(message: image, withNickname: dict)
sending images with this
method to socket
for normal text

SocketVc.sharedInstance.sendMessage(message: masg, withNickname: dict)
this is code
for dict
 
9:44 AM
@Shubhank
 
yes 2 minutes
 
k bro sure
 
9:58 AM
yes now tell
so you are sending media ?
or normal message
 
media as image
normal msg working fine
 
so the above screenshot
one image i can see
other one is url
what's the different in those 2 messages
 
basically when i try to send image after success it shows me url only
and when i came back to same screen it shows proper image
 
okay so while sending are you adding it to the data model manually?
 
yes
??
 
10:09 AM
can you share teh code how you are adding it manually to your data model of table/collection view
 
ok bro
this is tableview code
in view didLoad
SocketVc.sharedInstance.establishConnection()
serviceHit_Chat()
self.SetData()
func SetData()
{
SocketVc.sharedInstance.getChatMessage { (messageInfo) -> Void in
self.chatMessages.append(messageInfo)
self.tblVw_Container.reloadData()
let indexPath = NSIndexPath(item: self.chatMessages.endIndex - 1, section: 0)
self.tblVw_Container.scrollToRow(at: indexPath as IndexPath, at: UITableView.ScrollPosition.bottom, animated: true)
}
}
this is how i am sending text or image
 
      SocketVc.sharedInstance.sendMessage(message: image, withNickname: dict)
does this add the message to your tableview?
 
yes
its basically send msg to socket
 
okay
 
func SetData()
{
SocketVc.sharedInstance.getChatMessage { (messageInfo) -> Void in
self.chatMessages.append(messageInfo)
self.tblVw_Container.reloadData()
let indexPath = NSIndexPath(item: self.chatMessages.endIndex - 1, section: 0)
self.tblVw_Container.scrollToRow(at: indexPath as IndexPath, at: UITableView.ScrollPosition.bottom, animated: true)
}
}
this one append to array and show to tableview
 
10:20 AM
then log the message info for the message you send
and after you go back and come to the screen again
is there any difference in both the message
 
10:39 AM
ok let me check
bro
 

« first day (2974 days earlier)      last day (1009 days later) »