0

Problem : This is a probably a very basic question, but how do I see the XML that is created when I am using the XMPPFramework in XCode.

Extra Detail : I'm looking into using TurnSocket to send and recieve files. My logs are saying

TURN Connection failed!

However, when I look at other questions here on stackoverflow with similar issues, people have various chunks of xml telling them more about the issue. e.g

XMPP Sending/Receving file in iphone sdk ...?

and

Don't work file transfer (xep 0234, 0065)

Update 12th April 2012 : In response to the reply by Prasanna Venkatesh, here is a screenshot of didRecieveIQ. I am still unsure how to see the XML.

enter image description here

Community
  • 1
  • 1
Andy A
  • 4,191
  • 7
  • 38
  • 56
  • Hi Andy, did you get file transfer working using xmpp? – Sunil Zalavadiya Feb 20 '13 at 12:10
  • Sadly no. Although I haven't worked on the project for nearly a year. I'm hoping that by the time I go back to it there is a nice neat iOS library to use!! But I fear there still isn't?? – Andy A Feb 20 '13 at 12:17
  • Ok. thanks can you provide me sample code of the above last working thing? Also please tell me from where and how to get resource? – Sunil Zalavadiya Feb 20 '13 at 12:21
  • This is an old project I haven't worked on for nearly a year (and with little success). All I can recommend at the moment is the guide I was working with http://mobile.tutsplus.com/tutorials/iphone/building-a-jabber-client-for-ios-server-setup/ – Andy A Feb 20 '13 at 12:28
  • Yes that thing i have did, but i want to transfer file using xmpp chat and i don't have any sample code releted that, so can you tell me how it will be done? – Sunil Zalavadiya Feb 20 '13 at 12:32
  • I dont have time to go back to that project right now and recap what I did, but I didn't actually get it working anyway. Feel free to read over the various questions I have posted on here though and you may be able to piece something together, but as I didn't get it working, I recommend searching on the net some more or raising your own Stack Overflow question. – Andy A Feb 20 '13 at 12:40
  • Ok thanks, and my last question is that can you tell me from where and how i can get resource which you have already answered in following link:- http://stackoverflow.com/questions/10123663/turn-connection-using-the-ios-xmppframework-and-an-openfire-server/10245562#10245562 ? – Sunil Zalavadiya Feb 20 '13 at 12:43
  • I cant remember exactly as it was a while ago I worked on this. I have a feeling I either retrieved it from one of the stanzas, or got it from an XMPPJID object. If you are unsure, maybe raise the question here on Stack Overflow. – Andy A Feb 20 '13 at 14:41

1 Answers1

1

In your xmppstream delegates, IQ will show your xml logs in xcode.

-(BOOL)xmppStream:(XMPPStream *)sender didReceiveIQ:(XMPPIQ *)iq 

-(void)xmppStream:(XMPPStream *)sender didSendIQ:(XMPPIQ *)iq
Splendid
  • 1,061
  • 6
  • 16
  • Hi Prasanna. Thanks for your response. I'm back on this project now after a a few days off. I have attached a screenshot to my question of didReceiveIQ. However, I still see no XML. This is something that is confusing me in XCode, the contents of iq isn't clear to me. Thanks. – Andy A Apr 12 '12 at 10:01
  • Yes, A confusing topic it is. When i was starting i find this after two days i spent with XMPP. Still i'm unsuccessfull of turning on socket connection with my openfire server. Have you nslog these IQ? dont you see anything on your console? Also IQ shud return YES – Splendid Apr 12 '12 at 11:26
  • I've now managed to find the XML. Each variable has a 'Print Description' variable which prints it to the logs. So my original question is solved :) However, I'll start a brand new question now to specifically try and work out why I cant get Turn Connection to work. Like you I'm using OpenFire, so you may be interested in it :). I'll post the link for that question here once I've started it. :) – Andy A Apr 12 '12 at 11:37
  • Definitely, struggling with this from past two weeks, want to close this research, always getting TurnSocket connection failed. Its failed after few minutes of the XML logs. – Splendid Apr 12 '12 at 11:43
  • Hi Prasanna. Here is my new question : http://stackoverflow.com/questions/10123663/turn-connection-using-the-ios-xmppframework-and-an-openfire-server – Andy A Apr 12 '12 at 12:34
  • Hi Andy. Fine. But why do you using return NO in didReceiveIQ?. If you never return YES, you don't get your IQs. – Splendid Apr 12 '12 at 13:02
  • Quite simply, I don't have a full understanding yet of the XMPPFramework. 99% of my code is based on this tutorial - http://mobile.tutsplus.com/tutorials/iphone/building-a-jabber-client-for-ios-server-setup/ - and that tutorial returns NO. What difference does it make if I return YES? Also, I haven't found much documentation about this, maybe I have missed some essential reading? – Andy A Apr 12 '12 at 13:12
  • Even me don't have entire flow of the XMPP, i only found those IQ return YES from the SO and google groups discussion forums. Frankly i just assumed myself that should return only yes. Further discussion chat with me on skype or any communicator. – Splendid Apr 12 '12 at 14:15
  • Let me know when you success with TURN Socket. :) – Splendid Apr 12 '12 at 18:52
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/10050/discussion-between-prasanna-venkatesh-and-andy-a) – Splendid Apr 13 '12 at 13:07