just letting you know that I have inherited this project so that you know that I don't have precise knowledge of how this all was implemented.
Project: XMPP/Jabber chat client on iOS with PHP server backing
I am testing the app on two physical iPhone devices.
It appears the app is sending the messages that it should be sending across the XMPP stream, but the app is definitely not receiving those messages.
Every time an app should receive a message, it instead re-negociates the XMPP handshake that it does at the start of the application's run.
Looking into this, I found that either the stream was disconnecting or something similar. Here are two log messages I implemented. They contain the method name that is running and the contents of the NSError associated with that method
2014-02-06 18:28:50.140 AppName[9841:473b] --Socket Closed With Error--
Domain: (null)
UserInfo: (null)
2014-02-06 18:28:50.147 AppName[9841:60b] --xmppStreamDidDisconnect--
Domain: libxmlErrorDomain
UserInfo: {
NSLocalizedDescription = "Couldn't find end of Start Tag body\n";
}
Hypothesis 1: Most obviously, I look to the error domain and description. No luck yet finding the "couldn't find the end of Start Tag body", however
Hypothesis 2: I read on some forum that XMPP streams can disconnect if multiple devices are attempting to log into the same server with the same credentials. I fear THIS might be what is going on here, but how do I find out if these are the same credentials. The two devices are using two different usernames/userids and I believed this would be sufficient for XMPP.
They ARE using the same IP, but that would be natural for XMPP, no?
ex. of JIDs used:
[email protected]
[email protected]