Setting Configuration Values Document

Setting Configuration Settings via ORACoreDataContainer

All configuration settings can be set programmatically using ORACoreDataContainer. All you need to do is to create an instance of ORACoreDataContainer class and use its putValue:forKey method. For example, to set the app foreground auto enabled config setting, use the following line of code:

ORACoreDataContainer *coreContainer = [[ORACoreDataContainer alloc] init];
[coreContainer putValue:@"true" forKey:[ORAConfigForegroundAutoEnabled new]];
let coreContainer = ORACoreDataContainer()
let foreground = ORAConfigForegroundAutoEnabled()
coreContainer.putValue("true", forKey: foreground)

If you would like to set multiple configurations, it's good to add all configs in a oracle.json file rather than creating a separate instance of ORACoreDataContainer in different places.

As a standard reference, each configuration key is associated with ORAConfigSetting class.

The configuration setting will be written to disk and persisted across application stops and starts.

Configuration Settings

The following settings control the behavior of the OracleCXMobileSDK. Changing the values associated with any of them will change the behavior of the SDK as explained under each setting's "Description".

Max Persisted Events

Description: The maximum number of events to store locally on the device. If new events are generated while the event store is full, the oldest events will be permanently deleted.
String Literal: ora_dc_event_table_size_maximum
Constant Name: ORAConfigMaxPersistedEvents
Default Value: "5000"
Acceptable Values: integer as a string — (Any valid positive integer value)


Send Interval Milliseconds

Description: Time (in milliseconds) between stored events being transmitted to the Oracle Infinity data collection servers. If no events are queued, nothing is transmitted.
String Literal: ora_dc_send_interval_millis
Constant Name: ORAConfigSendIntervalMilliseconds
Default Value: "60000"
Acceptable Values: integer as a string — (any valid positive integer value)


Automatic Send Threshold Percent

Description: Percentage of the event store capacity (defined in the Max Persisted Events configuration setting) at which events will be automatically sent to the Oracle Infinity data collection servers. This setting expects an integer from 0 to 100, inclusive.
String Literal: ora_dc_auto_send_threshold_percent
Constant Name: ORAConfigAutoSendThresholdPercent
Default Value: "80"
Acceptable Values: integer as a string — (an integer from "0" to "100", inclusive)


Battery Minimum Charge Percentage

Description: Controls at what battery level to stop event transmission. When the battery level falls below this level, event transmission to the data collection servers is disabled. After iOS reports that battery power is restored to a level above this threshold, event transmission will resume. Since iOS reports battery levels to the SDK in increments of 5%, actual battery level may not trigger event transmission to resume immediately, depending on the value of this configuration setting.
String Literal: ora_dc_battery_min_charge_percent
Constant Name: ORAConfigBatteryMinimumChargePercentage
Default Value: "20"
Acceptable Values: integer as a string — representation of any integer between "0" and "100", inclusive.


End Point Config

Description: The End Point Configurations of Oracle Infinity data collection server
String Literal: ora_dc_end_point_config
Constant Name: ORAConfigEndPointConfig
Default Value: "[]" //Contains Array of End Point Configs which supports multi configurations
Acceptable Values: array — With valid url and account Guid


Account GUID

Description: The Oracle-assigned Account GUID used for this account
String Literal: ora_dc_account_guid
Constant Name: ORAConfigAccountGuid
Default Value: none
Acceptable Values: Account GUID string

Note: This setting is required.


Collection URL Base

Description: The URL address of the Oracle Infinity data collection server
String Literal: ora_dc_collection_url_base
Constant Name: ORAConfigCollectionUrlBase
Default Value: "https://dc.oracleinfinity.io/v3/"
Acceptable Values: string — A valid URL string including the protocol (http:// or https://) and current supported API level (v3/).


HTTP Method

Description: The HTTP method
String Literal: ora_dc_http_request_type
Constant Name: ORAConfigHttpMethod
Default Value: "POST"
Acceptable Values: GET and POST


Retry Count

Description: Specifies the retry count in case of serror side exceptions.
String Literal: ora_dc_retry_count
Constant Name: ORAConfigRetryCount
Minimum Value: 1
Maximum Value: 15
Acceptable Values: Integers


Debug Logging Enabled

Description: Enables or disables debug logging for the SDK. When enabled, event transmission and SDK state information will be printed to the console.
String Literal: ora_dc_debug
Constant Name: ORAConfigDebug
Default Value: "true"
Acceptable Values: boolean as a string — "true" or "false"

Important Note: "ORAConfigDebug is deprecated and this will be removed in a future release. So, use ORALogger to enable or disable the logs. See the ORALogger Guide.


Events Per Send

Description: Events are collected and sent in batches to the Oracle Infinity data collection servers. This setting controls the number of events to send in a single batch.
String Literal: ora_dc_event_send_maximum
Constant Name: ORAConfigEventsPerSend
Default Value: "250"
Acceptable Values: integer as a string — representation of any integer between "1" and "250", inclusive.


HTTP Connection Timeout Milliseconds

Description: Controls the maximum amount of time (in milliseconds) to pass before abandoning an Oracle Infinity Analytics Mobile SDK-related HTTP request.
String Literal: ora_dc_http_connect_timeout_millis
Constant Name: ORAConfigHTTPConnectionTimeoutMilliseconds
Default Value: "10000"
Acceptable Values: integer as a string — (any valid positive integer value)


HTTP Read Timeout Milliseconds

Description: Controls the maximum amount of time to wait (in milliseconds) for a response from an Oracle Infinity Analytics Mobile SDK-related HTTP connection.
String Literal: ora_dc_http_read_timeout_millis
Constant Name: ORAConfigHTTPReadTimeoutMilliseconds
Default Value: "30000"
Acceptable Values: integer as a string — (any valid positive integer value)


Only Send Over WiFi

Description: Controls whether events are sent when WiFi is unavailable or not.
String Literal: ora_dc_only_send_over_wifi
Constant Name: ORAConfigOnlySendOverWifi
Default Value: "false"
Acceptable Values: boolean as a string — "true" or "false"


Report Location Enabled

Description: When enabled (and CoreLocation services in the application are enabled), sends geo-location coordinates with every event. The application must be configured with CoreLocation authorization. The SDK will not request authorization unilaterally. It will only use this information if it is already authorized in your application.
String Literal: ora_dc_report_location_enabled
Constant Name: ORAConfigReportLocationEnabled
Default Value: "false"
Acceptable Values: boolean as a string — "true" or "false"


Max Session Milliseconds

Description: Controls the maximum amount of time (in milliseconds) to wait before forcing a new session to start.
String Literal: ora_dc_max_session_millis
Constant Name: ORAConfigMaxSessionMilliseconds
Default Value: "28800000"
Acceptable Values: integer as a string — (any valid positive integer value)


Session Timeout Milliseconds

Description: Controls the maximum amount of time (in milliseconds) since the last event before forcing a new session to start.
String Literal: ora_dc_session_timeout_millis
Constant Name: ORAConfigSessionTimeoutMilliseconds
Default Value: "1800000"
Acceptable Values: integer as a string — (any valid positive integer value)


App Delegate Class Name

Description: The name of the AppDelegate class, if changed from the default "AppDelegate".
String Literal: ora_dc_app_delegate_class_name
Constant Name: ORAConfigAppDelegateClassName
Default Value: "AppDelegate"
Acceptable Values: string — Any string


Oracle Infinity Mobile SDK Enabled

Description: Enable/Disable the Oracle Infinity Data Collector SDK
String Literal: ora_dc_enabled
Constant Name: ORAConfigEnabled
Default Value: "true"
Acceptable Values: boolean as a string — "true" or "false"

Important Note: If this config setting is set to 'false', then the SDK will no longer collect events, store events, send events to Oracle Infinity servers. Effectively, setting this to 'false' renders the entire SDK inoperable.


Extra Parameters for All Events

Description: If set, these key/value pairs will be sent along with every event. The SDK passes this data within the body of the event (as part of the payload). Format the query parameters as valid JSON e.g.: {"foo":"bar","fee":"fum"}.
String Literal: ora_dc_extra_params
Constant Name: ORAConfigExtraParams
Default Value: empty string
Acceptable Values: comma separated key=value string formatted as JSON {"key1":"value1","key2":"value2",...}

Note: If values are set in this setting and key/value pairs with the same keys (name collision) are passed in using the withCustomParams: parameter, the customParams will take precedence over values in this setting.


Mask IP Address of Sender

Description: Enable/Disable masking the IP address of the mobile client. When set to 'true' (enabled), the dcsipa parameter will be set to "1" on every event. The collection servers use this setting to mask the IP address. For IPv4, only the first three octets will be recorded, with the last octet set to 000. For IPv6, the last octet will also be set to 0.
String Literal: ora_dc_mask_ip_enabled
Constant Name: ORAConfigMaskIpEnabled
Default Value: "false"
Acceptable Values: boolean as a string — "true" or "false"


App Name

Description: The name of the application. If present, this value will be used in lieu of the running application name.
String Literal: ora_dc_app_delegate_class_name
Constant Name: ORAConfigAppName
Default Value: The running application name
Acceptable Values: string — Any string

App Version

Description: The version of the application. If present, this value will be used in lieu of the running application version.
String Literal: ora_dc_app_version
Constant Name: ORAConfigAppVersion
Default Value: The running application version
Acceptable Values: string — Any string

Immediate Event Storing

Description: Enable/Disable immediate event storing. When set to 'true' (enabled), the event is storing in database when internet connection is missing or battery level is low. When set to 'false' (disabled), the event should not be saved in database.
String Literal: ora_dc_immediate_event_storing_enabled
Constant Name: ORAConfigImmediateEventStoringEnabled
Default Value: "true"
Acceptable Values: boolean as a string — "true" or "false"

App Delegate Class Name

Description: Sets the name of the AppDelegate class for your application. This is only required if you are changing the default from "AppDelegate" and you are using Automatic Events.
String Literal: ora_dc_app_delegate_class_name
Constant Name: ORAAppDelegateClassName
Default Value: "AppDelegate"
Acceptable Values: Any valid class name


App Start/Terminate Automatic Events Enabled

Description: Controls whether or not app start and terminate events will be logged automatically. See the Automatic Events Guide for more details on automatic events.
String Literal: ora_dc_app_start_auto_enabled
Constant Name: ORAConfigAppStartAutoEnabled
Default Value: "false"
Acceptable Values: boolean as a string — "true" or "false"


App Foreground/Background Automatic Events Enabled

Description: Controls whether or not app foreground and background events will be logged automatically. See the Automatic Events Guide for more details on automatic events.
String Literal: ora_dc_foreground_auto_enabled
Constant Name: ORAConfigForegroundAutoEnabled
Default Value: "false"
Acceptable Values: boolean as a string — "true" or "false"


Push Notification Automatic Events Enabled

Description: Controls whether or not push notification events will be logged automatically. See the Automatic Events Guide for more details on automatic events.
String Literal: ora_dc_push_auto_enabled
Constant Name: ORAConfigPushAutoEnabled
Default Value: "false"
Acceptable Values: boolean as a string — "true" or "false"


View Controller Lifecycle Automatic Events Enabled

Description: Controls whether or not view controller life cycle events will be logged automatically. See the Automatic Events Guide for more details on automatic events.
String Literal: ora_dc_viewcontroller_auto_enabled
Constant Name: ORAConfigViewControllerAutoEnabled
Default Value: "false"
Acceptable Values: boolean as a string — "true" or "false"


Application Error Automatic Events Enabled

Description: Controls whether or not application error events will be logged automatically. See the Automatic Events Guide for more details on automatic events.
String Literal: ora_dc_error_auto_enabled
Constant Name: ORAConfigErrorAutoEnabled
Default Value: "false"
Acceptable Values: boolean as a string — "true" or "false"


Thread Count Setting for Event Sending

Description: A setting for number of threads to handle event sending. The default value is 2.
String Literal: ora_dc_http_thread_count
Constant Name: ORAConfigHTTPThreadCount
Default Value: 2
Acceptable Values: Integer as a string — from 1 to 15


Enable Background Task for HTTP Add Request

Description: Controls whether to get HTTP response in case of app background. The default value is false. Regarding background time limit, the general observation-based consensus is that you are given three minutes. However, there are no guarantees and the iOS API documentation doesn’t even give a ballpark number — so don’t rely on this number. You might get five minutes or five seconds, so your app needs to be prepared for whatever!
String Literal: ora_dc_http_background_task_enabled
Constant Name: ORAConfigHTTPBackgroundTaskEnabled
Default Value: "false"
Acceptable Values: boolean as a string — "true" or "false"