Reputation: 41
HI i'm new to using socket I/O.
I would like to use the socket send and receive functions in multiple screens like a chat app. I'm not understanding how to handle it. can anyone help me.
I'm using the socket from https://github.com/socketio/socket.io-client-swift
I'm using objective-c coding
Upvotes: 1
Views: 4562
Reputation: 416
My dear friend,
Links below are links I've read when I developed iOS Chat Client using Socket.io recently,
If you're a project based learner, you can see full working iOS Chat Client Using Socket.io sample here: https://github.com/bonnguyen/socket.io_chat_swift
Just try to build and run it. It helps me a lot, but unfortunately it's written in Swift. Hope you can translate it to Obj-C by yourself.
Bonus:
for your information, for chat view, you can use this library: https://github.com/jessesquires/JSQMessagesViewController
or if you like to create your own code for chat view, you can read this tutorial: http://www.innofied.com/creating-old-style-message-bubble-swift/
Upvotes: 2