/plushcap/analysis/videosdk/videosdk-building-a-voip-call-app-with-callkit-on-ios

Building a VoIP Call App with CallKit in iOS

What's this blog post about?

In this tutorial, we have built an iOS application that can make and receive video calls using Firebase Cloud Messaging (FCM) for push notifications and Video SDK for video conferencing. We used SwiftUI to build the UI of the app and implemented CallKit functionality to handle incoming call alerts and manage call answering/rejecting actions. We started by setting up our development environment, including installing Xcode, Firebase CLI, and Video SDK SDKs. Then we initialized a new SwiftUI project in Xcode and configured the necessary dependencies for Firebase and Video SDK. Next, we created the UI screens for JoinView, CallingView, and MeetingView using SwiftUI components like VStack, HStack, Text, Image, Button, etc. We also implemented navigation between these views based on user actions such as tapping buttons or answering/rejecting incoming calls. To handle push notifications from Firebase Cloud Messaging (FCM), we implemented a NotificationManager class that listens for incoming notifications and triggers corresponding actions in the app, such as transitioning to the CallingView when an incoming call notification is received. For video conferencing functionality, we used Video SDK's iOS SDK. We initialized a new meeting using the `VideoSDK` object provided by the SDK and managed the lifecycle of the video call within the MeetingView. Finally, we implemented CallKit functionality to handle incoming call alerts and manage call answering/rejecting actions. We configured our app as a VoIP provider with iOS and implemented delegate methods for handling incoming calls (`provider(_:perform:)`) and ending ongoing calls (`provider(_:didPerformEndCallAction:)`). With these, iOS devices should now be able to receive the call and join the video call. This is what the incoming call on an iOS device looks like.

Company
Video SDK

Date published
Nov. 12, 2024

Author(s)
Video SDK Team

Word count
6162

Language
English

Hacker News points
None found.


By Matt Makai. 2021-2024.