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.
- 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
- iOS 10.0+
- Xcode 11+
- Swift 5.1+
Use Cocoapods to add the SDK to your app.
pod 'ZiwoSDK'
In order to setup the Ziwo SDK and the Verto protocol, follow the steps below.
- Set the domain.
ZiwoSDK.shared.domain = "test-domain.aswat.co"
- Once the agent is logged on Ziwo (
.POST /auth/login
), set the access token returned by the request.
ZiwoSDK.shared.accessToken = accessToken
-
Notify Ziwo that the agent is connected and available (
.POST /agents/autoLogin
). -
Whenever you get the agent datas (
.GET /profile
), set the logged agent.
ZiwoSDK.shared.setAgent(agent: agent)
- 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
.
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)
.
- 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.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
ZiwoSDK is released under the GNU GPVL3 license. See LICENSE for details.