All Projects → opentok → accelerator-textchat-ios

opentok / accelerator-textchat-ios

Licence: MIT license
OpenTok Text Chat Accelerator Pack enables text messages between mobile or browser-based devices.

Programming Languages

objective c
16641 projects - #2 most used programming language
HTML
75241 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to accelerator-textchat-ios

accelerator-core-ios
Syntax sugar of OpenTok iOS SDK with Audio/Video communication including screen sharing
Stars: ✭ 30 (+130.77%)
Mutual labels:  communication, realtime, opentok, tokbox
Applozic Android Sdk
Android Real Time Chat & Messaging SDK
Stars: ✭ 611 (+4600%)
Mutual labels:  communication, realtime, realtime-messaging
Engine And Editor
Streamr Core backend
Stars: ✭ 44 (+238.46%)
Mutual labels:  realtime, realtime-messaging
Ably Js
Javascript, Node, Typescript client library SDK for Ably realtime messaging service
Stars: ✭ 99 (+661.54%)
Mutual labels:  realtime, realtime-messaging
Qiscus Sdk Android
Qiscus provide everything you need to power up your app with chats. And it's now made simple.
Stars: ✭ 175 (+1246.15%)
Mutual labels:  realtime, realtime-messaging
opentok-rtc
OpenTok demo application
Stars: ✭ 97 (+646.15%)
Mutual labels:  opentok, tokbox
Ably Go
Go client library SDK for Ably realtime messaging service
Stars: ✭ 29 (+123.08%)
Mutual labels:  realtime, realtime-messaging
Eon Map
Realtime maps with PubNub and MapBox.
Stars: ✭ 121 (+830.77%)
Mutual labels:  realtime, realtime-messaging
live-cryptocurrency-streaming-flutter
A Flutter app with live cryptocurrency updates, powered by Ably
Stars: ✭ 26 (+100%)
Mutual labels:  realtime, realtime-messaging
Channelize-iOS-Chat-SDK-Sample
Open-source JavaScript SDK to enable Real-time Messaging
Stars: ✭ 30 (+130.77%)
Mutual labels:  communication, realtime-messaging
Wsify
Just a tiny, simple and real-time self-hosted pub/sub messaging service
Stars: ✭ 452 (+3376.92%)
Mutual labels:  realtime, realtime-messaging
Opentok Ios Sdk Samples
Example applications that use the OpenTok iOS SDK
Stars: ✭ 186 (+1330.77%)
Mutual labels:  communication, realtime
core-api
Streamr Core backend
Stars: ✭ 52 (+300%)
Mutual labels:  realtime, realtime-messaging
Kotlin Firebase Group Chat
Group and OneonOne chat using firebase built in Kotlin similar to whatsapp.
Stars: ✭ 44 (+238.46%)
Mutual labels:  realtime, realtime-messaging
pgchat
Demo chat app for PGDay EU 2017, built with Framework7-Vue
Stars: ✭ 38 (+192.31%)
Mutual labels:  realtime, realtime-messaging
Rltm.js
Easily swap realtime providers with a single code base
Stars: ✭ 106 (+715.38%)
Mutual labels:  realtime, realtime-messaging
fastapi websocket pubsub
A fast and durable Pub/Sub channel over Websockets. FastAPI + WebSockets + PubSub == ⚡ 💪 ❤️
Stars: ✭ 255 (+1861.54%)
Mutual labels:  realtime, realtime-messaging
ably-dotnet
.NET, Xamarin and Mono client library SDK for Ably realtime messaging service
Stars: ✭ 32 (+146.15%)
Mutual labels:  realtime, realtime-messaging
Channelize-Javascript-SDK
Open-source JavaScript SDK to enable Real-time Chat.
Stars: ✭ 20 (+53.85%)
Mutual labels:  communication, realtime
Applozic Ios Sdk
iOS Real Time Chat & Messaging SDK
Stars: ✭ 104 (+700%)
Mutual labels:  communication, realtime-messaging

Text Chat Accelerator Pack iOS

Build Status Version Status license MIT Platform PRs Welcome codebeat badge

Tokbox is now known as Vonage

This project is deprecated

The OpenTok Text Chat Accelerator Pack for iOS project is now a part of Accelerator Core iOS

The Text Chat Accelerator Pack provides functionality you can add to your OpenTok applications that enables users to exchange text messages between mobile or browser-based devices.

Text Chat Accelerator Pack Examples

default custom

Configure, build and run the sample app

  1. Get values for API Key, Session ID, and Token. See Obtaining OpenTok Credentials for important information.

  2. Install CocoaPods as described in CocoaPods Getting Started. If you are only interested in the core part without UI component, you can use this pod 'OTTextChatAccelerator/Core'

  3. In Terminal, cd to your project directory and type pod install.

  4. Reopen your project in Xcode using the new *.xcworkspace file.

  5. Replace the following empty strings with the corresponding API Key, Session ID, and Token values:

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
        // Override point for customization after application launch.
        sharedSession = [[OTAcceleratorSession alloc] initWithOpenTokApiKey:@"apikey" sessionId:@"sessionid" token:@"token"];
        return YES;
    }
  6. Use Xcode to build and run the app on an iOS simulator or device.

  7. For testing text chat, we include a simple web app to make it easier: Browser-Demo-TextChat. Simply open it and replace the corresponding API Key, Session ID, and Token values. Then save and load it to the browser.

  8. You might want to run on other platforms:

Accelerator Textchat Javascript
Accelerator Textchat Android

Sample Codes

  • Passing the session

    - (OTAcceleratorSession *)sessionOfOTOneToOneCommunicator:(OTOneToOneCommunicator *)oneToOneCommunicator {
        return <#OTAcceleratorSession#>;
    }
  • Start signaling text chat data

    // we assume self owns a table tableView
    [self.textChat connectWithHandler:^(OTTextChatConnectionEventSignal signal, OTConnection *connection, NSError *error) {
        if (signal == OTTextChatConnectionEventSignalDidConnect) {
            NSLog(@"Text Chat starts");
        }
        else if (signal == OTTextChatConnectionEventSignalDidDisconnect) {
            NSLog(@"Text Chat stops");
        }
    } messageHandler:^(OTTextChatMessageEventSignal signal, OTTextMessage *message, NSError *error) {
        if (signal == OTTextChatMessageEventSignalDidSendMessage || signal == OTTextChatMessageEventSignalDidReceiveMessage) {
            if (!error) {
                [weakSelf.textMessages addObject:message];
                [weakSelf.tableView reloadData];
            }
        }
    }];
  • Stop signaling text chat data

    [self.textchat disconnect];

Obtaining OpenTok Credentials

To use OpenTok's framework you need a Session ID, Token, and API Key you can get these values at the OpenTok Developer Dashboard . For production deployment, you must generate the Session ID and Token values using one of the OpenTok Server SDKs.

JSON Requirements for Text Chat Signaling

The JSON used when using the OpenTok signaling API with the OpenTok Text Chat component describes the information used when submitting a chat message. This information includes the date, chat message text, sender alias, and sender ID. The JSON is formatted as shown in this example:

// var type = "text-chat"
{
    "sentOn" : 1462396461923.305,
    "text" : "Hi",
    "sender" : {
        "alias" : "Tokboxer",
        "id" : "16FEB40D-C09B-4491-A983-44677B7EBB3E"
    }
}

This formatted JSON is converted to a string, which is submitted to the OpenTok signaling API. For more information, see:

Development and Contributing

Interested in contributing? We ❤️ pull requests! See the Contribution guidelines.

Getting Help

We love to hear from you so if you have questions, comments or find a bug in the project, let us know! You can either:

Further Reading

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].