{"id":1586,"url":"https://github.com/opentok/accelerator-textchat-ios","last_synced_at":"2025-08-02T04:31:44.010Z","repository":{"id":56356987,"uuid":"80448027","full_name":"opentok/accelerator-textchat-ios","owner":"opentok","description":"OpenTok Text Chat Accelerator Pack enables text messages between mobile or browser-based devices.","archived":true,"fork":false,"pushed_at":"2021-03-22T09:42:40.000Z","size":424,"stargazers_count":13,"open_issues_count":0,"forks_count":8,"subscribers_count":67,"default_branch":"main","last_synced_at":"2025-07-28T03:29:16.128Z","etag":null,"topics":["communication","ios","objective-c","opentok","real-time","realtime","realtime-messaging","textchat","tokbox","webrtc"],"latest_commit_sha":null,"homepage":"https://tokbox.com/","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opentok.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-30T18:03:43.000Z","updated_at":"2023-01-28T03:40:52.000Z","dependencies_parsed_at":"2022-08-15T17:10:50.658Z","dependency_job_id":null,"html_url":"https://github.com/opentok/accelerator-textchat-ios","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/opentok/accelerator-textchat-ios","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentok%2Faccelerator-textchat-ios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentok%2Faccelerator-textchat-ios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentok%2Faccelerator-textchat-ios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentok%2Faccelerator-textchat-ios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opentok","download_url":"https://codeload.github.com/opentok/accelerator-textchat-ios/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentok%2Faccelerator-textchat-ios/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268334613,"owners_count":24233793,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["communication","ios","objective-c","opentok","real-time","realtime","realtime-messaging","textchat","tokbox","webrtc"],"created_at":"2024-01-05T20:15:50.518Z","updated_at":"2025-08-02T04:31:43.662Z","avatar_url":"https://github.com/opentok.png","language":"Objective-C","funding_links":[],"categories":["Messaging"],"sub_categories":["Video","Other free courses"],"readme":"# Text Chat Accelerator Pack iOS\n\n[![Build Status](https://travis-ci.org/opentok/accelerator-textchat-ios.svg?branch=main)](https://travis-ci.org/opentok/accelerator-textchat-ios)\n[![Version Status](https://img.shields.io/cocoapods/v/OTTextChatAccelerator.svg)](https://cocoapods.org/pods/OTTextChatAccelerator)\n[![license MIT](https://img.shields.io/cocoapods/l/OTTextChatAccelerator.svg)](https://cocoapods.org/pods/OTTextChatAccelerator)\n[![Platform](https://img.shields.io/cocoapods/p/OTTextChatAccelerator.svg)](https://cocoapods.org/pods/OTTextChatAccelerator)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com)\n[![codebeat badge](https://codebeat.co/badges/cfd17e02-576e-4e4b-9606-290dbe5dbf1c)](https://codebeat.co/projects/github-com-opentok-accelerator-textchat-ios)\n\n\u003cimg src=\"https://assets.tokbox.com/img/vonage/Vonage_VideoAPI_black.svg\" height=\"48px\" alt=\"Tokbox is now known as Vonage\" /\u003e\n\n# **This project is deprecated**\n ## The OpenTok Text Chat Accelerator Pack for iOS project is now a part of [Accelerator Core iOS](https://github.com/opentok/accelerator-core-ios)\n\nThe 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.\n\n## Text Chat Accelerator Pack Examples\n\n![default](./default.png) ![custom](./custom.png)\n\n## Configure, build and run the sample app\n\n1. Get values for **API Key**, **Session ID**, and **Token**. See [Obtaining OpenTok Credentials](#obtaining-opentok-credentials) for important information.\n\n1. Install CocoaPods as described in [CocoaPods Getting Started](https://guides.cocoapods.org/using/getting-started.html#getting-started). If you are only interested in the core part without UI component, you can use this `pod 'OTTextChatAccelerator/Core'`\n\n1. In Terminal, `cd` to your project directory and type `pod install`.\n\n1. Reopen your project in Xcode using the new `*.xcworkspace` file.\n\n1. Replace the following empty strings with the corresponding API Key, Session ID, and Token values:\n\n    ```objc\n    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {\n        // Override point for customization after application launch.\n        sharedSession = [[OTAcceleratorSession alloc] initWithOpenTokApiKey:@\"apikey\" sessionId:@\"sessionid\" token:@\"token\"];\n        return YES;\n    }\n    ```\n\n1. Use Xcode to build and run the app on an iOS simulator or device.\n\n1. For testing text chat, we include a simple web app to make it easier: [Browser-Demo-TextChat](https://github.com/opentok/accelerator-textchat-ios/blob/master/browser-demo-textchat.html). Simply open it and replace the corresponding API Key, Session ID, and Token values. Then save and load it to the browser.\n\n1. You might want to run on other platforms:\n\n[Accelerator Textchat Javascript](https://github.com/opentok/accelerator-textchat-js) \u003cbr /\u003e\n[Accelerator Textchat Android](https://github.com/opentok/accelerator-textchat-android)\n\n## Sample Codes\n\n- Passing the session\n\n    ```objc\n    - (OTAcceleratorSession *)sessionOfOTOneToOneCommunicator:(OTOneToOneCommunicator *)oneToOneCommunicator {\n        return \u003c#OTAcceleratorSession#\u003e;\n    }\n    ```\n\n- Start signaling text chat data\n\n    ```objc\n    // we assume self owns a table tableView\n    [self.textChat connectWithHandler:^(OTTextChatConnectionEventSignal signal, OTConnection *connection, NSError *error) {\n        if (signal == OTTextChatConnectionEventSignalDidConnect) {\n            NSLog(@\"Text Chat starts\");\n        }\n        else if (signal == OTTextChatConnectionEventSignalDidDisconnect) {\n            NSLog(@\"Text Chat stops\");\n        }\n    } messageHandler:^(OTTextChatMessageEventSignal signal, OTTextMessage *message, NSError *error) {\n        if (signal == OTTextChatMessageEventSignalDidSendMessage || signal == OTTextChatMessageEventSignalDidReceiveMessage) {\n            if (!error) {\n                [weakSelf.textMessages addObject:message];\n                [weakSelf.tableView reloadData];\n            }\n        }\n    }];\n    ```\n\n- Stop signaling text chat data\n\n    ```objc\n    [self.textchat disconnect];\n    ```\n\n#### Obtaining OpenTok Credentials\n\nTo use OpenTok's framework you need a Session ID, Token, and API Key you can get these values at the [OpenTok Developer Dashboard](https://dashboard.tokbox.com/) . For production deployment, you must generate the Session ID and Token values using one of the [OpenTok Server SDKs](https://tokbox.com/developer/sdks/server/).\n\n## JSON Requirements for Text Chat Signaling\n\nThe 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:\n\n``` javascript\n// var type = \"text-chat\"\n```\n\n```json\n{\n    \"sentOn\" : 1462396461923.305,\n    \"text\" : \"Hi\",\n    \"sender\" : {\n        \"alias\" : \"Tokboxer\",\n        \"id\" : \"16FEB40D-C09B-4491-A983-44677B7EBB3E\"\n    }\n}\n```\n\nThis formatted JSON is converted to a string, which is submitted to the OpenTok signaling API. For more information, see:\n\n- [Signaling - JavaScript](https://tokbox.com/developer/guides/signaling/js/)\n- [Signaling - iOS](https://tokbox.com/developer/guides/signaling/ios/)\n- [Signaling - Android](https://tokbox.com/developer/guides/signaling/android/)\n\n## Development and Contributing\n\nInterested in contributing? We :heart: pull requests! See the [Contribution](CONTRIBUTING.md) guidelines.\n\n## Getting Help\n\nWe love to hear from you so if you have questions, comments or find a bug in the project, let us know! You can either:\n\n- Open an issue on this repository\n- See \u003chttps://support.tokbox.com/\u003e for support options\n- Tweet at us! We're [@VonageDev](https://twitter.com/VonageDev) on Twitter\n- Or [join the Vonage Developer Community Slack](https://developer.nexmo.com/community/slack)\n\n## Further Reading\n\n- Check out the Developer Documentation at \u003chttps://tokbox.com/developer/\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopentok%2Faccelerator-textchat-ios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopentok%2Faccelerator-textchat-ios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopentok%2Faccelerator-textchat-ios/lists"}