IPhone building chat app

I want to create a chat type application on iphone. I know how I would start implementing a polling model where the iphone will poll the server to see if any messages have appeared and if they can receive them and show them to the user. However, I am more interested in the push model, where the server pushes new messages to the iphone and displays it to the user. The part im tricky to figure out is how to open some kind of persistent connection on the phone that will listen to incoming messages ... Any suggestions or comments would be appreciated.

thank

Daniel

+2


source to share


1 answer


The iPhone 3 SDK has built-in push support. Basically, all messages that need to be clicked (from all apps) are sent to the Apple server, which maintains a persistent connection with the iphone user. The bottom line is that you don't need to worry about it, and your app can get updates even if it doesn't work (like on the home screen). The downside is that your data has to go through the Apple server.



0


source







All Articles