XMPP Framework: Not able to receive my messages

I am working on xmpp framework. I have done most of initial things. I created stream, Connected it and get authenticate. Now I am sending buddy request to another user from my app. App shows presence is sent. When I get roster it shows a entry there. But on other system I am not getting any precence or anything. I tried to send a message message is also not received by other client.

Than I used one id in ichat and send friend request to that id. Wow I am able to see friend request on ichat. I accept request from ichat :( No notification on my app.

If I send message to ichat. Message shown in iChat. but when I send message to my app from ichat.. My app is not getting any delegate called or nothing.

I don't know why this is happening.

I am using a non ARC xmpp framework.

Please guys Please help me. I am badly stucked in it :(

Thanks in Advance.


Have you consider to send presence after get authenticate? If you are authenticate but not sending preence than server will consider you offline and all messages sent to you will be stored on server with delay.

Send your presence and see the magic. :)


I am not an iPhone developer so i can not explain programming.

In XMPP, Presence subscription has two handshakes. Like When first user send request to second user , it will ask for presence subscription to second user. When second user accept , then first user is subscribed for second user's presence. So he can get all the presence of second user. It's called "to" subscription type for first user. Now second user ask for presence subscription to first user and first accepts request then this "to" subscription type changed to "both" subscription type. Now both user can get presence of each other. otherwise only first user can get presence of second user.

And for messages, there must be a some prob with listener.

链接地址: http://www.djcxy.com/p/93518.html

上一篇: 发送XMPP消息元素多个目的地(Facebook Chat API)

下一篇: XMPP框架:无法接收我的消息