Using the Oracle CX Infinity Module - iOS

This section serves as a quick guide for instrumenting your iOS mobile applications with the Infinity module.

iOS version compatibility

The Infinity module successfully works with the below versions.

iOS Version Notes
1 iOS 16
2 iOS 15
3 iOS 14
4 iOS 13
5 iOS 12

Getting Started

Follow the below steps to integrate the Infinity module with your mobile application

  1. Download the Core module and Infinity modules
  2. Import the Core and Infinity modules into your mobile application project
  3. Configure and initialise the modules

Downloading the Core and Infinity modules

The Infinity module leverages some of the capabilities of the Core module. So, for the Infinity module to work as expected, the Core module must be downloaded and imported to your mobile application project.

Download the Core module and Infinity modules from here .

The Infinity module collects the events from the mobile application based on user interactions and transmits the events to the Core module. The Core module appends the default parameters captured by it to the events received by it from the Infinity module. The Core module then batches the events and transmits the events to the data collection servers. So the Infinity module does not work without the Core module. To set up the Core module, please follow the documentation available at Using the Core Module.

Importing the modules

Once the modules are downloaded they need to be imported into the mobile app project. For a step-by-step guide to importing and adding the modules as dependencies into the project, please check here .

Adding the mandatory configuration to the Core Module of your project

After importing the modules into the mobile app project, the Core module must be configured to be used with the Infinity module. The Core module is configured by creating a JSON file (oracle.json) and adding it to the main project folder.

The configuration that needs to be set in the oracle.json file includes the below parameters. These parameters are used to configure the details of the Infinity servers to which data is to be sent.

Data Object Parameter Mandatory/Optional Sample Value Description Remarks
ora_dc_end_point_config Mandatory Endpoint details to which collected data must be sent You can configure any number of endpoints. The same payload can be sent to multiple endpoints for downstream processing
ora_dc_collection_url Mandatory https://dc.oracleinfinity.io/v3/ Destination to which data should be sent
ora_dc_account_guid Mandatory guid221281 Unique identifier for customers on Infinity systems
ora_dc_retry_count Optional 2 Number of attempts for posting data to endpoints in the event of failure
ora_dc_modules Optional [ "infy" ] Oracle CX modules list
{
				"config_version": "1.0",
				"ORACORE": {
				"ora_dc_end_point_config": [
				{
				"ora_dc_collection_url": "https://dc.oracleinfinity.io/v3/",
				"ora_dc_account_guid": "your_account_guid",
				"ora_dc_retry_count": "2"
				}
				],
				"ora_dc_modules": [
				"infy"
				],
				"ora_dc_send_interval_millis": "10000"
				}
				}
		

You can control the behavior of the Core module, by editing the configuration settings available for the Core module. A detailed list for the same is available at Parameters for configuring Core Module.

Configuring the Infinity Module

Configurations are the settings that govern the behavior of a module. The configuration of the Infinity Module can be done by one of the below methods

  • Using oracle.json file as described in the previous section
  • Programmatic configuration

Configuring the Infinity Module using the oracle.json file

The configuration for the Infinity module is added to the oracle.json file under the ORAINFINITY object. This configuration needs to be added to the same file that is used for the Core module.

The list of parameters that can be configured is given here.

oracle.json - ORAINFINITY

"ORAINFINITY": {
				"ora_dc_video_load_auto_enabled": "true",
				"ora_dc_video_load_meta_auto_enabled" : "false"
				}
		

You can also set any of the configuration parameters programmatically, by creating an object of that class and using the putValue:forKey: method.

Swift 5.1
let eventsPerSend = ORAConfigEventsPerSend()
				let coreContainer = ORACoreDataContainer()
				coreContainer.putValue("250", forKey: eventsPerSend) //coreContainer is an object of ORACoreDataContainer class we created above
		
Objective C
ORAConfigEventsPerSend *eventsPerSend = [[ORAConfigEventsPerSend alloc] init];
				ORACoreDataContainer *coreContainer = [[ORACoreDataContainer alloc] init];
				[coreContainer putValue:@"250" forKey:eventsPerSend];//coreContainer is an object of ORACoreDataContainer class we created above
		

loadFromConfigFile

As a next step, we need to load configuration from the code. This can be done in application:didFinishLaunchingWithOptions method of AppDelegate.

Swift 5.1
let infinityContainer = ORAInfinityDataContainer()
infinityContainer.loadFromConfigFile()
Objective C
ORAInfinityDataContainer *infinityContainer = [[ORAInfinityDataContainer alloc] init];
[infinityContainer loadFromConfigFile];	

Note: If we call the loadFromConfigFile method using ORAInfinityDataContainer instance then it is NOT require to call the same method using ORACoreDataContainer instance. We will internally take care of calling loadFromConfigFile using ORACoreDataContainer instance.

Capturing behavior data

Once the Infinity module is initialized, you can use the Infinity module to capture behavior data. Any behavior data event can be captured using the following function.

Sample Trigger Event

Once the Infinity module is initialized, you can use the Infinity module to capture behavior data. Any behavior data event can be captured using the following function.

Swift 5.1
let currentMeta = ORAEventMeta(for: nil, description: "Login Button", type: EVENT_PATH_BUTTON, customParams: nil)
ORADataCollector.shared().triggerEvent(forAction: currentMeta)
Objective C
ORAEventMeta *currentMeta = [ORAEventMeta eventMetaForPath:nils
                                               description:@"Login Button"
                                                      type:EVENT_PATH_BUTTON
                                              customParams:nil];
[[ORADataCollector sharedCollector] triggerEventForAction:currentMeta];