A Guide to migrating from RTVIClient to PipecatClient for iOS
RTVIClient
to the new PipecatClient
in an iOS (Swift) application. The new client introduces simplified configuration, modern messaging patterns, and improved function call handling. For an overview of the changes, see the top-level RTVIClient Migration Guide.
startBotAndConnect()
or connect()
methods, and the constructor takes only transport options.
Old
LLMHelper
have been removed. You now register function call handlers directly on the PipecatClient
.
Old
RTVIClient
constructor and it was expected to be in a specific format. Now, if you would like to pass any initial pipeline configurations, you do so as requestData
added to the endpoint you provide to startBot()
or startBotAndConnect()
. In both cases, you would need server-side code to parse and apply these settings, but now you can define the structure and what pieces of configuration you want to send.
Check out this section of docs for an example, complete with server-side code showing how to initialize the pipeline configuration at connection time.
appendToContext()
:
sendClientRequest()
) to wait for a response.
getConfig()
, updateConfig()
, describeConfig()
, onConfigUpdated
, onConfigDescribed
, etc.
action()
, describeActions()
, onActionsAvailable
, etc.
appendToContext()
sendClientRequest()
sendClientMessage()
disconnectBot()
registerFunctionCallHandler()
/ unregisterFunctionCallHandler()
/ unregisterAllFunctionCallHandlers()
PipecatClientIOS
and PipecatClientIOSDaily
.startBotAndConnect()
or connect()
methods.registerFunctionCallHandler()
.appendToContext()
.sendClientMessage()
or sendClientRequest()
for custom messages.unregisterAllFunctionCallHandlers()
and disconnect()
.