Getting Started with the iOS SDK Example App

The iOS SDK Example App is a sample implementation of the Monetate iOS SDK. The app compiles a list of events that are then sent to the Engine API to update the UI based on the actions that the Engine API returns. You can use this source code either as a reference for your own app or as an inclusion in your own source to aid development.

Refer to iOS SDK Example App Readme for more information.

App Setup and Execution

Submit a support ticket using the Kibo Technical Support portal ( to obtain the app. To set it up, open the project in Xcode.

To run the app, click Run. A simulation of the app appears.

Using the App

Select an event type from the drop-down menu, and then fill values in to the boxes below to define an event. Tap Report to queue the event.

To send queued events to the Engine API and retrieve actions, tap GetAction. The UI updates based on the actions returned.

To reset the UI and clear the event queue, tap Clear.

Sample Execution

You can view a sample execution of the iOS SDK Example App by sending a queued action to the Engine API. To do so, select an event type and then set a value.

Example execution of the sample app.

Then send the action by tapping GetAction. The "Changing Label" message changes to "New Text" to indicate execution.

Execution of the GetAction button.

Tap Clear to clear the label.

Event Types

The following event types are available in the example app:

  • UserAgent
  • IP Address
  • Coordinates
  • ScreenSize
  • Cart
  • Purchase
  • ProductDetailView
  • PageEvent
  • CustomVariables
  • Metadata

The following events can be configured for automatic tracking:

  • UserAgent
  • IP Address
  • Coordinates
  • ScreenSize

Reusing Example App Code in Your App

The SetupPersonalizationSDK.swift file contains initialization code that you can reuse in your app. To adapt it to your app, change the instance, domain, name, and shortname attributes in the Personalization account setup method.

When reusing sample app code in your own app, change the instance, domain, name, and shortname attributes.

The SetupContextMap.swift file contains example data that you can work with to test your app. If you want to use this data, you must implement your own setup function.

For a complete list of methods and objects that you can use, refer to SDK API Reference.