If you have been into software development, you must already be familiar with the term SDK or Software Development Kit. It is the one thing you cannot forgo while attempting to develop software. But for those who might still be alien to SDK, today we will be spending the next few minutes to discuss SDK, to be specific, ZIWO SDK for iOS.

Defining SDK

SDK is the acronym for ‘Software Development Kit’ and refers to a kit that comprises a set of tools, sample codes, archives, processes, and sometimes even guidelines that enable developers to build software applications for any platform, be it for android or iOS. With “Software Development Kit”, developers can create systems and develop applications, while APIs (Application Programming Interface) on the other hand, is tailor-made for a specific use – to enable communication between applications.

(Learn more about APIs at https://www.ziwo.io/why-is-api-key-to-your-business/)

Introduction to ZIWO SDK for iOS and its features

ZIWO team has developed the ZIWO SDK class, a singleton that is used to recuperate data related to ZIWO when the Agent is logged in.

It offers an easy way to integrate ZIWO calls into the iOS application. besides, it is coded in Swift 5 – an industrial-quality programming language, developed using a modern approach to performance, security, and software design patterns. Swift 5 is a fast, secure, and interactive programming language that is extremely popular among iOS developers and the open-source developers’ community.

ZIWO developers team has integrated this highly expressive and interactive SDK with WebSockets, Verto protocol, and WebRTC.  Not to mention, WebSocket is an advanced computer communications protocol that offers full-duplex communication channels over a single TCP connection and enables the initiation of a two-way interactive communication session between the user’s browser and server.

On the other hand, Verto is a JSON-based protocol that along with WebSocket allows a web browser (JSON + WebSockets result in a bidirectional capability of instantaneous information exchange) to initiate a call. WebRTC is used for state-of-art real-time communication in browsers and mobile apps.

Below is an instance of Verto WebSocket to communicate with Verto protocol.

“Declaration

Swift

public var vertoWebSocket: VertoWebSocket?”

and an example of RTC answer message

struct RTCAnswerMessage

extension RTCAnswerMessage: RTCMessageBuilderProtocol

extension RTCAnswerMessage: RTCMessageParserProtocol

Type used to handle RTC Candidates received by GoogleRTC external library.

ZiwoClient is the main class of the “Software Development Kit”. Through this class, the WebSocket that will be used to communicate with Verto is initialized. The delegates will tell the developer when a call is received, when a call starts and when a call is terminated. It also provides information about WebSocket that is linked to the Verto protocol.

Below are the ZIWO SDK embed features:

  • Verto authentication
  • Call agent or external number
  • Receive a call from an agent or external number
  • Mute microphone during a call
  • Set the audio source to the speaker during a call
  • Hold / Unhold an ongoing call

You can use CocoaPods to add the SDK to your app. CocoaPods is built with Ruby and is installable with the default Ruby available on macOS or iOS.

How to use the ZIWO SDK?

In order to set up the Ziwo SDK and the Verto protocol, follow the steps below:

1. Set the domain : ZIWO SDK.shared.domain = “test-domain.aswat.co”

2. Once the agent logs in to Ziwo (.POST /auth/login), set the access token returned by the request.
ZIWO SDK.shared.accessToken = accessToken

3. Notify Ziwo that the agent is connected and available (.POST /agents/autoLogin).Whenever you get the agent data (.GET /profile), set the logged agent.ZIWO SDK.shared.setAgent(agent: agent)

4. Finally, initialize the Ziwo Client.
self.ziwoClient.initializeClient() self.ziwoClient.delegate = self

ZIWO SDK is released under the GNU GPVL3 license.

This SDK is a major shift for iOS users to start using ZIWO calls through their iOS apps.

Learn More About ZIWO Here