We have developed a chat application in both iOS and Android native platform , and all working fine with Port 5222- Plain Text communication. As part of securing the communication between client and server we have disabled Port 5222 and enabled Port 5223 in Client Server port settings. But its getting failed from the client side while connecting. Below is our library for iOS and Android
From what you write, it appears that you don’t have a full understanding of the encryption mechanisms that are available in XMPP and Openfire.
The default communication port, 5222, does allow for plain-text communication, but generally is used for encryption that is based on StartTLS. You can configure Openfire to require this. On port 5223, an encryption technique called Direct TLS is used. This is similar to using HTTPS instead of HTTP.
Port 5222 does not need to be less secure than port 5223. My advise would be to read up on TLS, and particularly on StartTLS, and how that differs from ‘regular’ TLS, and make your decisions based on that knowledge.