Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Building a chat app that uses a node.js server in IOS [closed]

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

What is the best way to create chat application on IOS

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

Could anyone give me suggestion?

Thanks for you suggestion

like image 597
btmanikandan Avatar asked Sep 13 '14 07:09

btmanikandan


People also ask

How do I run node js app forever when console is closed?

js application locally after closing the terminal or Application, to run the nodeJS application permanently. We use NPM modules such as forever or PM2 to ensure that a given script runs continuously. NPM is a Default Package manager for Node.

Can I use node JS for iOS app?

You can use Node. js for Mobile Apps. At its core, the project provides a native library for embedding Node. js into native Android and iOS applications; but it also comes with plugins for React Native and Cordova.


1 Answers

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) 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 will interface as stream, that you need to connect from your 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!

iPhone Objective-C socket communication with Socket.IO

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

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! :))

like image 140
Tim Avatar answered Oct 03 '22 02:10

Tim