Exploring Stream's Video SDK: Creating a WWDC Watch Party App
If you are an Apple Platforms developer, you know how exciting Apple's annual Worldwide Developers Conference (WWDC) is. For those of us who live and breathe code, WWDC is like Christmas, New Year, and our birthday all rolled into one.
The ultimate event for all things Apple, where they announce new products, features, and updates. Especially this WWDC 2024 where there are big rumours about Apple going all in on generative AI.
But as much as we love WWDC, it is not feasible to fly all the way to Cupertino, or win the golden ticket. Sure, we can watch the keynote and sessions on our own, but it is so much more fun to share the experience with friends and colleagues. That's where the idea for a WWDC Watch Party App comes in!
To build this app, I turned to Stream's Video SDK. Stream's Video SDK is a powerful tool that gives developers everything they need to build rich video capabilities into their apps. With Stream's Video SDK, you can use out-of-the-box UI components with powerful customisation and theming options, or build your own UI while reusing Stream's lower-level logic.
This post is sponsored by Stream, but all views expressed are my own.
Let's dive in and explore how to build a WWDC Watch Party App with Stream's Video SDK.
You can find the final project here: https://github.com/rudrankriyam/WWDC-Watch-Party
Setting Up the Project
Open Xcode and create a new project. Select "App" under the iOS tab and click "Next". Name your project "WWDCWatchParty" and choose a location to save it. Make sure the "Interface" is set to "SwiftUI". Click "Next" to proceed.
To integrate Stream's Video SDK, we will use Swift Package Manager. In Xcode, navigate to "File" > "Swift Packages" > "Add Package Dependency". In the search bar, enter "https://github.com/GetStream/stream-video-swift" and click "Add Package".
Now, let's select the packages we need. Check the boxes for "StreamVideo" and "StreamVideoSwiftUI" and click "Add Package".
To use the camera and microphone, we need to add the necessary permissions to our app's Info.plist file.
Open the Info.plist file and add the following keys and descriptions:
- Privacy - Camera Usage Description: "Camera access is required to share your video during the WWDC watch party."
- Privacy - Microphone Usage Description: "Microphone access is required to share your audio during the WWDC watch party."
Your Info.plist file should look like this:
<key>NSCameraUsageDescription</key>
<string>Camera access is required to share your video during the WWDC watch party.</string>
<key>NSMicrophoneUsageDescription</key>
<string>Microphone access is required to share your audio during the WWDC watch party.</string>When the watch party app requests these permissions, the specified descriptions are displayed to the user, providing them with clarity on how the permissions will be used building trust and transparency between the app and the participants.
Implementing Basic WWDC Watch Party Functionality
A "session room" is a virtual space where users can join and watch WWDC sessions together in real-time.
Just like how each WWDC session has its own unique ID, you will want to create a distinct ID for the corresponding watch party room.
To model a session in your app, you can create a Session struct that encapsulates these properties. Here is how you define the Session struct:
struct Session: Identifiable {
let id: Int
let title: String
let videoURL: URL
let thumbnailURL: URL
}To provide sample data for testing, you can create an extension on the [Session] array that defines a static property called sampleSessions. This property will hold an array of predefined Session instances:
extension [Session] {
static let sampleSessions: Self = **[Session(](https://getstream.io/video/sdk/ios/tutorial/livestreaming/?utm_source=externalwriter&utm_medium=referral&utm_content=&utm_campaign=rudrank)**
i by Stream on creating an iOS live-streaming app with SwiftUI.
In the upcoming parts of this blog post series, we will be exploring how to enhance the WWDC watch party experience and integrate chat for discussion during sessions. We will also be diving deeper into Stream's Video SDK and exploring some of its more advanced features.Post Topics
Explore more in these categories: