smallseo.info

XMPPFramework

An XMPP Framework in Objective-C for Mac and iOS

Storing messages using XMPPFramework for ios?

I'm not sure how to use the XMPPFramework's core data to store incoming messages. Does anyone have any tutorials on how to do this? I see User objects, which in turn can have many "resources". Is each message received supposed to be a new resource that I create and persist?

I do not know what part is my responsibility and what part the framework provides regarding message history. I can intercept every incoming message. Then am I supposed to create and store each message inside a Messages table using core data? I'd have a Message Entity. And each XMPPUser would have an array of Message objects. But then wouldn't I be rolling my own solution, which would be working against the framework?

Thanks!


Source: (StackOverflow)

Better Way to implement the chat application using XMPP on Android?

Hi i want to implement the Chat application in android using XMPP (To avoid the GCM notifications because GCM uses request response process).

i have done the 70 perc functionality using Smack library and OpenFire server. but after completion of these i came to know about the QuickBlox SDK. I don't know completely about that but few people are saying that it is good api by seeing the features..

can any one tell me that is it correct way of implementing the chat application using smack for xmpp . or we have any other good api which uses xmpp for android .


Source: (StackOverflow)

Build a chat application in ios using XMPP [closed]

I am trying to build a chat application in ios. I came across XMPP for ios. I am bit confused on how to move forward. Here are my doubts:

  1. Do I need to create an XMPP server to implement this application?
  2. Or are there any existing servers/services which can be used for the same purpose?

Source: (StackOverflow)

Undefined symbols for architecture armv7 when adding CocoaAsyncSocket

I am trying to use XMPPFramework with an iOS5 project (ARC) under xcode 4.2.1 but I am facing this problem. Once I add CocoaAsyncSocket to my project as part of preparing my project to use XMPPFramework as in 1I get the following error.

I have seen some other people having the "Undefined symbols for architecture armv7" but I did not find yet an answer to this particular issue I have at the moment.

I have linked to the CFNetwork and marked the GCDAsyncSocket.m as non-ARC (-fno-objc-arc) but i still get the error. Any help is appreciated.

Undefined symbols for architecture armv7:
  "_SSLGetBufferedReadSize", referenced from:
      ___33-[GCDAsyncSocket flushSSLBuffers]_block_invoke_0 in GCDAsyncSocket.o
      -[GCDAsyncSocket doReadData] in GCDAsyncSocket.o
  "_SSLSetIOFuncs", referenced from:
      -[GCDAsyncSocket ssl_startTLS] in GCDAsyncSocket.o
  "_SSLRead", referenced from:
      -[GCDAsyncSocket flushSSLBuffers] in GCDAsyncSocket.o
      -[GCDAsyncSocket doReadData] in GCDAsyncSocket.o
  "_SSLWrite", referenced from:
      -[GCDAsyncSocket doWriteData] in GCDAsyncSocket.o
  "_SSLClose", referenced from:
      -[GCDAsyncSocket closeWithError:] in GCDAsyncSocket.o
  "_SSLCreateContext", referenced from:
      -[GCDAsyncSocket ssl_startTLS] in GCDAsyncSocket.o
  "_SSLSetEnabledCiphers", referenced from:
      -[GCDAsyncSocket ssl_startTLS] in GCDAsyncSocket.o
  "_SSLSetCertificate", referenced from:
      -[GCDAsyncSocket ssl_startTLS] in GCDAsyncSocket.o
  "_SSLSetConnection", referenced from:
      -[GCDAsyncSocket ssl_startTLS] in GCDAsyncSocket.o
  "_SSLHandshake", referenced from:
      -[GCDAsyncSocket ssl_continueSSLHandshake] in GCDAsyncSocket.o
  "_SSLSetProtocolVersionMax", referenced from:
      -[GCDAsyncSocket ssl_startTLS] in GCDAsyncSocket.o
  "_SSLSetPeerDomainName", referenced from:
      -[GCDAsyncSocket ssl_startTLS] in GCDAsyncSocket.o
  "_SSLSetProtocolVersionMin", referenced from:
      -[GCDAsyncSocket ssl_startTLS] in GCDAsyncSocket.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Source: (StackOverflow)

XMPPFramework - Retrieve Archived Messages From Openfire Server

I am developing a chat app for iPhone using XMPP and openfire server,OpenFire server is storing all the chat history between users but When I try to retrieve the chat history for a particular user I get only the date and the number of chat messages but not the actual text messages

I have already installed open archive plugin for message archiving on openfire

This is the stanza which I have passed to Openfire Server

    <iq type='get' id='pk1'>
    <list xmlns='urn:xmpp:archive'
    with='piyush@openfire'>
    <set xmlns='http://jabber.org/protocol/rsm'>
    <max>30</max>
    </set>
    </list>
    </iq>

This is the result which I received from server

  <iq type="result" id="pk1" to="vivek@openfire/iphone">
  <list xmlns="urn:xmpp:archive">
  <chat with="piyush@openfire" start="2012-07-04T13:16:12.291Z"/>
  <chat with="piyush@openfire" start="2012-07-05T08:25:31.555Z"/>
  <chat with="piyush@openfire" start="2012-07-05T12:38:24.098Z"/>
  <set xmlns="http://jabber.org/protocol/rsm">
  <first index="0">15</first>
  <last>25</last>
  <count>3</count>
  </set>
  </list>
  </iq>

This is the result which I want and which I expected

 <iq type='result' to='vivek@openfire/iphone' id='page1'>
 <chat xmlns='urn:xmpp:archive'
    with='piyush@openfire'
    start='2012-07-04T13:16:12.291Z'
    subject='She speaks!'
    version='4'>
<from secs='0'><body>Art thou not Romeo, and a Montague?</body></from>
<to secs='11'><body>Neither, fair saint, if either thee dislike.</body></to>
.
[98 more messages]
.
<from secs='9'><body>How cam'st thou hither, tell me, and wherefore?</body></from>
<set xmlns='http://jabber.org/protocol/rsm'>
  <first index='0'>0</first>
  <last>99</last>
  <count>217</count>
</set>

Please Help me out to get the desired result

Thanks


Source: (StackOverflow)

Display avatar during chatting through XMPP [closed]

I was able to display avatar through XMPP in the imageview.

But when I deleted the application and relaunched it since then I'm not getting the imagedata through method

 - (NSData *)photoDataForJID:(XMPPJID *)jid

Source: (StackOverflow)

FileTransfer using XmppFrameWork in ios

i have implemented some code of file transfer by using this tutorial :

Please Click Here.

and the code which i am using :

- (void)sendToOtherDevice:(NSData *)fileData receiverJid:(NSString *)receiverJid
{
    XMPPJID *jid = [XMPPJID jidWithString:receiverJid];

     XMPPSIFileTransfer *sifiletransfer = [[XMPPSIFileTransfer alloc] init];
    [sifiletransfer initiateFileTransferTo:jid withData:fileData];

    NSString *s = [NSString stringWithFormat:@"%@/spark",receiverJid];
    NSString *jabbarID = [[[[self appDelegate] xmppStream] myJID] bare];
     XMPPJID *senderjid = [XMPPJID jidWithString:jabbarID];

    //[TURNSocket setProxyCandidates:[NSArray arrayWithObjects:s, nil]];
   // [TURNSocket setProxyCandidates:[NSArray arrayWithObjects:s,jabbarID, nil]];

    [TURNSocket setProxyCandidates:[NSArray arrayWithObjects:jid.domain,senderjid.domain, nil]];

   // [TURNSocket setProxyCandidates:[NSArray arrayWithObjects:jid.domain, nil]];
    //[TURNSocket setProxyCandidates:[NSArray arrayWithObjects:@"111.11.111.111", nil]];

     TURNSocket *socket1 = [[TURNSocket alloc] initWithStream:[self xmppStream] toJID:jid];

   // [turnSockets addObject:turnSocket];
    [socket1 startWithDelegate:self delegateQueue:dispatch_get_main_queue()];

}


-(void)turnSocket:(TURNSocket *)sender didSucceed:(GCDAsyncSocket *)socket
{
     [socket writeData:photoData withTimeout:60.0f tag:0];
     [socket disconnectAfterWriting];
}

- (void)turnSocketDidFail:(TURNSocket *)sender
{

    NSLog(@"Couldn't set up bytestream for file transfer!");
}

then on running this code i would get the following XMLStangas :

recieving Logs at android end :

12-03 10:26:59.359: D/SMACK(2021): 10:26:59 AM RCV  (1095046240): <iq type="set" id="47198142-86E8-41E2-9F68-40C52AFD5469" to="kadhirkarbonn@ip-10-123-60-876/smack" from="kadhirsduos@ip-10-123-60-876/smack"><si xmlns="http://jabber.org/protocol/si" id="A0E740DE-CDF1-408E-ABE1-8F582A615F1E" mime-type="image/jpg" profile="http://jabber.org/protocol/si/profile/file-transfer"><file xmlns="http://jabber.org/protocol/si/profile/file-transfer" name="4_9.jpg" size="75261"/><feature xmlns="http://jabber.org/protocol/feature-neg"><x xmlns="jabber:x:data" type="form"><field var="stream-method" type="list-single"><option><value>http://jabber.org/protocol/bytestreams</value></option></field></x></feature></si></iq>
12-03 10:26:59.399: I/Insert(2021): insert data with file name ===========4_9.jpg

12-03 10:27:01.749: I/Kadhir(2021): 4_9.jpg downloading started
12-03 10:27:01.779: D/SMACK(2021): 10:27:01 AM SENT (1095046240): <iq id="47198142-86E8-41E2-9F68-40C52AFD5469" to="kadhirsduos@ip-10-123-60-876/smack" from="kadhirkarbonn@ip-10-123-60-876/smack" type="result"><si xmlns="http://jabber.org/protocol/si"><feature xmlns="http://jabber.org/protocol/feature-neg"><x xmlns="jabber:x:data" type="submit"><field var="stream-method"><value>http://jabber.org/protocol/bytestreams</value></field></x></feature></si></iq>

12-03 10:27:02.039: D/SMACK(2021): 10:27:02 AM RCV  (1095046240): <iq type="get" id="ECF5E292-013C-45E5-8053-E2EA86219622" to="kadhirkarbonn@ip-10-123-60-876/smack" from="kadhirsduos@ip-10-123-60-876/smack"><query xmlns="http://jabber.org/protocol/disco#info"/></iq>
12-03 10:27:02.049: D/SMACK(2021): 10:27:02 AM SENT (1095046240): <iq id="ECF5E292-013C-45E5-8053-E2EA86219622" to="kadhirsduos@ip-10-123-60-876/smack" type="result"><query xmlns="http://jabber.org/protocol/disco#info"><identity category="client" name="quytech" type="phone"/><feature var="http://jabber.org/protocol/caps"/><feature var="http://jabber.org/protocol/disco#info"/><feature var="jabber:iq:privacy"/><feature var="http://jabber.org/protocol/si"/><feature var="http://jabber.org/protocol/bytestreams"/><feature var="http://jabber.org/protocol/ibb"/><feature var="http://jabber.org/protocol/si/profile/file-transfer"/><feature var="http://jabber.org/protocol/si"/><feature var="http://jabber.org/protocol/bytestreams"/><feature var="http://jabber.org/protocol/ibb"/><feature var="http://jabber.org/protocol/si/profile/file-transfer"/><feature var="http://jabber.org/protocol/si"/><feature var="http://jabber.org/protocol/bytestreams"/><feature var="http://jabber.org/protocol/ibb"/></query></iq>

12-03 10:27:02.739: D/SMACK(2021): 10:27:02 AM RCV  (1095046240): <iq type="set" to="kadhirkarbonn@ip-10-123-60-876/smack" id="E5132784-1493-458B-98B0-8E3902A541C0" from="kadhirsduos@ip-10-123-60-876/smack"><query xmlns="http://jabber.org/protocol/bytestreams" sid="A0E740DE-CDF1-408E-ABE1-8F582A615F1E" mode="tcp"><streamhost jid="kadhirsduos@ip-10-123-60-876/smack" host="127.0.0.1" port="7777"/><streamhost jid="proxy.ip-10-123-60-876" host="10.123.60.876" port="7777"/></query></iq>


12-03 10:30:02.759: D/SMACK(2021): 10:30:02 AM RCV  (1095046240): <iq type="get" id="863-206317" from="ip-10-123-60-876" to="kadhirkarbonn@ip-10-123-60-876/smack"><ping xmlns="urn:xmpp:ping"/></iq>
12-03 10:30:02.779: D/SMACK(2021): 10:30:02 AM SENT (1095046240): <iq id="863-206317" to="ip-10-123-60-876" from="kadhirkarbonn@ip-10-123-60-876/smack" type="error"><error code="501" type="CANCEL"><feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>


12-03 10:30:12.259: D/SMACK(2021): 10:30:12 AM SENT (1095046240): <iq id="E5132784-1493-458B-98B0-8E3902A541C0" to="kadhirsduos@ip-10-123-60-876/smack" from="kadhirkarbonn@ip-10-123-60-876/smack" type="error"><error code="406" type="MODIFY"><not-acceptable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/><text xml:lang="en" xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">Could not establish socket with any provided host</text></error></iq>

Sending Logs at IOS ends :

2013-12-03 10:21:41:731 iPhoneXMPP[525:3523] SEND: <message type="chat" to="kadhirkarbonn@ip-10-123-60-876"><body>enter message here..</body></message>
2013-12-03 10:21:53.987 iPhoneXMPP[525:a0b] Sender ID is ==== kadhirsduos@ip-10-123-60-876/smack
2013-12-03 10:21:53:990 iPhoneXMPP[525:3523] SEND: <iq type="set" id="47198142-86E8-41E2-9F68-40C52AFD5469" to="kadhirkarbonn@ip-10-123-60-876/smack" from="kadhirsduos@ip-10-123-60-876/smack"><si xmlns="http://jabber.org/protocol/si" id="A0E740DE-CDF1-408E-ABE1-8F582A615F1E" mime-type="image/jpg" profile="http://jabber.org/protocol/si/profile/file-transfer"><file xmlns="http://jabber.org/protocol/si/profile/file-transfer" name="4_9.jpg" size="75261"/><feature xmlns="http://jabber.org/protocol/feature-neg"><x xmlns="jabber:x:data" type="form"><field var="stream-method" type="list-single"><option><value>http://jabber.org/protocol/bytestreams</value></option></field></x></feature></si></iq>
2013-12-03 10:21:56:721 iPhoneXMPP[525:5407] RECV: <iq xmlns="jabber:client" id="47198142-86E8-41E2-9F68-40C52AFD5469" to="kadhirsduos@ip-10-123-60-876/smack" from="kadhirkarbonn@ip-10-123-60-876/smack" type="result"><si xmlns="http://jabber.org/protocol/si"><feature xmlns="http://jabber.org/protocol/feature-neg"><x xmlns="jabber:x:data" type="submit"><field var="stream-method"><value>http://jabber.org/protocol/bytestreams</value></field></x></feature></si></iq>
2013-12-03 10:21:56:721 iPhoneXMPP[525:a0b] iPhoneXMPPAppDelegate: xmppStream:didReceiveIQ:
2013-12-03 10:21:56.721 iPhoneXMPP[525:5407] didRecieveIQ*****************
2013-12-03 10:21:56.722 iPhoneXMPP[525:5407] IQ type === result
2013-12-03 10:21:56.723 iPhoneXMPP[525:5407] IQ type === si
2013-12-03 10:21:56.723 iPhoneXMPP[525:5407] IQ type === result/si
2013-12-03 10:21:56:724 iPhoneXMPP[525:5217] SEND: <iq type="get" id="ECF5E292-013C-45E5-8053-E2EA86219622" to="kadhirkarbonn@ip-10-123-60-876/smack" from="kadhirsduos@ip-10-123-60-876/smack"><query xmlns="http://jabber.org/protocol/disco#info"/></iq>
2013-12-03 10:21:56:725 iPhoneXMPP[525:5217] SEND: <iq type="get" to="ip-10-123-60-876" id="41BB64C7-4216-4E7E-BC0F-CAEB7D093D45"><query xmlns="http://jabber.org/protocol/disco#items"/></iq>
2013-12-03 10:21:56:965 iPhoneXMPP[525:5407] RECV: <iq xmlns="jabber:client" type="result" id="41BB64C7-4216-4E7E-BC0F-CAEB7D093D45" from="ip-10-123-60-876" to="kadhirsduos@ip-10-123-60-876/smack"><query xmlns="http://jabber.org/protocol/disco#items"><item jid="search.ip-10-123-60-876" name="User Search"/><item jid="conference.ip-10-123-60-876" name="Public Chatrooms"/><item jid="proxy.ip-10-123-60-876" name="Socks 5 Bytestreams Proxy"/><item jid="pubsub.ip-10-123-60-876" name="Publish-Subscribe service"/></query></iq>
2013-12-03 10:21:56:966 iPhoneXMPP[525:a0b] iPhoneXMPPAppDelegate: xmppStream:didReceiveIQ:
2013-12-03 10:21:56.966 iPhoneXMPP[525:5217] didRecieveIQ*****************
2013-12-03 10:21:56:967 iPhoneXMPP[525:3523] SEND: <iq type="get" to="proxy.ip-10-123-60-876" id="567B54C6-FE53-4A80-9DC6-13AA3E3C5445"><query xmlns="http://jabber.org/protocol/disco#info"/></iq>
2013-12-03 10:21:56.967 iPhoneXMPP[525:5217] IQ type === result
2013-12-03 10:21:57:087 iPhoneXMPP[525:5217] RECV: <iq xmlns="jabber:client" id="ECF5E292-013C-45E5-8053-E2EA86219622" to="kadhirsduos@ip-10-123-60-876/smack" type="result" from="kadhirkarbonn@ip-10-123-60-876/smack"><query xmlns="http://jabber.org/protocol/disco#info"><identity category="client" name="quytech" type="phone"/><feature var="http://jabber.org/protocol/caps"/><feature var="http://jabber.org/protocol/disco#info"/><feature var="jabber:iq:privacy"/><feature var="http://jabber.org/protocol/si"/><feature var="http://jabber.org/protocol/bytestreams"/><feature var="http://jabber.org/protocol/ibb"/><feature var="http://jabber.org/protocol/si/profile/file-transfer"/><feature var="http://jabber.org/protocol/si"/><feature var="http://jabber.org/protocol/bytestreams"/><feature var="http://jabber.org/protocol/ibb"/><feature var="http://jabber.org/protocol/si/profile/file-transfer"/><feature var="http://jabber.org/protocol/si"/><feature var="http://jabber.org/protocol/bytestreams"/><feature var="http://jabber.org/protocol/ibb"/></query></iq>
2013-12-03 10:21:57:088 iPhoneXMPP[525:a0b] iPhoneXMPPAppDelegate: xmppStream:didReceiveIQ:
2013-12-03 10:21:57.089 iPhoneXMPP[525:3523] didRecieveIQ*****************
2013-12-03 10:21:57.090 iPhoneXMPP[525:3523] IQ type === result
2013-12-03 10:21:57:205 iPhoneXMPP[525:3523] RECV: <iq xmlns="jabber:client" type="result" id="567B54C6-FE53-4A80-9DC6-13AA3E3C5445" from="proxy.ip-10-123-60-876" to="kadhirsduos@ip-10-123-60-876/smack"><query xmlns="http://jabber.org/protocol/disco#info"><identity category="proxy" name="SOCKS5 Bytestreams Service" type="bytestreams"/><feature var="http://jabber.org/protocol/bytestreams"/><feature var="http://jabber.org/protocol/disco#info"/></query></iq>
2013-12-03 10:21:57:205 iPhoneXMPP[525:a0b] iPhoneXMPPAppDelegate: xmppStream:didReceiveIQ:
2013-12-03 10:21:57:206 iPhoneXMPP[525:5217] SEND: <iq type="get" to="proxy.ip-10-123-60-876" id="F9F121E4-918C-4437-8B4A-E5568E123F57"><query xmlns="http://jabber.org/protocol/bytestreams"/></iq>
2013-12-03 10:21:57.206 iPhoneXMPP[525:5407] didRecieveIQ*****************
2013-12-03 10:21:57.208 iPhoneXMPP[525:5407] IQ type === result
2013-12-03 10:21:57:325 iPhoneXMPP[525:5407] RECV: <iq xmlns="jabber:client" type="result" id="F9F121E4-918C-4437-8B4A-E5568E123F57" from="proxy.ip-10-123-60-876" to="kadhirsduos@ip-10-123-60-876/smack"><query xmlns="http://jabber.org/protocol/bytestreams"><streamhost jid="proxy.ip-10-123-60-876" host="10.123.60.876" port="7777"/></query></iq>
2013-12-03 10:21:57:326 iPhoneXMPP[525:a0b] iPhoneXMPPAppDelegate: xmppStream:didReceiveIQ:
2013-12-03 10:21:57:327 iPhoneXMPP[525:5407] SEND: <iq type="set" to="kadhirkarbonn@ip-10-123-60-876/smack" id="E5132784-1493-458B-98B0-8E3902A541C0" from="kadhirsduos@ip-10-123-60-876/smack"><query xmlns="http://jabber.org/protocol/bytestreams" sid="A0E740DE-CDF1-408E-ABE1-8F582A615F1E" mode="tcp"><streamhost jid="kadhirsduos@ip-10-123-60-876/smack" host="127.0.0.1" port="7777"/><streamhost jid="proxy.ip-10-123-60-876" host="10.123.60.876" port="7777"/></query></iq>
2013-12-03 10:21:57.326 iPhoneXMPP[525:3523] didRecieveIQ*****************
2013-12-03 10:21:57.329 iPhoneXMPP[525:3523] IQ type === result
2013-12-03 10:23:16.726 iPhoneXMPP[525:a0b] SOCKS5 Connection failed!
2013-12-03 10:25:07:188 iPhoneXMPP[525:3523] RECV: <iq xmlns="jabber:client" id="E5132784-1493-458B-98B0-8E3902A541C0" to="kadhirsduos@ip-10-123-60-876/smack" from="kadhirkarbonn@ip-10-123-60-876/smack" type="error"><error code="406" type="MODIFY"><not-acceptable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/><text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" lang="en">Could not establish socket with any provided host</text></error></iq>
2013-12-03 10:25:07:189 iPhoneXMPP[525:a0b] iPhoneXMPPAppDelegate: xmppStream:didReceiveIQ:
2013-12-03 10:25:07.189 iPhoneXMPP[525:3523] didRecieveIQ*****************

in this i have never get called turnSocket : didSuccedd method. Can anyone tell me about what i am missing . Please help.


Source: (StackOverflow)

XMPPFramework - Implement Group Chat (MUC)

I am working on the iOS chat client. Can anyone please help me with the Multi-User Chat?

I have implemented Robbiehanson's XMPPFramework.

Can anyone please let me know how to get list of group and create a group in server with this framework?

Thanks in advance.


Source: (StackOverflow)

XMPPFramework - How to create a MUC room and invite users?

I am using Robbiehanson's iOS XMPPFramework. I am trying to create a MUC room and invite a user to the group chat room but it is not working.

I am using the following code:

XMPPRoom *room = [[XMPPRoom alloc] initWithRoomName:@"user101@conference.jabber.org/room" nickName:@"room"];
[room createOrJoinRoom];
[room sendInstantRoomConfig];
[room setInvitedUser:@"ABC@jabber.org"];
[room activate:[self xmppStream]];    
[room inviteUser:jid1 withMessage:@"hello please join."];
[room sendMessage:@"HELLO"];

The user ABC@jabber.org should receive the invite message but nothing is happening.

Any help will be appreciated. :)


Source: (StackOverflow)

XMPPFrameWork didNotAuthenticate in Facebook

I had been using a AppId, which is created in Facebook a few months ago for my iOS chat application. Now I have to use the newly created AppId for release.

If I am using the old AppId then the XMPP will get authenticated and able to chat with friends. While using the new AppId, XMPP is not getting authenticated. I tried many account logIns using both of this ids.
If any body has a solution, then please help me

<failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized/></failure>

Note:
I am using the latest XMPP Framework, which is updated a few hours ago (https://github.com/robbiehanson/XMPPFramework).


Source: (StackOverflow)

Up to date instructions on how to install XMPPFramework manually?

I'm having a really tough time getting XMPPFramework to work. I've followed every direction written on the net, and XCode is not finding any of my XMPPFramework classes.

Expected specifier-qualifier-list before 'XMPPStream' XMPP.h: No such file or directory XMPPRoster.h: No such file or directory

I have XMPPFramework copied into my project's root directory. Why can't these files be seen? Is there something that I need to do under Header Search Paths or Library Search Paths?

I've set those entries to $(inherited) and $(SRCROOT) and XCode 4.2 auto-fills in my project's root directory and still doesn't find my files.

I'm quite sure that I'm not the only one having this issue, and it is a showstopper. Any ideas?


Source: (StackOverflow)

Options for real-time web notifications and updates using Comet/XMPP vs WebSocket technologies on a Microsoft stack?

I am scoping out the architectural options for a project that will render live updates (like Facebook) of user activities - logins, photos, etc. Two main UI components of this are an auto-updating scrolling area where new notifications will be listed (photos, etc.), and a toolbar that will update with things like updated message counts, etc.

The contenders for this are Jabber/Comet/XMPP-based and WebSocket technologies.

Comet camp:

WebSockets camp:

Since this the existing infrastructure is a Microsoft stack, I would rather not introduce Java-based servers into the mix. Saying this, it leaves (a very attractive) WebSync (Comet), and SuperWebSocket (WebSockets). However the Pokein's DLL integration is fairly seamless into a .Net project as well.

Are there any more real production level WebSocket initiatives for .Net? Is it too early to adopt WebSockets on a Microsoft stack, and should I go in favor of something like Kazing?

I am still waiting for a report on our current user base's browser types and versions (checking for HTML5 compatibility). I am suspecting that this number will be low (older user base). If that is the case, the Comet option would be the winner.

What are some other things to consider?

Looking at some of the .Net initiatives like Sockets.IO and others, I'm thinking this may be too much in its infancy yet, to apply to a large scale production system.

Can I get some comments from anyone that has used any of the technologies and products listed above?

Thanks.

UPDATE

I am still hunting for some good WebSocket servers that are reliable on a production level. I added XSockets and SignalR to the Websockets camp after recently finding them. Hoewver, there are still two main contenders at this time. That could be just because of the fact that they have amazingly great marketing teams, good material available for developers - API's, and videos. A lot of other implementations seem to still be in new-born phases, where examples are given of connectivity with only a few clients. While this demonstrates the technology, these demos are not backed up with significant payload/load capacity data. Kaazing and LightStreamer do meet the requirements below.

XSockets has some nice examples, but again, missing some real production metrics.

It doesn't seem that SignalR has yet been tested in a true production environment. A scale-out solution is in development but doesn't appear stable yet. Looking forward to seeing how this project does in the future.

Primary requirements are:

  1. Ability to implement fallback technology (if HTML5/WebSockets are not available)
  2. High number of concurrent connections and number of messages per second
  3. Scalable - ability to add additional servers/nodes for larger traffic requirements

Source: (StackOverflow)

XMPP iOS Framework detect internet disconnection issue with OpenFire server

I have implemented chatting application using XMPP iOS Framework with OpenFire server.

Fortunately, application is running successfully but I am facing one issue of internet disconnection in application.

When user is getting logout or went in offline mode manually then it sends stanza to his/her rosters. So his/her rosters knows that user went in offline mode.

Now when internet will disconnect from user's device at that time application is not able to send presence stanza to server due to internet disconnection. So his/her rosters won't get information about that offline user and user will be shown in online mode only.

I thought something like OpenFire server might be able to check connected users and whenever any user gets disconnected it should send presence stanza with offline status to his rosters so they can know that this user is on offline mode.

Can anybody please help me if there is any way through which I can implement this feature.

It will be very helpful for me to solve this issue.

Thanks in advance.


Source: (StackOverflow)

How to send message using XMPP Framework

I am creating a chat application using XMPP Framework in iphone. i could get received messages but i am not able to send a message. can any one give me solution for this??


Source: (StackOverflow)

How to list only online users on facebook with xmpp framework

I have integrated xmpp in my app and able to list all the users in a table view, but I only want to display the online users and then want to implement the feature to send and recieve messages to my online friends...

Please suggest me some helpful code...

Here is my code, executed after facebook login.

    - (void)fbDidLogin
{
    NSLog(@"logged in.....................");
    [appDelegate.facebook requestWithGraphPath:@"me" andDelegate:self]; 

    DDLogVerbose(@"%s accessToken: %@ expirationDate: %@",__PRETTY_FUNCTION__,appDelegate.facebook.accessToken,appDelegate.facebook.expirationDate);
    self.accessToken = appDelegate.facebook.accessToken;

    if (xmppStreamFB) {  
        [xmppStreamFB release];  
        xmppStreamFB = nil;  
    }
    xmppStreamFB = [[XMPPStreamFacebook alloc] init];
    xmpReconnect = [[XMPPReconnect alloc] initWithStream:xmppStreamFB];  

    if (xmppRosterStorage) {  
        [xmppRosterStorage release];  
        xmppRosterStorage = nil;  
    }
    xmppRosterStorage = [[XMPPRosterCoreDataStorage alloc] init];

    if (xmppRoster) {  
        [xmppRoster release];  
        xmppRoster = nil;  
    } 
    xmppRoster = [[XMPPRoster alloc] initWithStream:xmppStreamFB rosterStorage:xmppRosterStorage];

    [xmppStreamFB addDelegate:self];
    [xmppRoster addDelegate:self];
    [xmppRoster setAutoRoster:YES];

    xmppStreamFB.myJID = [XMPPJID jidWithString:[NSString stringWithFormat:@"%@@chat.facebook.com", uid]];

    // You may need to alter these settings depending on the server you're connecting to
    allowSelfSignedCertificates = NO;
    allowSSLHostNameMismatch = YES;

    // Uncomment me when the proper information has been entered above.
    NSError *error = nil;
    if (![xmppStreamFB connect:&error]) 
        NSLog(@"Error connecting: %@", error);

    if(!tableView)
    {
        tableView = [[UITableView alloc]initWithFrame:CGRectMake(0,0, 480, 320) style:UITableViewStylePlain];
    }
    [tableView setFrame:CGRectMake(0,0, 480, 320)];
    [tableView setTag:2];
    [tableView setDelegate:self];
    [tableView setDataSource:self];
    [tableView setHidden:NO];
    [tableView setBackgroundColor:[UIColor clearColor]];
    [tableView setSeparatorStyle:UITableViewCellSeparatorStyleSingleLine];
    [tableView setAlpha:1.0];

    [self.view addSubview:tableView];

    [self.tableView reloadData];
    [self showTopBar];

}

I don't know the actual flow of the xmpp framework for showing users online and to implement chat feature...

i have the following delegate methods as well..

    - (void)xmppStreamDidSecure:(XMPPStreamFacebook *)sender
{
    NSLog(@"---------- xmppStreamDidSecure: ----------");
}

- (void)xmppStreamDidConnect:(XMPPStreamFacebook *)sender
{
    NSLog(@"---------- xmppStreamDidConnect: ----------");

    isOpen = YES;

    NSError *error = nil;

    if (![self.xmppStreamFB authenticateWithAppId:_APP_ID accessToken:self.accessToken error:&error])
    {
        NSLog(@"Error authenticating: %@", error);
    }
    else {
        NSLog(@"NO Error authenticating:");
        /*
        ChatViewController *cvc = [[ChatViewController alloc] init];
        [self.view addSubview:cvc.view];*/
    }

}
- (void)xmppStreamDidAuthenticate:(XMPPStream *)sender
{
    NSLog(@"---------- xmppStreamDidAuthenticate: ----------");

    [self goOnline];
}

- (void)xmppStream:(XMPPStream *)sender didNotAuthenticate:(NSXMLElement *)error
{
    NSLog(@"---------- xmppStream:didNotAuthenticate: ----------");
}

- (BOOL)xmppStream:(XMPPStream *)sender didReceiveIQ:(XMPPIQ *)iq
{
    NSLog(@"---------- xmppStream:didReceiveIQ: ----------");
    /*
    ChatViewController *cvc = [[ChatViewController alloc] init];
    [self.view addSubview:cvc.view];*/

    return NO;
}

- (void)xmppStream:(XMPPStream *)sender didReceiveMessage:(XMPPMessage *)message
{
    NSLog(@"---------- xmppStream:didReceiveMessage: ----------");
}

- (void)xmppStream:(XMPPStream *)sender didReceivePresence:(XMPPPresence *)presence
{
    NSLog(@"---------- xmppStream:didReceivePresence: ----------");

}

- (void)xmppStream:(XMPPStream *)sender didReceiveError:(id)error
{
    NSLog(@"---------- xmppStream:didReceiveError: ----------");
}

- (void)xmppStreamDidDisconnect:(XMPPStream *)sender
{
    NSLog(@"---------- xmppStreamDidDisconnect: ----------");

    if (!isOpen)
    {
        NSLog(@"Unable to connect to server. Check xmppStream.hostName");
    }
}

And the two methods for online and offline user presence, but don't know how to modify them for my task:

    - (void)goOnline
{
    NSXMLElement *presence = [NSXMLElement elementWithName:@"presence"];

    [[self xmppStream] sendElement:presence];
}

- (void)goOffline
{
    NSXMLElement *presence = [NSXMLElement elementWithName:@"presence"];
    [presence addAttributeWithName:@"type" stringValue:@"unavailable"];

    [[self xmppStream] sendElement:presence];
}

Source: (StackOverflow)