Posted by: Tharindu | January 18, 2009

My first iPhone App-Xmpp chat client

I have developed my first real iPhone application to get a kick on iPhone development. I was completely new to Objective-C and it was really difficult to initially pick up the things. But with in a week, I found it its really easier to program using X-code. First day I could not successfully write my own code and run. I have read almost all Apple recomended guides for  iPhone application development and also the videos, But the book that I used to get a start was iPhone Developers’ Cook book.

Once I read that I found it easier to understand iPhone OS programming guide. Because it is lacking some full code implementations for a complete new developer for Objective-C. I have initially coded few small application to get familiar with IB, X-Code and UIKit framwork specially. I am working at hSenid Mobile Solutions as an undergraduate trainee. After initial studies I was asked to implement an iPhone XMPP chat client. Once I went through XMPP protocol, I found there already exists xmpp framework for Objective-C in Google Code, but it was a Mac App. I have used ejabberd server as the XMPP server and my supervisor asked me to configure and install it. I used it as the model for my application and changed it to be run with iPhone OS. After that I have implemented required controller and view to finish my application. Here as some screen shots of my App running with iPhone Simulator.

xmpp Application in Settings contacts view delete button appeared on swipe new contact add screen


  1. Hi Tharindu,

    I am new to iPhone and XCode, and really interested in making applications for iPhone.
    I am developing a XMPP client using OpenFire as XMPP Server. While searching for the approach and some samples for developing XMPP client i found this post helpful.

    As you have successfully developed this client on iPhone i need some guidance, how to approach and what API’s to be used for this client.

    It will be helpful if u can provide me some sample code of this client.

    Thanks in Advance


    • Sainath Rapaka:
      Hi, It would be useful to start with Apple resources, but ‘iPhone Developer Cook Book’ is a good ebook to refer. and you can use ‘xmppframework’ google code as your back end with several modifications to it. Please refer wiki pages for more information. The framework is implemented for Mac OS X and can be used for iPhone. it would really help your course.


  2. Hi,

    I’m very interested in the way you’ve changed XCode config to setup an iPhone version of XMPPFramework

    Let me know …


    • Fred:
      Please use the wiki page on xmppframework google code page. It contains all the information on how to use xmppframework for iPhone. But you will have to try several times make it running. And also iPhone OS 3.0, some deprecated methods are removed from OS 2.2, there fore you have to modify some code. Please use xmppframework google group to clarify your questions. Happy learning 🙂


  3. Cool app. I am using iphonexmpp framework. Is there any way to join jabber chat room? And how to get list of all users logged in that chat room?


  4. A Nice Work.


  5. Hi there,

    I am curious about how long the whole thing took you (including time to learn). Also, how’s the performance of XMPP on the iphone? Does it hog the battery?


    • Hi,
      It took around 2 months to create a very basic xmpp chat client – login, register, add/show contacts, show online status, chat with contacts, with the help of xmppframework. And it doesn’t seem to affect the battery a lot. and I am using this xmpp client work as part of my fourth year project, so i feel performance is acceptable. And you might already know that GTalk also uses xmpp as the protocol, so it will be like a GTalk client.


  6. HI. There is no information about ujsing xmppframework in “Iphone developer cookbook” . Is here any other books which you advise to use for this purpose?


    • about using xmppframework you might look into following google group. it’s very useful. also see previous posts there. your issues must have already solved here.

      xmppframework Google Group

      Also check out there wiki pages


  7. Hello Tharindu,

    Are you still developing the iOS apps?
    If so, I’d like to share a link to – that’s one of my favorite APIs that can be used when developing a chat for your app.
    Hope that helps!


    • Looks to be a good server side solution for chat. But if anyone looking for a free solution I would suggest Ejabberd or Openfire projects for a xmpp server.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


%d bloggers like this: