IOS very slow connecting speed [xmppStream setHostName:@“server.com”];

  • 1
  • Question
  • Updated 4 years ago
I am using Strophe.js to connect to Ejabberd chat server.

I am having problem with the connecting speed on IOS,it is very slow around 17 seconds for the socket to connect. I have read that it is because of the SRV lookup... and that if i set [xmppStream setHostName:@"server.com"]; then it will behave normally.

On Phonegap/Cordova, where would i set that??
Photo of clark ho

clark ho

  • 74 Posts
  • 0 Reply Likes

Posted 4 years ago

  • 1
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
@Clark,
as you may know there are a lot of beginners on this forum. You may want to try your question at the Google group for Phonegap/Cordoa. You may also want to try the new Adobe forum for Phonegap Build at:
https://forums.adobe.com/community/phonegap/build

Personally, I have no idea what you are talking about.

Best of Luck
Jesse
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
You can't set '[xmppStream setHostName:@"server.com"]' directly, because that would be done in the XMPP Framework itself. You are, of course, using a javascript implementation of the XMPP Framework, so you need to set Connection variables there.

Perhaps this is done with the optional 'route' parameter of the connect() method or even directly in the 'service' string (ws://...) of Strophe.Connection
Photo of clark ho

clark ho

  • 74 Posts
  • 0 Reply Likes
@Petra @Jesse

I had dugged to the core of the my problem, it seemed like it isnt to do with setting the xmppstream....but with the SASL auth. process.

The IOS devices are all very slow to do with base64 encodes....i am not sure what exactly i can do. It doesnt seem like there are other people that had experienced this.
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
Well, if that's where you expect the root problem to be, then you should decide where to go look for an answer. It doesn't appear to be a PGB problem, since your app is being built correctly.
I think you would be better off on some Strophe forum, at an iOS forum or at Stackoverflow.
Photo of clark ho

clark ho

  • 74 Posts
  • 0 Reply Likes
I spent a few hours digging in Strophe, my android has no problem, i am not sure if it is how IOS works, but it gave me the error below in Xcode. My whole IOS get locked up and have that error.

: BKSendHIDEvent: IOHIDEventSystemConnectionDispatchEvent error:0xE00002E8 -- Unknown event dropped whenever a touch event is triggered(touch, click drag etc)

That is when i sent a response back to the chat server when it is in the middle of a SCRAM-SHA-1 auth process.