构建在IOS中使用node.js服务器的聊天应用程序 [英] Building a chat app that uses a node.js server in IOS

查看:136
本文介绍了构建在IOS中使用node.js服务器的聊天应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试构建一个在socket.io上使用node.js的iPhone(原生)聊天应用程序。

I am trying to build an iPhone(native) chat app that uses node.js on socket.io.

创建聊天应用程序的最佳方法是什么IOS

What is the best way to create chat application on IOS

是否有办法在IOS中使用node.js服务器创建聊天应用程序

Is there is any way to create chat application with the node.js server in IOS

任何人都可以给我建议?

Could anyone give me suggestion?

谢谢你的建议

推荐答案

您可以使用Socket.io与iOS / Android和HTML创建聊天应用程序!

Of cuz you could create chat application using Socket.io with iOS/Android and HTML!

您可以通过以下两种方式进行操作!

There are 2 ways for you to do it!

i)使用Socket.io实现自己的套接字通信,(这是难以理解的,因为你需要自己编写大部分网络实现!)

i) Implement your own socket communication with Socket.io, (this is diffucult, because you need to write most of the network implementation by yourself!)

Socket.io将作为流接口,您需要从iOS连接!

Socket.io will interface as stream, that you need to connect from your iOS!

您可以参考iOS开发指南,了解如何实现流!

You could refer the iOS dev guide on how to implement the stream!

https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/NetworkingTopics/Articles/UsingSocketsandSocketStreams.html

有一个活跃的线程也在讨论这个问题!

There is an active thread that discuss about this too!

与Socket.IO进行的iPhone Objective-C socket通信

ii)使用人们为iOS制作的现有库或包装器,你可以在下面找到链接!

ii) Use existing library or wrapper that people make for iOS, you could find the link below!

这个库主要完成了网络部分,你只需要实现你的app logics!

This library mainly done the networking part, and you just need to implement your app logics!

iOS

https://github.com/pkyeck/socket.IO-objc

Android

https://github.com/nkzawa/socket.io-client.java

从图书馆开始对你有好处首先,然后尝试自己实现! :))

It would be good for you to start with the library first and then try to make your own implementation! :))

这篇关于构建在IOS中使用node.js服务器的聊天应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆