iOS Calling UI SDK
The Calling UI SDK for iOS native app developers minimizes your coding effort for integrating with the CallKit interface. Using the EnableX Calling UI framework, you can enable an app-to-app calling feature in less than 5 minutes alongwith the EnableX UIKit.
iOS Calling UI SDK v1.0.2
Released: August 20, 2024EnableX also provides a powerful UIKit using which you can create audio and video UI in a few lines of code.
For more information, see IOS UI Kit.
Pre-requisites
You must meet the following requirement to enable the Calling UI framework in your existing application:
- The VoIP feature is enabled for the application in the background mode.
- Notification service is integrated with the application as EnableX does not provide it.
Integrate in IOS Native App
Install Enx_CallKit_iOS
SDK either through pod or manually.
To install through pod
- Open terminal
- Go to your project directory
cd /path-to/project-dir/pod install
- Open your App.
- Go to the class where you receive push notification.
- Import
Enx_CallKit_iOS
.
import Enx_CallKit_iOS
- Create an object of
EnxCallKit
class.
var callManager = EnxCallKit(self)// self: Sets the the callback delegate
- On receiving notification, call APIs.
let backGroundTaskIndet = UIApplication.shared.beginBackgroundTask(expirationHandler: nil)callManager.reportIncomingCall(uuid: UUID(), callerName: "Caller Name", hasVideo: true) {_in UIApplication.shared.endBackgroundTask(backGroundTaskIndet)}
- Add background task before loading the Calling UI.
- End the background task once Calling UI is loaded.
- To end call, use the following method. This will close Calling UI.
callManager.endCall();
Callbacks
Make use of the following callbacks to create the user experience:
func callAnswer()
: To receive an incoming call.func callReject()
: To reject an incoming call.func callTimeOut()
: To timeout an incoming call in 45 seconds whose notification is not responded to.func callEnd()
: To end the call.func callHold()
: To keep the call on hold.