App Development Settings

Here is a reference to the settings you may use in the development of the app for your iOS channel.

Initialize the Feature Flag Settings

Initialize BotsConfiguration object using one of its constructors.
  • clientAuthDisabled
    • BotsConfiguration(url: String, userId: String, channelId: String)
      • Parameters:
        • url - The Oracle Chat Server URL. This cannot be null.
        • userId - The unique identifier for the user. This cannot be null.
        • channelId - The Oracle iOS Channel ID. This cannot be null.
      • When the userId not provided (a randomly generated value is instead)
        • url - The Oracle Chat Server URL. This cannot be null.
        • channelId - The Oracle iOS Channel ID. This cannot be null.
  • clientAuthEnabled
    • BotsConfiguration(url: String, authToken: String)
      • Parameters:
        • url - The Oracle Chat Server URL. This cannot be null.
        • authToken - The authentication token for establishing a connection with an authentication-enabled channel. This cannot be null.
For example:
// Initialize a BotsConfiguration object
var botsConfiguration = BotsConfiguration(url: chatServerUrl, authToken: token)
 
// Set the feature flag values if the desired values are different from the default values
botsConfiguration.showConnectionStatus = true
botsConfiguration.enableBotAudioResponse = true
botsConfiguration.disablePastActions = "none"

Network Configuration

Property Name Description Required? Default Value
url The URL of the Oracle Chat Server Yes N/A
channelId The ID of the Oracle iOS channel. Yes N/A
userId The unique identifier for user. This value gets initialized by the SDK if not provided. No A randomly generated value
authToken The authentication token for establishing a connection with an authentication-enabled channel. Yes N/A

Feature Flags

Property Description Required? Default Value
disablePastActions A field for disabling the button clicks on the messages that a user has already interacted with. The allowed values are all, none, and postback. The behavior enabled by this property is independent of the digital assistant-level configuration for disabling the selection of past actions. You need to set the two separately. No all
displayPreviousMessages Enables, or disables, the user's local conversation history. No false
enableAgentSneakPreview If enabled, the agent can view the user message as it is being typed, even before the user sends the message. Otherwise, ... is sent to the agent. No false
enableAttachment Configures attachment sharing in the chat app. No true
enableAttachmentSecurity When set to true, extra headers are passed to the attachment upload requests to ensure that they can't be downloaded without passing a valid signed JWT token as an authorization header.

Note: Do not enable this setting if the skill connects to an ODA instance that's Version 20.08 or runs on any version prior to 20.08. This property only applies to client auth-enabled connections to Versions 20.12 and higher of the ODA platform.

No false
enableAutoSendSpeechResponse When set to true (the default), the user's speech response is automatically sent to the chat server (and rendered as a sent message in the chat window). When set to false, the user's speech response is rendered in the message text field before it's sent to the chat server, allowing the user to modify it before sending it manually, or delete the message. No true
enableClearMessage Enables the clear message button in the chat widget header. No false
enableDefaultClientResponse When set to true, the client displays default responses when the skill response has been delayed, or when there's no response from the skill. No false
enableEndConversation Enables the user to end the conversation and reset the chat session. It also clears the local conversation history, disconnects from the chat server, and minimizes the widget. No true
enableSendTypingStatus Controls the sending of the user typing status. No false
enableSpeechRecognition Enables the microphone button. No false
enableSpeechSynthesis Enables the skill responses to be read aloud. By setting this flag to true, you enable the skill's responses to be read aloud using Swift API. No false
enableTimestamp Enables the timestamp for messages. You can set the timestamp display mode as absolute or relative using the timestampMode setting. No true
headerLogo Passes a UIImage object, which is placed on the header. The default alignment is on the left side of the header. To place it on the right, set the headerLogoAlignment property to NSTextAlignment.right. No N/A
headerLogoAlignment Sets the alignment of the header logo, if passed. No NSTextAlignment.left
initSpeechSynthesisMuted Sets the default state of BotAudioResponse as muted or unmuted. No true
initUserHiddenMessage A user text message that's used to initiate a conversation. This message, which is sent when chat widget is ready, does not actually display in chat. No N/A
initUserProfile Initializes the user profile before the start of the conversation. The format of the profile payload must be ["profile": […] ]. For example:
initUserProfile = ["profile": ["givenName": "First", "surname": "Last", "email": "first.last@example.com", "properties": ["lastOrderedItems": "1 medium pepperoni"]]]
This function updates the user context before the initial "hidden" message is sent by initUserHiddenMessage to start the conversation. As a result, the user profile can be reflected in the first response message to the user. For example, the skill can greet the user with a message like "Welcome back, John Smith! Your last order was a medium pepperoni pizza."
No N/A
multiLangChat Enables the chat widget to both detect a user's language and allow the user to select a preferred language from a dropdown menu in the header for conversation.    
reconnectMaxAttempts The number of attempts made by the chat widget to reconnect when the initial connection fails. No 5
sharePopupConfiguration Allows the user to choose the options available as part of the attachment menu. The default value is set to a list of all options. No [.photoAndVideoLibrary, .files, .camera]
showConnectionStatus Enables the connection status to display in the chat widget header. No false
showTypingStatus Displays the typing indicator when waiting for skill's response. No true
speechLocale The expected locale of the user's speech that's used for voice recognition. US English ('en-US') is the default locale. The other supported locales are: Australian English ('en-au'), UK English ('en-uk'), French ('fr-fr'), German ('de-de'), Italian ('it-it'), Brazilian Portuguese ('pt-br'), and Spanish ('es-es'). The speech locale can be set dynamically by calling the setSpeechLocale('<locale>') API. Voice recognition will not work if an unsupported locale has been passed. No en-us
speechSynthesisVoicePreferences Matches the provided preferences based on both the language-locale and voice name. If no match is found, then the default voice for the given language-locale is used. In the latter case, the Apple API finds the best match with the given language-locale. No N/A
timestampFormat Formats the delivery timestamp that accompanies messages. The timestamp format should be supported by the Swift DateFormatter. No E MMM d, HH:mm a
timestampMode If you enable timestamps by setting enableTimestamp to true, you can use set the timestamp mode as either absolute timestamps that appear on each message, or as a relative timestamp that appears only on the latest message.
  • TimestampMode.default – Sets an absolute timestamp on each message.
  • TimestampMode.relative – The timestamp displays before the first message of the day as an absolute timestamp in a header, and then as a relative timestamp for the new messages as an updating timestamp indicating the time passed since the message was added in the conversation. The relative timestamp updates at set intervals until a new message is received.
No TimestampMode.relative
title Sets the title of the app, which is displayed in the app bar. No N/A
ttsService An instance of type TTSService which used for injecting a text-to- speech (TTS) service. Applicable only if enableSpeechSynthesis is set to true. No  
typingStatusInterval The interval, in seconds, to throttle the typing event and the sending of the typing status. No 3
typingStatusTimeout Sets the timeout, in seconds, to hide the typing status indicator when no response has been received from the chat server. No 30 secs

Strings

Configure strings by adding the following key = value pairs in the app's <language-code>.iproj/Localizable.strings file.
Key Description Default Value
connectionFailureMessage The message that displays after the number of attempts set by reconnectMaxAttempts have been exhausted. Sorry, the assistant is unavailable right now. If the issue persists, contact your help desk.
connectionRetryLabel The default string for the retry button that displays with connectionFailureMessage. Try Again
end_conversation_action_yes The text for the confirm button in the end session confirmation prompt. Yes
end_conversation_alert_message The message body of the end conversation confirmation prompt. This will also clear your conversation history
end_conversation_alert_no The text for the decline button in the end session confirmation prompt. No
end_conversation_alert_title The title for the end conversation confirmation prompt. Are you sure you want to end the conversation?
odais_access_label_audio_attachment The accessibility label for an audio attachment message audio attachment
odais_access_label_button_attach The accessibility label for the upload attachment button. Upload attachment
odais_access_label_button_audio_reponse_off The accessibility label for the muted volume button Unmute audio response
odais_access_label_button_audio_reponse_on The accessibility label for the unmuted volume button. Mute audio response
odais_access_label_button_back The accessibilty label for the back button. Go back
odais_access_label_button_card_navigation_left The accessibility label for the left navigation button for the horizontal card view. Card navigation right
odais_access_label_button_card_navigation_right The accessibility label for the right navigation button for the horizontal card view. Card navigation left
odais_access_label_button_clear The accessibilty label for the clear message button Clear messages
odais_access_label_button_keyboard The accessibility label for the keyboard button. Enter message
odais_access_label_button_overflow The accessibility label for a overflow menu button. Open Menu
odais_access_label_button_select_language The accessibility label for select language button. Select Language
odais_access_label_button_send The accessibility label for the send button Send message
odais_access_label_button_speak The accessibility label for the mic button Speak message
odais_access_label_card_desc The accessibility label for a card description that's followed by the text card description
odais_access_label_card_title The accessibility label for a card title that's followed by the text card title
odais_access_label_chat_status The accessibility label for the chat status which is followed by the status string Chat status
odais_access_label_chat_title The accessibility label for the chat title which is followed by the chat title string Chat title
odais_access_label_file_attachment The accessibility label for a file attachment message file attachment
odais_access_label_footer_text The accessibility label for a footer text that's followed by the text footer text
odais_access_label_header_text The accessibility label for a header text that's followed by the text header text
odais_access_label_image_attachment The accessibility label for an image attachment message image attacment
odais_access_label_location_message The accessibility label for a location message that's followed by the location message title and the latitude and longitude location message
odais_access_label_pause The accessibility label for the pause button. Pause
odais_access_label_play The accessibility label for the play button Play
odais_access_label_skill The accessibility label for a skill message payload read by VoiceOver (the iOS Accessibility feature). This label is then appended with the message specific label. Skill
odais_access_label_text_message The accessibility label for a text message that's followed by the text text message
odais_access_label_user The accessibility label for a user message payload read by VoiceOver (the iOS Accessibility feature). This label is then appended with the message specific label. User
odais_access_label_video_attachment The accessibility label for a video attachment message video attachment
odais_access_label_webview_clear_button The accessibility label for the WebView clear button in the in-widget webview. Close webview
odais_access_label_webview_title The default accessibility label for the title of the in-widget Webview. Webview title
odais_alert The title of the alert message displayed for speech and file-related errors. Alert
odais_camera The action text that appears on the attachment popup for using the device's camera. Camera
odais_camera_permission_denied The error message that's displayed when camera access is not allowed. Camera permission denied.
odais_chat_title The title of the app that's displayed on the app bar. Digital Assistant
odais_check_url The error message displayed for a broken link in the webview. Please check the url!
odais_clear_chat The title of the clear chat button in the overflow menu. Clear Chat
odais_connected The status text that displays when the connection between chat widget and the Oracle chat server has been established. Connected
odais_connecting The status text that displays while the chat widget connects to the Oracle chat server. Connecting
odais_default_greeting_message The default greeting response. Hey, Nice to meet you! Allow me a moment to get back to you.
odais_default_sorry_message The default response when the wait time for message expires. I'm sorry. I can't get you the right content. Please try again.
odais_default_wait_message The default response that displays while waiting for the skill message. I'm still working on your request. Thank you for your patience!
odais_disconnected The status text that displays when the connection between the chat view and the Oracle chat server has closed. Disconnected
odais_done The label text for the button that closes the chat view. Done
odais_download_attachment_folder The name of the folder created inside the applications folder for saving attachments. The default value is an empty string. An empty string.
odais_error The title of the webview-related error and alert messages. Error
odais_fail_to_load The error message displayed when the page can't load in in the webview. The text inside the curly braces ({}) will be linkified with the link to open in the default browser. Sorry, we can't open this page in the chat window. Click {here} to open it in your browser.
odais_file_not_supported The alert message displayed when the user selects file type that's not supported for attachments. File type not supported
odais_file_size_warning The alert message that's displayed when the file chosen for attachment exceeds the max attachment size limit. The text {0} is replaced by the max attachment size limit set. The default max attachment size limit is 25MB. You can only attach files of size up to {0}MB.
odais_files The action text that appears on the attachment popup for choosing a file from storage. Files
odais_gallery_permission_denied The alert message displayed when permission to the gallery has not been granted. You don't have permission to access gallery.
odais_language_ar The default string for displaying the Arabic language in the drop-down menu unless otherwise provided. Arabic
odais_language_de The default string for displaying the German language in the drop-down menu, unless otherwise provided. German
odais_language_detect The default string for displaying Detect Language in the drop-down menu, unless otherwise provided. Detect Language
odais_language_en The default string for displaying the English language in the drop-down menu, unless otherwise provided. English
odais_language_es The default string for displaying the Spanish language in the drop-down menu, unless otherwise provided. Spanish
odais_language_fr The default string for displaying the French language in the drop-down menu, unless otherwise provided. French
odais_language_it The default string for displaying the Italian language in the drop-down menu, unless otherwise provided. Italian
odais_language_nl The default string for displaying the Dutch language in the drop-down menu, unless otherwise provided. Dutch
odais_language_pt The default string for displaying the Portuguese language in the drop-down menu, unless otherwise provided. Portuguese
odais_location_disabled The error message that's displayed when location services are disabled. Location services not enabled. Please enable the Location Services switch in Settings > Privacy.
odais_location_fetch_error The error message that's displayed when the SDK is not able to fetch the current device location. Error in getting device location. Please check location settings or try again.
odais_location_permission_denied The error message that's displayed when location access is not allowed. Location Permission Denied.
odais_mute The title of the mute button in the overflow menu. Mute
odais_no_speech_error The alert message that'sdisplayed when no audio content is sent to the speech server (the user hasn't spoken). Could not detect the voice, no message sent.
odais_notification_title The title displayed on the notifications bar. OracleChatBot
odais_ok The label text for the button that closes alert and error messages. Ok
odais_photo The action text that appears on the attachment popup for choosing a file from phone's gallery. Photo & Video Library
odais_select_language The title of the select language button in the overflow menu. Select Language
odais_speak_your_message The placeholder text for the user message input field in speech mode Start speaking
odais_speech_cancel The button label text on the speech popup for cancelling the sending of recorded audio to the speech server. CANCEL
odais_speech_error The alert message that's displayed when the audio cannot be recorded. Error in voice recognition. Please try again later.
odais_speech_permission_denied The error message displayed when microphone usage is not allowed. Permission_Denied
odais_speech_start The text displayed on the speech popup indicating that the user can now start speaking. Listening...
odais_speech_unsupported_locale The error message displayed when the set speech locale is not supported by the speech server. The set speech locale is not supported. Cannot start recording.
odais_stars_rating The message that's read aloud when the user clicks a feedback button while in accessibility mode Rate {0} star
odais_subtitle The subtitle of the chat widget that's displayed below the title in the header . If showConnectionStatus is set to true, and the subtitle is set as well, the subtitle is displayed instead of the connection status. N/A
odais_timestamp_days The relative timestamp that displays every day since the previous message was received. {0} is replaced by the number of days that have passed. {0}d ago
odais_timestamp_hours The relative timestamp that displays every hour for the first 24 hours after the previous message was received. {0} is replaced by the number of hours that have passed. {0}hr ago
odais_timestamp_minutes The relative timestamp that displays every minute since the last message was received. {0} is replaced by the number of minutes that have passed. {0}min ago
odais_timestamp_months The relative timestamp that displays every month since the previous message was received. {0} is replaced by the number of months that have passed. {0}mth ago
odais_timestamp_now The relative timestamp that displays for a new message. Now
odais_timestamp_seconds The relative timestamp that displays ten seconds after the message has been received and before 60 seconds has elapsed since the last message was received. A few seconds ago
odais_timestamp_years The relative timestamp that displays each year after the previous message was received. {0} is replaced by the number of years that have passed. {0}yr ago
odais_too_much_speech_error The alert message that's displayed when too much audio content is sent to the speech server at once (the user speaks too much). Too much voice input to recognize. Cannot generate recognized text.
odais_type_your_message The placeholder text for the user message input field Enter message
odais_unmute The title of the unmute button in the overflow menu. Unmute
odais_upload_attachment The text that's displayed on the bubble indicating that an attachment is being uploaded. Uploading attachment
odais_upload_attachment_error The error message that displays when an attachment cannot be uploaded. Error in uploading attachment
odais_zero_byte_file_warning The alert message that's displayed when the selected file has zero (0) bytes. Files of size zero bytes can not be uploaded.
editFieldErrorMessage The field-level error message that is displayed when the value entered by the user is invalid for that field. The SDK defaults to this message when the skill does not provide a client error message. Field Input is invalid
editFormErrorMessage The form-level error message that is displayed below the form's submit action for client-side validation. This message display when at least one of the fields is not valid and there is more than one field. The SDK defaults to this message when the skill does not provide an error message in the message payload. Some of the fields need your attention.
noResultText The status text that's displayed when there are no matches from a user search in multi-select list view. No more results

UI Properties and Colors

You can modify the colors for the following components by using BotsProperties.<component name> = <UIColor type>. As described in Initialize the SDK in Your App, you must set all of the colors in BotsProperties before adding the chat view to the view controller.

Component Description Values
ActionBorderColor The border color for an action button 161513.withAlphaComponent(0.50)
ActionButtonColor The color for an action button UIColor.clear
ActionLabelTextColor The text color for an action label #161513
AgentAvatarBackgroundColor The background color of the avatar layout when the agent avatar has not been provided and the agent name initials display in its place #A890B6
AgentAvatarTextColor The text color of the agent name initials that display inside the agent avatar layout. UIColor.white
AgentNameTextColor The text color used for the agent name that displays above the agent messages. #161513.withAlphaComponent(0.65)
AttachmentBackgroundColor The background color of the attachment messages. UIColor.white
AttachmentBorderColor The background color of the attachment messages. #161513
AttachmentIconColor The color of the icons in attachment messages. #161513
AttachmentTextColor The text color of the attachment messages. #161513
BotMessageColor The background color for text, attachment, and location messages sent by the skill UIColor.white
BotTextColor The color for the text in a text message sent by the skill #161513
CardActionBorderColor The order color of a card action button #161513.withAlphaComponent(0.50)
CardActionButtonColor The color of a card action button UIColor.clear
CardActionLabelTextColor The text color of a card action label UIColor.white
CardBackgroundColor The background color for a card UIColor.white
CardDescriptionTextColor The text color for a card description #161513
CardNavigationArrowColor The color of the navigation button arrows in a horizontal card view #161513
CardNavigationButtonColor The color of the navigation buttons in horizontal card view #FBF9F8
CardTitleTextColor The text color for a card title #161513
ChatBackgroundColor The color for the chat view background #F5F4F2
conversationBeginPosition Sets the starting point of the conversation at the top or the bottom. Values are top and bottom. The default is bottom.
EnableArrowsForHorizontalCards Enables navigation arrows for horizontal card view when set to true. Disables them when set to false. false
FooterColor The background color of the footer. UIColor.white
FooterIconsColor The color of the attachment, send, and mic icons located in the footer. #161513
FooterInlineIconsColor The color of the icons (if any) inside the text input field #004C8C
GlobalActionBorderColor The border color of a global action button #161513.withAlphaComponent(0.50)
GlobalActionButtonColor The color of the global action button #0077C2
GlobalActionLabelTextColor The color of a global action label #161513
HeaderColor The background color of the header #F1EFED
HeaderIconsColor The color for the clear message, volume, and mute header icons. #161513
HeaderTextColor The text color for the connection status, typing status, and chat title header items #161513
InputFieldColor The background color of the text input field #161513
InputFieldTextColor The color of the text in the text input field #161513
IsRTL When when set to true, flips the UI to support layout for right-to-left languages such as Arabic. When set to false, the default UI layout for left-to-right languages (English, for example). false
LinkHandler Sets how the links that appear in the chat widget as part of any message payload are opened. The possible values are LinkHandlerType.browser and LinkHandlerType.webview. This behavior can be overriden for specific URL actions using the beforeDisplay() delegate by changing the action type from url to webview. LinkHandlerType.browser
PopupBackgroundColor The background color of the popup views. UIColor.white
PopupIconColor The color of the icons in popup views. #161513
PopupTextColor The text color in popup views. #161513
RatingStarColor The color of a feedback button before the user has selected it. UIColor.white
RatingStarColorFill The color of a feedback button after the user has selected it. #0077C2
saveClickedImagesInGallery When set to true (the default), the images captured by the iPhone Camera app by skill users get saved to the gallery and are uploaded directly to the skill as an attachment. If these images should not be saved to the gallery, set this flag to false. true
SpeechVisualizationColor The color of the speech visualization bars #161513
SpeechVisualizerContainerBackground The background color of the speech visualization view UIColor.white
Theme The UI theme for the application. Valid values are BotUITheme.REDWOOD_DARK and BotUITheme.DEFAULT. For the REDWOOD_DARK theme, we recommend #201E1C. For the DEFAULT theme, it's #004C8C. Set the color of the navigation bar using the sample app. BotUITheme.DEFAULT
TimestampColor The color for the message timestamp #161513.withAlphaComponent(0.65)
UserMessageColor The background color for a user message #E4E1DD
UserTextColor The color for the text in a text user sent by the user #161513
WebViewConfig An instance of the struct WebViewConfiguration with all fields set to their default values. Sets the configuration settings for of the webview.

Icons

You can customize the following icons by setting the name of the icon image asset in the client app.
Icon Image Asset Name
Agent Avatar "agentAvatar"
Attachment Button "attachmentButton"
Skill Avatar "botAvatar"
Clear Button "clearButton"
The close button to invoke the end conversation flow "closeButton"
Download "downloadAttachmentButton"
File Icon for a file attachment "file"
Keyboard Button "keyboardButton"
Left Arrow for horizontal cards "leftArrow"
Mic Button "micButton"
Person Avatar "personAvatar"
Rating icon used for the feedback component buttons "ratingIcon"
Right Arrow for horizontal cards "rightArrow"
Send Button "sendButton"
The button to invoke the language selection popup "selectLanguageButton"
The overflow menu button when there are three or more action buttons in the header. "overflowButton"
Volume Off Button "volumeOffButton"
Volume On Button "volumeOnButton"
Zoom "imageZoomButton"