/APIExample_AgoraRTM2x

The repo showcases how to use Agora RTM 2.x. SDK (aka Signaling) to build various real-time messaging scenarios such as live bidding, polling, quiz, live chat, etc.

Primary LanguageSwiftMIT LicenseMIT


Agora Real-time Messaging (RTM) SDK APIExample

Explore the API Reference »

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

This project showcases how to use Agora RTM SDK to build real-time interactive scenarios such as chat messaging, live bidding, live poll/quiz.

Here is a video

YouTube Video

(back to top)

Built With

  • Swift & SwiftUI
  • Agora RTM SDK 2.x.x (aka Signaling SDK)

(back to top)

Getting Started

Prerequisites

  • Xcode 13.0+
  • Physical iOS device (iPhone or iPad) or simulators

Installation

  1. Create an Agora account and enable the Signaling/RTM product [https://docs.agora.io/en/signaling/get-started/beginners-guide?platform=ios]
  2. Enable the Storage Configuration (Storage, User attribute callback, Channel attribute callback, and Distributed Lock)
  3. Clone this repo to your local machine
    git clone https://github.com/Bac1314/APIExample_RTM2x.git
    
  4. Install the RTM SDK through Cocoapods
    pod install
    
  5. Enter your API in Configurations.swift file
    static let agora_AppdID: String = "Agora App ID"
  6. Build an agora token generator (This is needed to login to RTM server) [https://docs.agora.io/en/signaling/get-started/integrate-token-generation?platform=ios][Agora Token Generator]
  7. (Alternative) You can also go to Agora Console to generate temp token for testing [https://console.agora.io/v2/]

(back to top)

Usage

The list of samples and what feature is used

Samples Description RTM ChannelType RTM Features
Channel Messaging Build a simple chat system using pub/sub model. Message .message, .presence
P2P Messaging Peer-to-peer messaging where a user can directly send a message to another user User /
Stream Messaging Pub-and-sub model with RTM Stream Channel's topics Stream .presence
Polling Publish poll question and poll options through the Message Channel. Message .message, .presence
QuizGame Publish quiz question and answers through Message Channel. Message .message, .presence
Bidding Live bidding scenario where the auction data is stored using the .storage channel metadata feature. Message .storage
Location Sharing Real-time location sharing scenario where the location data is shared through .presence states Message .presence
Whiteboard Real-time whiteboard collaboration tool Message, Stream .message, .presence
Audio Recording Send audio recordings directly to users Message .message, .presence
File Sharing Send files directly to users Message .message, .presence
Audio Call with CallKit (Pending) P2P audio call with Agora RTC and Apple callKit Message .message, .presence , RTC_SDK

(back to top)

Roadmap

  • Share images and files using third-party storage such as Amazon S3
  • Real-time coding
  • 1-to-1 video call using RTC + RTM + Apple CallKit

(back to top)

Potential Samples

  • Online collaborative tools
  • Interactive games
  • Real-time IoT event sharing

If you have any requests/ideas, feel free to let me know.

(back to top)

References

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Bac Huang - bac@boldbright.studio

Project Link: https://github.com/Bac1314/APIExample_AgoraRTM2x

(back to top)