Code Monkey home page Code Monkey logo

sendbird-chat-sample-ios's Introduction

Sendbird Chat SDK Sample for iOS

Platform Language License: MIT Tuist - Build

This repository provides feature-level Chat samples with Swift.

๐Ÿš€ Get started

You must use tuist to build these sample apps.

1. Install tuist

curl -Ls https://install.tuist.io | bash

2. Install Dependencies

tuist fetch

3. Generate Xcode project & workspace

tuist generate 

For more details: Tuist Docs

4. Execute sample apps

  1. Execute Samples.xcworkspace.
  2. Select the scheme of the feature you want to test.
  3. Run the scheme.

๐Ÿ— Project structure

.
โ”œโ”€โ”€ Samples.xcworkspace
โ”œโ”€โ”€ Modules
โ”‚ย ย  โ””โ”€โ”€ CommonModule # Common Logic & View
โ”œโ”€โ”€ Apps
โ”‚ย ย  โ”œโ”€โ”€ BasicGroupChannel
โ”‚ย ย  โ”œโ”€โ”€ BasicOpenChannel
โ”‚ย ย  โ”œโ”€โ”€ GroupChannelFeatureA
โ”‚ย ย  โ”œโ”€โ”€ OpenChannelFeatureA
โ”‚   โ”œโ”€โ”€ ...
โ”‚   โ”œโ”€โ”€ GroupChannelFeatureN
โ”‚ย ย  โ””โ”€โ”€ OpenChannelFeatureN
โ””โ”€โ”€ Tuist
  • UseCase: Objects that can be conceptually bundled and used in SendbirdSDK.
    • For example, when implementing the chat room message list, the functions to initialize the list, get the previous message, and get the next message are mostly used together.
    • So, even if it is not divided into screen units, things that can be grouped with a similar concept are grouped with UseCase.
    • If necessary, change the Access Control of BaseModule to open and use it.
  • View
    • Small Views that can be easily modularized
    • It is recommended to collect all Views that are used for both Group Channel and Open Channel here.
  • CommonModule is used as an embedded framework in each Sample App.

๐Ÿ›  For contributors

Below is an additional explanation for contributors.

๐Ÿ“ฒ How to add new Feature Sample App with tuist

  1. Copy Apps/BasicGroupChannel or Apps/BasicOpenChannel
  2. Paste under Apps folder.
  3. Rename folder name BasicGroupChannel to {FeatureSampleName}
  4. Rename parameter "BasicGroupChannel" to "{FeatureSampleName}" in Apps/{FeatureSampleName}/Project.swift
let project = Project.app(name: {FeatureSampleName})
  1. Re-generate Xcode project & workspace
tuist generate

Considerations in real world app

  • In this sample repo users are connecting to sendbird using a user ID (Sendbird Dashboard --> Security --> Read & Write). Read & Write is not secure and will create a new user automatically from the SDK if none exists. In production be sure to change the Sendbird Dashboard security settings to Deny login, and authenticate users with a Sendbird generated Session Token.

sendbird-chat-sample-ios's People

Contributors

cozzin avatar yogeshveer avatar chrischabot avatar james-a-rob 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.