IN THIS ARTICLE

    Subscribe to Our Newsletter

    Stay updated with the latest on web, mobile, and IoT, delivered weekly.
    Thanks for subscribing!

    Thanks for subscribing!

    Get ready for some great content.

    Good News

    Good News! We’ve launched an all new Chat Resource Center.

    We recommend checking out our new Chat Resource Center, which includes overviews, tutorials, and design patterns for building and deploying mobile and web chat.

    Take me to the Chat Resource Center →

    smacktive ios chat

    Smacktive is a social discovery app with a mission to create new, meaningful friendships while playing sports, exercising, playing table games with people near you. With a slick interface and easy-to-understand user experience, Smacktive launched October 8 in New York City and has already started to consider how to scale. To power this scaling, they are using PubNub behind the scenes to manage the realtime data streams of their installed user base.ios chat smacktive ios chat smacktive

    Building Scalable and Reliable Android and iOS Chat

    Peer-to-peer social discovery and communication is a difficult problem that iOS and Android developers have to address as their app becomes more and more popular. With n unique users, your peer-to-peer messaging system has to deal with O(n2) total data stream pathways from each user to any other user. By building your chat system on top of PubNub’s publish/subscribe architecture, you can leverage PubNub’s global platform with 15 redundant data centers to ensure that each message is delivered as fast as possible. As your app’s installed user base grows, your O(n2) messaging issue is moved off of your hardware onto PubNub’s global cloud, eliminating points of failure in your infrastructure and increasing reliability during traffic spikes.

    Harnessing PubNub for Chat

    Getting started with PubNub chat in your iOS app is easy, using the PubNub iOS SDK. To publish a message, it’s as simple as:

    Storing Chat History with PubNub Storage & Playback

    ios chat

    Chat conversation history is a staple of chat applications today. Users have come to expect to see a personalized conversation history with their contacts. Unfortunately, this is a feature that a standard publish/subscribe messaging architecture doesn’t include.

    Enter PubNub Storage and Playback.

    Each message sent over PubNub is stored for later retrieval with Storage & Playback, and can be queried using the same PubNub SDK that powers your messaging functionality. This eliminates the need for your servers to store chat data (although you can do this, if you desire, by having your server issue periodic history calls to active channels).

    Using PubNub Storage and Playback, a user of your app can open their message history, send a message to a friend, receive a message from a friend and carry on a conversation without hitting your servers at all. And with PubNub Channel Multiplexing, your user can carry on simultaneous conversations with multiple users through the same TCP socket.

    Walk Me Through It

    Does your app require chat functionality? See our blog post Building an iOS Group Messenger App for step-by-step instructions, an Xcode walkthrough, and sample code. It’s a quick and dirty tutorial on getting your chat application for iOS up and running fast.

    Resources
    Resources

    Building a HIPAA-compliant App

    Everything You Need to Know About Developing and Scaling a HIPAA-compliant App
    Download Now
    Building a HIPAA-compliant App
    More From PubNub