BotsConfiguration

public final class BotsConfiguration : NSObject

Initializes the url, userId, channelId and carries the features flags settings for the app.

  • Speech recognition is enabled when set to true, disabled when set to false. Default is false.

    Declaration

    Swift

    public var enableSpeechRecognition: Bool
  • Shows connection status in the navigation bar when set to true. Default is false.

    Declaration

    Swift

    public var showConnectionStatus: Bool
  • Shows typing status in the navigation bar when set to true. Default is true

    Declaration

    Swift

    public var showTypingStatus: Bool
  • Enables attachment upload when set to true. Default is true.

    Declaration

    Swift

    public var enableAttachment: Bool
  • Requires a non-empty string, to send a hidden message to the bot at the start. Default is an empty string, which does not send any hidden message.

    Declaration

    Swift

    public var initUserHiddenMessage: String
  • Requires a non-empty [String: Any] object to update user profile at the start before sending the initUserHiddenMessage if set. Default is an empty [:] object, which does not update the user profile.

    Declaration

    Swift

    public var initUserProfile: [String : Any]?
  • Disable past actions. Takes three values: “all” - disable all past actions. “none” - disable none of the past actions. “postback” - disable only the postback past actions. Default is “all”

    Declaration

    Swift

    public var disablePastActions: String
  • Displays timestamp below every message when set to true. Default is true.

    Declaration

    Swift

    @available(*, deprecated, message: "Timestamp enable/disable is controlled by timestampMode property. Setting it to \"none\" disables timestamp feature. Please avoid using this property as it will be removed in future releases.")
    public var enableTimestamp: Bool
  • Enables audio narration of the bot response when set to true. Adds a button for mute/unmute on the navigation bar. Default is false.

    Declaration

    Swift

    public var enableSpeechSynthesis: Bool
  • Sets the default state of speech synthesis for audio response to be muted when set to true. Default is true.

    Declaration

    Swift

    public var initSpeechSynthesisMuted: Bool
  • Displays a button on the navigation bar which on click clears all the conversation history for the particular userId and channelId when set to true. Default is false.

    Declaration

    Swift

    public var enableClearMessage: Bool
  • Enables notifications after receiving a message, when the application is in background. Default is true.

    Declaration

    Swift

    public var enableNotification: Bool
  • Sets the timeout for the typing status (in case no message is received from the chat server) in seconds. Default value is 30 seconds.

    Declaration

    Swift

    public var typingStatusTimeout: Int
  • Automatically sends the speech response received to the chat server if set to true. If set to false, will render the response in the text field, thereby giving the user the option to decide.

    Declaration

    Swift

    public var enableAutoSendSpeechResponse: Bool
  • Takes a preference list of the (language-locale, voice_name) pair for the voice for speech synthesis. For eg. (“en-US”, “Fred”). First, an exact match is searched for the pair of language-locale and voice name. If no match is find found, then the Apple API tries to find the best match voice for the given locale. If no preference is provided, the default voice would be used.

    Declaration

    Swift

    public var speechSynthesisVoicePreferences: [SpeechSynthesisVoice]?
  • Sets the language the speech is expected to be sent in. The default is “en-us”

    Declaration

    Swift

    public var speechLocale: String
  • Allows the user to choose the options available as part of the attachment menu. The default value is set to a list of all available menu items.

    Declaration

    Swift

    public var shareMenuConfiguration: ([ShareMenuItem], [ShareMenuCustomItem])
  • Allows the user to choose a specific timestamp format in the form of a string. The default format is “E MMM d, HH:mm a”

    Declaration

    Swift

    public var timestampFormat: String
  • Allows the user to pass a UIImage which is placed on the header. The default alignment is to the left side of the header. The user can however set it to the right by setting the headerLogoAlignment property to NSTextAlignment.right.

    Declaration

    Swift

    public var headerLogo: UIImage?
  • Sets the alignment of the header logo if passed. The default value is NSTextAlignment.left.

    Declaration

    Swift

    public var headerLogoAlignment: NSTextAlignment
  • Sets the timestamp type if the timestamp is enabled for conversation. The possible options are TimestampMode.default or TimestampMode.relative

    Declaration

    Swift

    public var timestampMode: TimestampMode
  • Enables sending security headers with attachment upload requests for client auth enable conversations.

    Declaration

    Swift

    public var enableAttachmentSecurity: Bool
  • Sets the supported and the primary chat language. It accepts an instance of MultiLangChat.

    Declaration

    Swift

    public var multiLangChat: MultiLangChat?
  • Enables displaying the previous conversation history on loading.

    Declaration

    Swift

    public var displayPreviousMessages: Bool
  • Sets the TTS service to be used for speech synthesis. When the feature flag is not set, the default iOS TTS is used.

    Declaration

    Swift

    public var ttsService: TTSService?
  • Enables showing default client responses whenever there is delay in receiving response from the skill.

    Declaration

    Swift

    public var enableDefaultClientResponse: Bool
  • Device token to be passed to the server to enable push notifications.

    Declaration

    Swift

    public var deviceToken: String?
  • Enabled end conversation feaure, allows users to reset the chat session.

    Declaration

    Swift

    public var enableEndConversation: Bool
  • A flag to control sending of the user typing status

    Declaration

    Swift

    public var enableSendTypingStatus: Bool
  • Interval in seconds to throttle the typing event and sending of the typing status. Typing status event will be sent to Service Cloud after every <3 sec> by default.

    Declaration

    Swift

    public var typingStatusInterval: Int
  • If enabled, text being typed by the user is sent to Agent. Otherwise , “…” is sent to Agent.

    Declaration

    Swift

    public var enableAgentSneakPreview: Bool
  • Number of reconnection attempts to make before showing ‘connectionFailureMessage’

    Declaration

    Swift

    public var reconnectMaxAttempts: Int
  • The constructor for initializing a BotsConfiguration object when client authentication is disabled and the userId is not entered. The userId will be randomly generated in this case.

    Declaration

    Swift

    public init(url: String, channelId: String)

    Parameters

    url

    The chat server url.

    channelId

    The channelId of the Oracle iOS channel you want to connect to.

  • The constructor for initializing a BotsConfiguration object when client authentication is disabled.

    Declaration

    Swift

    public init(url: String, userId: String, channelId: String)

    Parameters

    url

    The chat server url.

    userId

    The userId of the user.

    channelId

    The channelId of the Oracle iOS channel you want to connect to.

  • The constructor for initializing a BotsConfiguration object when client authentication is enabled. Make sure you conform to the AuthenticationTokenProvider protocol and implement the getAuthToken() function to generate an authToken whenever required, by the SDK.

    Declaration

    Swift

    public init(url: String)

    Parameters

    url

    The chat server url.