Git Product home page Git Product logo

twilio-chat-demo-ios's Introduction

This repository is deprecated

The new version of the Conversations Demo Application is available in twilio-conversations-demo-swift. It is an example of better app architecture and demonstrates best practices in implementing Twilio-based Conversations. Please use it instead of this one.

Chat Demo Application Overview

Getting Started

Welcome to the Chat Demo application. This application demonstrates a basic chat client with the ability to create and join channels, invite other members into the channels and exchange messages.

What you'll minimally need to get started:

The first step is to bring the .framework into the project. The easiest way to do this is to find the .framework in the tar.bz distribution and drag-n-drop it into the target's Embedded Frameworks section on the General settings tab.

Next, in the ChatManager.m file, find the line that Xcode will let you know is an error. Delete that #error line and fill in a client token in the line below:

return nil;

You can either paste in a client token you have generated elsewhere or update this portion of code to call out to a webservice you control that can generate tokens.

Additional Configuration of Chat Instance

In order to allow members of a channel other than a message's original author to add reactions to messages in this demo, you will need to permit any channel member to modify a message's attributes. In a non-sample application, this could be handled more securely with a call initiated by your backend server and the system user should you wish to use message attributes for sensitive data that an arbitrary channel member should not be able to modify.

To learn more about Roles and Channels, you can visit the Role documentation. A quick example of enabling editing of any message's attributes using curl is:

curl -XPOST https://chat.twilio.com/v1/Services/{service sid}/Roles/{role sid} \
    -d "FriendlyName=channel user" \ 
    -d "Permission=sendMessage" \ 
    -d "Permission=leaveChannel" \ 
    -d "Permission=editOwnMessage" \ 
    -d "Permission=editOwnMessageAttributes" \ 
    -d "Permission=deleteOwnMessage" \ 
    -d "Permission=editAnyMessageAttributes" \ 
    -u '{twilio account sid}:{twilio auth token}'

twilio-chat-demo-ios's People

Contributors

rbeiter avatar gray-wind avatar thewilliamchia avatar berkus avatar kwhinnery avatar zeveisenberg avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.