- iOS 12.1 and above
The SDK is already compiled into a Framework. To use the SDK, the below frameworks has to be imported into the project.
- Create a new iOS project or Open a existing project
- Add the following frameworks to the project
- Add the following dependencies in podfile.target 'FlyCall' douse_frameworks!pod 'libPhoneNumber-iOS', '~> 0.8'pod 'SocketRocket'pod 'Socket.IO-Client-Swift', '~> 15.2.0'pod 'GoogleWebRTC'pod 'Floaty', '~> 4.2.0'pod 'AlamofireImage', '~> 4.1'end
SDK requires some initial configurations to be set in your application class. Initialize the below CallSDK builder in your app's AppDelegate's
|USER_ID||Unique Id of the User|
|BASE_URL||Base url for API Service|
|SIGNAL_SERVER_URL||URL of the Signal Server|
|JANUS_SERVER_URL||URL of the Janus Server|
|APP_GROUP_ID||Id of the app group|
|ICE_SERVER_LIST||Ice servers list( STUN,TURN)|
|CALLMANAGER_DELEGATE||Delegate provided by the call sdk|
|CALL_VIEW_CONTROLLER||ViewController which needs to be presented during outgoing call.|
- RTCIceServer is the class on GoogleWebrtc. Pass an array of RTCIceServers in ICE_SERVERS_LIST(STUN and TURN servers)
Call the above builder after the unique user id is available and in the AppDelegate's
didFinishLaunchingWithOptions with a condition of isLoggedin
or isUserId available logic based on your app.
Call SDK also requires the application to enable the below capabilities for voip calls to function seamlessly without any issues.
|Audio,Airplay, and Picture in Picture|
|Voice over IP|
To receive calls in the background and in killed state, kindly register for remote as well for voip notification by conforming to the following delegates in the AppDelegate
Call the below methods when an APNS token or VOIP token gets updated.
|TOKEN||Apns or Voip Token|
In class that extends the
UNNotificationServiceExtension after validating whether the received payload is for call or not, call the below method
to process the call further.
|NOTIFICATION_CONTENT||Notification request content|
Send the payload received through VOIP from the method
didReceiveIncomingPushWith to the method below to process the call further.
To register a new user use the below method,
|USER_IDENTIFIER||Unique Id to Register the User|
|APNS_TOKEN||APNS device token|
|VOIP_TOKEN||VOIP Push device token|
In order to access data between app and notification extension, enabling app group is mandatory, and a group container id is necessary for call sdk to function properly.
|APP_GROUP_ID||Id of the application App group|
Sets the group container id in AppDelegate's
and in the
didReceive methods of the class that extends
UNNotificationServiceExtension before calling any other Call SDK methods even before the Call SDK Builder method.
Call SDK handles the UI presentation for an outgoing call. Call the below method after declaring the Call SDK and or before making a call.The below method sets the view on top of which the call ui will be presented.
|VIEW_TO_PRESENT||ViewController in which Call UI has to be presented.|