Migration paths for the mobile Client SDKs
This guide notes changes between versions of the Daily mobile Client SDKs and gives information on how to adapt your code to them as needed. Some notes regard breaking changes, while others may just cover new optional patterns, parameters, or quality of life improvements.
If you are moving ahead by multiple versions, you should consider each version's section in turn, rather than jumping to the most recent.
0.7.0
iOS
Many methods have been made non-throwing and given an asynchronous completion closure, which allows for an alternative and more fine-grained and in-place control flow management.
Before:
After:
The experimental closure-based syntax (introduced in 0.4.0) has been removed in favor of a less noisy and less verbose variant of the existing enum-based syntax.
Before:
After:
This new syntax is effectively a more ergonomic variant of the enum-based syntax. The enum-based syntax remains available and would look as follows in comparison:
The only difference between the existing enum-based syntax and the new syntax is the reduction of
.set(.init(…))
to just.set(…)
.
0.6.0
iOS
CallState.new
has been renamed toCallState.initialized
, to avoid conflicts with language keywords.Event listeners are now defined via a Delegate, to reduce boilerplate for managing basic call info.
- Before:
- After:
Below is a list of the methods you can override as of this version:
To complement that change, we've added synchronous getters for most common call properties, so you don't need to do event-based bookkeeping for all these commonly-needed attributes:
Android
CallState.new
has been renamed toCallState.initialized
, to avoid conflicts with language keywords.The
VideoView
now automatically releases its resources when it is detached from the window.The
CallClient
has been modified so that all blocking operations can be performed asynchronously.The following methods have an extra (optional) listener parameter, that can be used to handle the request completing or encountering an error:
setUserName()
setAudioDevice()
updateInputs()
updateSubscriptions()
updateSubscriptionProfiles()
updatePublishing()
leave()
The
join()
method now has a mandatory listener parameter (see below).Methods in
CallClient
which were previouslysuspend
are no longersuspend
, but rather enqueue the operation to be completed in the background, and immediately return. The listener associated with each API call will be notified when the operation completes.- If you are using Kotlin Coroutines, a new wrapper class
CallClientCoroutineWrapper
has been added which exposessuspend
functions rather than listeners. Depending on your preference, you may use this class instead ofCallClient
.
- If you are using Kotlin Coroutines, a new wrapper class
The signature of the
CallClient.join()
method has changed to add a listener parameter.Before:
After:
Below is an example of the join call with a listener:
0.5.0
iOS
The signature of the
CallClient.join()
method has changed to allow for a meeting token to be specified.Before:
After:
Android
The signature of the
CallClient.join()
method has changed to allow for a meeting token to be specified.Before:
After: