Building a FaceTime app for iOS using 100ms

What's this blog post about?

This blog provides a step-by-step guide on how to build a basic FaceTime clone app using the 100ms SDK in iOS. The prerequisites include understanding of iOS development, SwiftUI basics, and third party integration. The application structure consists mainly of two views: ContactListView and FacetimeView. The ContactListView displays all contacts, while the FacetimeView is where the video call takes place. The 100ms SDK is integrated using SPM (Swift Package Manager), and a free account on 100ms.live is created to obtain roomID and tokenEndpoint. These two key information help connect the facetime application to the room and share the room invite with other peers. The video conferencing template in 100ms has roles like Guest and Host, which can be modified or new ones added as per requirement. The FacetimeView file is extended to listen back from the 100ms server using HMSSDK. A VideoView struct is created using UIViewRepresentable for displaying video frames of both contacted person and current user in FacetimeView. The hmsSdk object, token provider object, viewModel object, and other tracks objects are declared before adding the video view to the View. The joinRoom() method uses the roomID in the token provider's getToken() call, while listen() methods listen to changes in peer track from 100ms server. Three actionable events - switchCamera(), muteMic(), and stopCamera() are created with respective button actions built inside videoOptions object of type some View. The endRoom() method is used to end the call. The project can be found on Github, allowing users to experiment further by playing with role types and their permissions.


Date published
March 2, 2022

100ms team

Word count

Hacker News points
None found.


By Matt Makai. 2021-2024.