runConversation
Submits a request to start the loaded Conversation.
Declaration
public func runConversation() -> STResultOverview
The runner must be initialized, Conversation-framework permission must be available, and the Conversation manager must be idle. Failure of those prerequisites returns .conversationNotInitialized, .permissionDenied, or .conversationNotIdle respectively.
A .success result means the request to run was accepted. Conversation execution then proceeds through the runtime and application callbacks.
Preparing a conversation
Before calling runConversation(), initialize the runner, load the conversation configuration using loadConversation (URL) or loadConversation (JSON), and load any supporting configuration data required by that conversation (for example, audio prompt modules and audio-to-text mappings). Configure resource locations and the language folder as appropriate for file-based loads; ensure referenced audio and other resources are present in their configured directories. Register the conversation callback and configure required execution settings before starting. Not every conversation uses every supporting resource type.
Request versus completion
A successful STResult confirms that the request to start execution was accepted; it does not mean the conversation has completed. Observe STConversationCallback for asynchronous execution and completion events.
Usage example
let requestResult = conversation.runConversation()
if requestResult != .success {
// Handle request submission failure.
}
Result handling
This method returns an STResult. Check the returned value for success or failure.