iphone - How to implement dynamic chat application in Ios using php, Something related to Skype like application -


i trying implement chat application in ios. in general use 2 php files 1 posting message(sender) retrieving message(receiver).

i want accomplish following: consider a(sender) , b (receiver).

a sent message b. , a waiting b's reply. need call post-api.php sending message , @ receivers side(b) need retrieve using getapi.php when b reply a must automatically appear in inbox(live chatbox) of a, without calling getapi.php. know scenario not possible. there solution or method chat application works skype or facebookchat.

there multiple way implement chat functionality.

  1. polling: send request server , process response server in timely fashion after particular time interval using nstimer(but remember cause battery drain).

  2. using apns: using official apple push notification implementation, whenever there new entry in chat table on server side send notification particular device using push notification , handle notification using delegate methods (although not 100% reliable).using push notification

  3. using socket programming: using socket programming can have dedicated connection between client(device) , server. have provided link having source @ end of tutorial.using socket programming


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -