简体   繁体   English

iOS swift 3.0中的XMPP解决方案

[英]solution for XMPP in iOS swift 3.0

I would like to add the chatting feature in my app by connect to my openfire server. 我想通过连接到我的openfire服务器在我的应用程序中添加聊天功能。 I have gotten the openfire account and password for each user. 我已经获得了每个用户的openfire帐户和密码。 I am looking for a direction, including frameworks or libs, to implement this. 我正在寻找一个方向,包括框架或库,来实现这一点。

First, I found XMPP Framework for ios , which is a well-done framework for XMPP, but built in ObjectiveC and probably hasn't supported swift 3. So I'm not sure whether there is any other better choice. 首先,我找到了适用于XMP的XMPP框架 ,这是一个完善的XMPP框架,但是内置在ObjectiveC中,可能还没有支持swift 3.所以我不确定是否还有其他更好的选择。 This is the main problem for me. 这是我的主要问题。

Second, if I find a way to connect with openfire server (in step one), I could send and receive message via openfire server. 其次,如果我找到了一种与openfire服务器连接的方法(在第一步中),我可以通过openfire服务器发送和接收消息。 I can use some chat frameworks, such as Chatto , to implement a chat feature by inputing data resource. 我可以使用一些聊天框架,例如Chatto ,通过输入数据资源来实现聊天功能。

Would you give me suggestion about chatting feature in swift 3? 你能给我一些关于swift 3聊天功能的建议吗? Thanks 谢谢

You can use bridging feature for XMPP Framework to use Objective C classes in Swift. 您可以使用XMPP Framework的桥接功能在Swift中使用Objective C类。

for using bridging you can follow bridging in project 使用桥接你可以跟随项目中的桥接

And you can also follow swift chat project https://github.com/processone/xmpp-messenger-ios 您还可以关注swift聊天项目https://github.com/processone/xmpp-messenger-ios

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM