A demo iOS app built with SwiftUI that shows how to implement a basic video + chat application
Amazon IVS Chat for iOS Demo
A demo iOS application intended for use as an educational tool to demonstrate how a simple live video and chat application can be built with Amazon IVS video and chat.
This project is intended for education purposes only and not for production usage.
The demo showcases how you can implement a simple live streaming application with video and chat using Amazon IVS. Viewers are asked to enter their name the first time they begin chatting. Chat users can send plain text messages, emojis, and stickers. Chat moderators can delete messages and kick users.
Prerequisites
- The
ApiUrl
from a deployed Amazon IVS Chat Demo Backend.
Setup
To open the demo iOS app, follow these instructions:
- Clone this repository to your local machine
- Install the SDK dependency using CocoaPods. This can be done by running the following commands from the repository folder:
- Open SimpleChat.xcworkspace.
- Open Constants.swift and set constants for:
- Amazon IVS Playback URL
playbackUrl
- A sample playback url for a 24/7 livestream is pre-filled. You may add a playback url to use a custom livestream in this demo.
- Amazon IVS Chat Demo backend endpoint
apiUrl
- You must deploy the Amazon IVS Chat Demo Backend to get this value.
- Chat websocket address
chatWebsocket
- The websocket endpoint for the chat room:
wss://edge.ivschat.<aws-region>.amazonaws.com
. - For example, if your chat room is located in
us-west-2
, the websocket endpoint would bewss://edge.ivschat.us-west-2.amazonaws.com
.
- The websocket endpoint for the chat room:
- Chat room id
chatRoomId
- The ID (or ARN) of the Amazon IVS Chat Room that the app should use.
- You must create an Amazon IVS Chat Room to get a chat room ID/ARN. Refer to Getting Started with Amazon IVS Chat for a detailed guide.
- Amazon IVS Playback URL
- You can now build and run the project in the simulator or real device running iOS 14.0 or later.
Known issues and limitations
- The application is meant for demonstration purposes and not for production use.
- This application is only tested in the us-west-2 (Oregon) region. Additional regions may be supported depending on service availability.
About Amazon IVS
Amazon Interactive Video Service (Amazon IVS) is a managed live streaming and stream chat solution that is quick and easy to set up, and ideal for creating interactive video experiences. Learn more.
- Amazon IVS docs
- User Guide
- API Reference
- Setting Up for Streaming with Amazon Interactive Video Service
- Learn more about Amazon IVS on IVS.rocks
- View more demos like this
Security
See CONTRIBUTING for more information.
License
This library is licensed under the MIT-0 License. See the LICENSE file.