Skip to content

Swift SDK that helps the support of Ziwo calls through websocket, Verto protocol and WebRTC.

License

Notifications You must be signed in to change notification settings

itecsupport/ziwo-sdk-ios

 
 

Repository files navigation

Ziwo SDK

Our team built a SDK that provides an easy way to integrate Ziwo calls to your iOS app. Written in Swift 5, joining WebSockets, Verto protocol and GoogleRTC, this SDK embed some of the basic features detailed below.

Features

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

Requirements

  • iOS 10.0+
  • Xcode 11+
  • Swift 5.1+

Installation

Use Cocoapods to add the SDK to your app.

pod 'ZiwoSDK'

Initialization

In order to setup the Ziwo SDK and the Verto protocol, follow the steps below.

  1. Set the domain.
ZiwoSDK.shared.domain = "test-domain.aswat.co"
  1. Once the agent is logged on Ziwo (.POST /auth/login), set the access token returned by the request.
ZiwoSDK.shared.accessToken = accessToken
  1. Notify Ziwo that the agent is connected and available (.POST /agents/autoLogin).

  2. Whenever you get the agent datas (.GET /profile), set the logged agent.

ZiwoSDK.shared.setAgent(agent: agent)
  1. Finally, initialize the Ziwo Client.
self.ziwoClient.initializeClient()
self.ziwoClient.delegate = self

Et voilà! ZiwoSDK is fully initialized and is now able to make and receive calls. (see ZiwoClientDelegate methods). The SDK is currently logging a lot of informations about the websocket and Verto protocol communication. If you want to deactivate the debug mode, set the vertoDebug boolean to false.

Example

For further informations about the implementation, you can check the example app available. Please check the documentation of ZiwoClient and its delegates (ZiwoClientDelegate).

  • To make a call
self.ziwoClient.call(number: "+33XXXXXXXXX")
  • To receive a call

Link the delegate ZiwoClientDelegate to your controller. Whenever someone will call ZiwoClientDelegate.vertoReceivedCall(callerID: String) will be triggered. At any moment, you'll be able to retrieve the informations about the call by calling ZiwoClient.findCall(callID: String).

Getting Help

  • Have a bug to report? Open a GitHub issue. If possible, include the version of ZiwoSDK, a full log, and a project that shows the issue.
  • Have a feature request? Open a GitHub issue. Tell us what the feature should do and why you want the feature.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

ZiwoSDK is released under the GNU GPVL3 license. See LICENSE for details.

About

Swift SDK that helps the support of Ziwo calls through websocket, Verto protocol and WebRTC.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 97.7%
  • Ruby 1.8%
  • Objective-C 0.5%