Giter Site home page Giter Site logo

sendbird / sendbird-chat-sample-ios Goto Github PK

View Code? Open in Web Editor NEW
28.0 16.0 5.0 201.62 MB

This repository provides feature-level Chat samples with Swift.

Home Page: https://sendbird.com/docs/chat/v4/ios/overview

License: MIT License

Swift 99.98% Objective-C 0.02%
api-for-chat bard chat-api chat-api-platform chat-platform chat-sdk chatbot-api chatbot-sdk chatgpt communications-platform

sendbird-chat-sample-ios's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sendbird-chat-sample-ios's Issues

Group Channel/ iOS-Freeze and unfreeze channel

Operators can freeze various functions in a channel to stop members from chatting in the channel. Operators can also unfreeze the channel so that the members can chat with one another again.

Implementing the ViewModel through delegation rather than inheritance

전체 ViewController를 재사용하기 쉽지 않은데, ViewModel or UseCase 레벨로 로직을 공유하는 것은 비교적 현실적인 것 같다.
BaseGroupChannelListViewModel 이런거 만들어 두면 하위 FeatureGroupChannelListViewModel 에서 기능 위임을 통해서 기본 기능을 쓸 수 있도록 만들 수 있는 방법을 고민할 필요가 있다.

Delegate를 통해서 ViewModel의 Output을 정의하고 있는데,
BaseViewModel의 Delegate를 FeatureViewModel의 Delegate로 간편하게 Proxy 해줄 수 있는 방법이 필요하다.

Group Channel/ iOS-Typing indicator

Shows when someone in the group channel has started typing "Bob is typing.." or "Bob, Alice and 2 others are typing.." using the onTypingStatusUpdated() event handler, and set this state using startTyping() and endTyping() to update the group members

Retrieve a list of members

Member API 통해서 load more

"닉네임 (online)" 으로 표시하기

흐름은 안드로이드 샘플앱 참고

Request Code Review

  1. UseCase 객체 분리한 부분 어색하지 않을지
  2. https://github.com/sendbird/examples-chat-ios/blob/main/CommonModule/CommonModule/UseCase/GroupChannel/GroupChannelMessageListUseCase.swift 에서 var messages: [SBDBaseMessage] 관리해주고 있는데 insert, append, filter 적절하게 사용하고 있는지
  3. https://github.com/sendbird/examples-chat-ios/blob/main/CommonModule/CommonModule/UseCase/OpenChannel/OpenChannelMessageListUseCase.swift 에서 var messages: [SBDBaseMessage] 사용하고 있는데 insert, append, filter 적절하게 사용하고 있는지
  4. UseCase를 확장하고 싶을 때 어려움은 없을지
  5. Basic 프로젝트를 복제해서 Feature 프로젝트를 만들도록 가이드 하려 하는데, 더 나은 방법이 있을지

Open Channel/ iOS-Channel metadata and metacounter

Users can store and manage (create, update, retrieve, delete) additional information such as the number of likes or the background color of a channel.
Users can manage (create, update, increase, decrease) additional information to channels such as the tracking number of likes with channel metacounter,

Migrate SDK v3 -> v4

- import SendbirdSDK 
+ import SendbirdChat
- SBDUser 
+ User
- SBDGroupChannel 
+ GroupChannel
- SBDError
+ SBError
- SBDBaseMessage
+ BaseMessage
- SBDOpenChannel
+ OpenChannel

Divide Feature Samples

요구사항 엑셀에 feature가 너무 잘게 나눠져있는데 실제 샘플 앱은 어떤 단위로 나눠야할지 고민 필요

Group Channel/ iOS-Channel types

Private group channel: a user can join the chat through an invitation by another user who is already a member of the chatroom.
Public group channel: a user can join the chat without invitation from others.

A normal group channel (default setting) can accommodate up to 100 members and a Supergroup channel can accommodate up to 2000 members and can stretch up to 20K members depending on the sendbird plan.

Fix scroll action when scroll indicator is reached top or bottom

I have changed the message fetching direction to forward.
Because using forward direction fetching is make understanding the business logic easier for developers.
However, It's hard to present UI with the forward direction message fetching.

So I will fetch messages in the reverse direction.

Feedback

이슈 설명

질문

  • Sample 앱 간의 구조 괜찮을지
  • 앱을 하나만 두고, 화면 나눠서 feature 나열하는건 어떨까? JS 팀에서 하려는 방식: feature 단위로 코드 참고를 하기 위함인데, 하나의 앱으로 하면 코드 참고하기가 어려움
  • Calls 샘플 앱 만들 때 겪었던 어려움 파악
  • Common 에 공통 로직을 두고 확장을 할 때는 상속해서 만드는 구조는 괜찮을지
  • 세부 feature 들을 각각 Sample App으로 만드는 것이 요구사항인데, 어떤 기준으로 나누면 좋을지 고민이 됨
  • 내부 아키텍쳐는 어떻게 하면 좋을까?
    • MVC 기본형태에 공통적인 비즈니스 로직 Common 으로 모아두기
    • 어려운 아키텍쳐를 골랐다가 핵심을 오히려 파악하기 어려워질 수도 있겠다는 생각
    • MVC, VIP, ...
    • MVVM도 후보로...! <- UIKit 프로덕트 구경하기
  • 근본적인 접근 방식이 잘못된 건 없을지 확인

의견

  • ⭐️ 로직 중심으로 기능 공유하도록 만들기
    • 로직만 깔끔하게 떼어낼 수 있으면 좋겠음
    • View / Logic 구분 잘되어 있으면 좋겠음
    • ⭐️ 의존성 최소화 시키기
  • BaseChannel: Common에 포함
    • Group: 각자 샘플 앱
    • Open: 각자 샘플 앱
  • Common 의 확장성이 관건일듯...!!!

Crash when registering 3 users in ProfileImageView

I imported the code from an old sample app, but there is a bug.
Re-creating StackView is inefficient and needs improvement.

if users.count == 1 {
mainStackView.addArrangedSubview(imageContainerView)
} else {
let stackView = UIStackView(frame: CGRect(x: 0, y: 0, width: self.frame.width, height: self.frame.height))
stackView.addArrangedSubview(imageContainerView)
stackView.axis = .vertical
stackView.distribution = .fillEqually
stackView.spacing = spacing
imageView.heightAnchor.constraint(equalToConstant: imageContainerView.frame.height).isActive = true
imageView.widthAnchor.constraint(equalTo: imageView.heightAnchor).isActive = true
if mainStackView.arrangedSubviews.count < 2 {
mainStackView.addArrangedSubview(stackView)
} else {
mainStackView.arrangedSubviews
.compactMap { $0 as? UIStackView }
.filter { $0.arrangedSubviews.count == 1 }
.forEach { $0.addArrangedSubview($0) }
}
}

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.