Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9256285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T11:54:17+00:00 2026-06-18T11:54:17+00:00

I have an iphone app with rails serving as a backend server. Now I

  • 0

I have an iphone app with rails serving as a backend server.

Now I need to implement a chat functionality using sockets connections.

A lot of examples show you how to implement chat using sockets in browser.

What I need here is how I can implement an application where you create socket server in the rails app , and the client in iphone app which listens to the channel I give them.

I tried using faye(examples given only how to implement client in the browser) and using fayeObjC library for iphone to create client, but am not able to listen to the channel from this library.I know I must be implementing it wrong here.

I’ll share my code also here, but first I need to know is there a better solution than this?

Also I appreciate some links to some examples where socket server is in rails and clients are iphone app.

Appreciate any help and mostly need a right direction to implement it.


Update

I tried the faye combination again and it worked.Although still looking for more solutions.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T11:54:18+00:00Added an answer on June 18, 2026 at 11:54 am

    You can check about TCP sockets:

    • http://www.raywenderlich.com/3932/how-to-create-a-socket-based-iphone-app-and-server
    • Chat Application Using Ruby
    • http://quickblox.com/modules/chat/
    • http://caydenliew.com/2011/11/ios-mac-os-communication-with-asyncsocket/
    • http://www.macresearch.org/cocoa-scientists-part-xxix-message

    Next link is a comprehensive Networking Guide – Using Internet Sockets

    You must keep in mind two major problems to peer-to-peer communications (Chat): reachability and how to receive new messages while your application is in the background (get notifications).
    For the last you can use APNS approach: an invisible notification will be pushed to the iPhone indicating that a new message is ready to be read. So your app will make a request for unread messages (what app like WhatsApp does).

    Besides TCP sockets you could use websockets (HTTP – so there are no firewall problems).
    Best in class – Socket.IO.
    Here you will find the wiki https://github.com/learnboost/socket.io/wiki (you will find there an extension for Ruby also)

    Here an example for iOS chat client for socket.io & node.js backend

    Jabber

    Another option: XMPP – “stands for eXtensible Messaging and Presence Protocol. Such a protocol is open-standard and oriented to message exchange (builds and maintains by Jabber community). Message exchange happens near real time, so it is an ideal infrastructure to build chat-like applications. The protocol also implements a mechanism to notify presence information (whether a user is online or not) and the maintenance of a contact list. XMPP is a thorough protocol, which has been adopted also by big companies like Google to build their Instant Messaging service.”

    Here you will find all about developing a Jabber Client for iOS (enable users to sign in, add buddies, and send messages; how to install and configure a jabber server, create accounts, and interact with the server from an iOS application http://mobile.tutsplus.com/tutorials/iphone/building-a-jabber-client-for-ios-server-setup/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an iPhone app that is using my PHP API on the server
I have an iPhone app using a UINavigationController. On the fourth controller of the
I have a rails app with a mobile view using jqtouch. If the application
I have an iPhone app that I need to send to the background automatically.
we have an iphone app and are developing it now as universal app. We
I am developing a server backend for my iphone application. I need to upload
I have an iPhone app that is a client for an existing server application.
I have an IPhone app that uses webservices to get data from a server.
We have a Rails app which communicates with a PhoneGap-based iPhone app. We are
I have an iPhone app that gets push notifications from a Windows server as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.