Closed Imanmf closed 4 years ago
I don't see stream.hostName specified. Only stream.hostPort.
I don't see stream.hostName specified. Only stream.hostPort.
Thank you for answer. I set both but it's the same error.
stream.hostName = "chat.gahvare.net"
stream.hostPort = 5222
stream.myJID = XMPPJID(string: "emad@chat.gahvare.net")
My swift version is 5 and my target is ios 10
Finally, I fixed my issue. I add dd DDLog.add(DDTTYLogger.sharedInstance) to my codes and i get more information. I used web functions to connect and this has a problem. func xmppStreamDidConnect(sender: XMPPStream!) { ... } it was in the document. so I write this function again. but it was changed in swift 4. so new code was like this: func xmppStreamDidConnect(_ sender: XMPPStream) { ... } so, second function (ew function) has not "!" symbol after XMPPStream. So Swift thought of the second function as a new one. not override for did connect function. so when I was connected to the server, server was waiting for me and my function didn't anything and i had an error with idle connection message
hello, everybody, I am using XMPPFramework and i can't connect to the server. I have this error : stream:error xmlns:stream="http://etherx.jabber.org/streams" connection-timeout xmlns="urn:ietf:params:xml:ns:xmpp-streams" text xmlns="urn:ietf:params:xml:ns:xmpp-streams" lang="en">Idle connection
this is my code :
import UIKit import XMPPFramework
class ViewController: UIViewController, XMPPStreamDelegate {
}
I have problem with the first step. connecting to server