Develop a web-based_client on desktop, android and iPhone

I need write a client engine by using xmpp and apply it on desktop, android and iPhone. I’m quite new to xmpp. could anyone give me some suggestion. Can I use smack as the library?
extension (638 Bytes)
iq (641 Bytes)

Hey there,

for android you can use smack as the library. On iPhone you will need to find a library that is wrtten in **obj-c **with **XMPP **protocol implementation.

**smack **is wrtten in java and android’s development enviroment is in java.

Hope it helps

1 Like

Thanks so much, John!

I’m still confused with this problem. Do you think I can use a certain library which will be able to be used for cross-platform(desktop, android and ios)? Will it possible? Acorrding to what I have searched so far, I haven’t found a particular api that is suitable for the cross-platform.

I don’t think any such library exists. I think XMPPFramework is the lib of choice for iOS, and it will work on your Mac as well, but there don’t seem to be any versions for other OS’s. Which is not entirely surprising since objectionable C is not overly popular on any non Apple platform .

Smack will cover almost any platform that can run a JVM, so in your use cases, all but iOS.

NOTE: some tweeks required for JVM variations like Android.


Thank you, rcollier!

So, does it mean I have to write an individual client side for IOS?

Do you think I can write a client engine that can call differnet platform by using C or C++ ?

I am facing the same problem here…

yes, you have to write an iOS client using XMPPFramework.

I don’t think you can use C or C++ to call different platform.

The reason for that is because different machine has different **instruction sets. **A program written in obj-c for **iphone **is not understandable by Android because the compiled machine code is so different that it doesnot know what is going on.

I think you are looking something like **PhoneGap **which allows you to use HTML, CSS and JavaScript to write a program, it then translates into iPhone, Android and other mobile devices nartive codes.

However, using PhoneGap there is no XMPP protocol code ready for that, so it is still not feasible.

Long story short,

iPhone = XMPPFramework + obj-c + cocoa touch

Android = Smack || Asmack + java + xml


  1. c + libstrophe + any GUI lib
  2. c++ + txmpp + any GUI lib
  3. java + smack + spark

Thank you for your help!

I hope I can learn more skills related to XMPP from you. You are a professional.