Table of Contents
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
- Swift & SwiftUI
- Agora RTM SDK 2.x.x (aka Signaling SDK)
- Xcode 13.0+
- Physical iOS device (iPhone or iPad) or simulators
- Create an Agora account and enable the Signaling/RTM product [https://docs.agora.io/en/signaling/get-started/beginners-guide?platform=ios]
- Enable the Storage Configuration (Storage, User attribute callback, Channel attribute callback, and Distributed Lock)
- Clone this repo to your local machine
git clone https://github.com/Bac1314/APIExample_RTM2x.git
- Install the RTM SDK through Cocoapods
pod install
- Enter your API in
Configurations.swift
filestatic let agora_AppdID: String = "Agora App ID"
- 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]
- (Alternative) You can also go to Agora Console to generate temp token for testing [https://console.agora.io/v2/]
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 | User | / |
Stream Messaging | Pub-and-sub model with RTM Stream Channel's topics | Stream | .presence |
Polling | Setup polls through Message Channel | Message | .message , .presence |
QuizGame | Setup a quiz game and score through Message Channel and Presence Userstates | 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 recording through Message Channel | Message | .message , .presence |
File Sharing | Share files through Message Channel | Message | .message , .presence |
Audio Call with CallKit (Pending) | P2P audio call with Agora RTC and Apple callKit | Message | .message , .presence |
Virtual Gifting | Send virtual emojis through Message Channel | Message | .message |
Minigame - TicTacToe | TicTacToe game using Storage Channel Metadata | Message | .storage , .presence |
Minigame - Go | Go game using Storage Channel Metadata | Message | .storage , .presence |
- 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
- Online collaborative tools
- Interactive games
- Real-time IoT event sharing
If you have any requests/ideas, feel free to let me know.
- API Reference (https://docs.agora.io/en/signaling/reference/api?platform=ios)
- Pricing (https://docs.agora.io/en/signaling/overview/pricing?platform=ios)
- API Limitations (https://docs.agora.io/en/signaling/reference/limitations?platform=android)
- Security/Compliance (https://docs.agora.io/en/signaling/reference/security?platform=android)
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!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
Bac Huang - [email protected]
Project Link: https://github.com/Bac1314/APIExample_AgoraRTM2x