Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

implementing a ios chat (like whatsapp): websocket?

I am trying to implement a chat service in ios. My question is: how services (like whatsApp) work?

I found a tutorial (here) about how use websockets. Is it right direction? In that case the chat only alive when the app is running.

Anyone have experinces on this ?

like image 421
doxsi Avatar asked Jan 29 '26 03:01

doxsi


1 Answers

Tutorial looks really nice, would say good direction. If you want to implement socket in background too you need to look at background modes.

http://www.raywenderlich.com/29948/backgrounding-for-ios

In short if you open socket, you mark it as VOIP one, which will keep it opened even when in background.

like image 119
Krzysztof Avatar answered Jan 31 '26 20:01

Krzysztof



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!