All Products
Search
Document Center

Application Real-Time Monitoring Service:iOS SDK configuration reference

Last Updated:Mar 11, 2026

The Application Real-Time Monitoring Service (ARMS) Real User Monitoring SDK for iOS provides static methods to configure data collection, user tracking, and custom telemetry. This reference covers common SDK configurations, their parameters, constraints, and error behavior.

Quick reference

GoalMethod
Set the data endpointsetEndpoint
Set the workspacesetWorkspace
Initialize the SDKstart
Override the device IDsetDeviceID
Override the app versionsetAppVersion
Tag a distribution channelsetChannelID
Specify the environmentsetEnvironment
Associate data with a usersetUserName
Attach user metadatasetUserExtraInfo
Add global propertiessetExtraInfo / addExtraInfo
Report a custom exceptionsetCustomException
Report a custom eventsetCustomEvent
Report a custom logsetCustomLog

Initialization

Configure the endpoint and workspace before you call start. The following example shows the required calling sequence:

// Step 1: Configure the endpoint (required, must precede start)
setEndpoint("<your-endpoint>")

// Step 2: Configure the workspace (required, must precede start)
setWorkspace("<your-workspace>")

// Step 3 (optional): Set environment, device ID, app version, or channel ID
setEnvironment(.PROD)
setDeviceID("<custom-device-id>")
setAppVersion("1.2.0")
setChannelID("app-store")

// Step 4: Initialize the SDK
start("<your-service-id>")

Replace the placeholders with your actual values:

PlaceholderDescription
<your-endpoint>Endpoint address from the ARMS console
<your-workspace>Workspace identifier from the ARMS console
<your-service-id>Unique app ID generated on the Real User Monitoring platform

Set the endpoint

Associate the SDK with a data endpoint. Call this method before start.

@objc
public static func setEndpoint(_ endpoint: String)
ParameterDescriptionConstraintsOn failure
endpointEndpoint addressString length must be greater than 0 and less than 2,083.The call fails and the SDK stops.

Set the workspace

Associate the SDK with a workspace. Call this method before start.

@objc
public static func setWorkspace(_ workspace: String)
ParameterDescriptionConstraintsOn failure
workspaceWorkspace addressString length must be greater than 0 and less than 2,083.The call fails and the SDK stops.

Initialize the SDK

Start the SDK after you configure the endpoint and workspace.

@objc(start:)
public static func start(_ serviceId: String)
ParameterDescriptionConstraintsOn failure
serviceIdUnique app ID generated on the Real User Monitoring platformNon-empty string.The call fails and the SDK stops.

Set a custom device ID

Override the default device ID. After you set this value, the SDK reports it instead of the auto-generated ID.

@objc
public static func setDeviceID(_ deviceID: String)
ParameterDescriptionConstraintsOn failure
deviceIDCustom device ID1--255 characters. Allowed characters: letters, digits, colons (:), spaces, underscores (_), hyphens (-), periods (.), and at signs (@).The call fails. The setting is not applied.

Set a custom app version

Report a custom app version instead of the version that the SDK detects automatically.

@objc
public static func setAppVersion(_ appVersion: String)
ParameterDescriptionConstraintsOn failure
appVersionCustom app version string1--63 characters.The call fails. The setting is not applied.

Set the channel ID

Tag the distribution channel for the app, such as app-store or an enterprise distribution identifier.

@objc
public static func setChannelID(_ channelID: String)
ParameterDescriptionConstraintsOn failure
channelIDDistribution channel identifier1--255 characters.The call fails. The setting is not applied.

Set the environment

Specify the runtime environment. Call this method after setConfigAddress and before start.

@objc
public static func setEnvironment(_ env: Env)
ParameterDescriptionConstraintsOn failure
envRuntime environmentOne of the Env enum values listed below.The call fails. The setting is not applied.

Env values

ValueDescription
LOCALLocal environment
DailyDaily build environment
PREPre-release environment
GRAYGrayscale environment
PRODProduction environment (default)
NoneNo environment specified

User and global properties

Set the username

Associate monitoring data with a user identity for per-user filtering and analysis.

@objc
public static func setUserName(_ userID: String)
ParameterDescriptionConstraintsOn failure
userIDUsername identityCan be null or empty. Maximum 256 characters. Allowed characters: digits, letters, colons (:), spaces, forward slashes (/), underscores (_), hyphens (-), periods (.), and at signs (@).The call fails. The setting is not applied.

Set user metadata

Attach key-value metadata to the current user. This data accompanies the username in analytics.

@objc(setUserExtraInfo:)
public static func setUserExtraInfo(_ extraInfo: [String: AnyObject])
ParameterDescriptionConstraintsOn failure
extraInfoUser metadata as key-value pairsCan be null or empty. The serialized JSON string must not exceed 7,000 characters.The call fails. The setting is not applied.

Set global properties

Attach custom properties to all subsequent data that the SDK reports. Use these properties to segment analytics by business dimensions such as region, experiment group, or feature flag.

The SDK provides two methods:

// Replace all global properties
@objc(setExtraInfo:)
public static func setExtraInfo(_ extraInfo: [String: AnyObject])

// Append to existing global properties
@objc(addExtraInfo:)
public static func addExtraInfo(_ extraInfo: [String: AnyObject])
ParameterDescriptionConstraintsOn failure
extraInfoCustom properties as key-value pairsCan be null or empty. The serialized JSON string must not exceed 7,000 characters.The call fails. The setting is not applied.
Important

setExtraInfo clears all previously set properties. To append new properties without removing existing ones, use addExtraInfo.

Custom telemetry

Report a custom exception

Report an application exception with its type, cause, and stack trace.

@objc(setCustomException:causeBy:errorDump:)
public static func setCustomException(_ exceptionType: String, _ causeBy: String, _ errorDump: String)
ParameterRequiredDescriptionConstraintsOn failure
exceptionTypeYesException type identifier1--256 characters.The call fails. The setting is not applied.
causeByNoCause of the exceptionCan be null or empty. Maximum 512 characters; truncated if exceeded.N/A
errorDumpNoStack trace or error detailsCan be null or empty. Maximum 10,000 characters; truncated if exceeded.N/A

Report a custom event

Report a custom event with optional grouping, snapshots, numeric values, and metadata. The SDK provides multiple overloads that share the same base parameters. Choose the overload that matches the data you need to attach.

Full method signature (all optional parameters included):

@objc(setCustomEvent:group:snapshots:value:info:)
public static func setCustomEvent(
    _ name: String,
    group: String? = nil,
    snapshots: String? = nil,
    value: Double = 0,
    info: [String: String]? = nil
)

Parameters

ParameterRequiredDescriptionConstraintsOn failure
nameYesEvent name1--256 characters.The call fails. The setting is not applied.
groupNoEvent group for categorizationCan be nil or empty. Maximum 256 characters; truncated if exceeded.N/A
snapshotsNoEvent snapshot dataCan be nil or empty. Maximum 7,000 characters; truncated if exceeded.N/A
valueNoNumeric event valueDouble. Defaults to 0.N/A
infoNoAdditional key-value metadataCan be null or empty. The serialized JSON must not exceed 7,000 characters.N/A

Available overloads

Pass only the parameters you need:

// Event name only
@objc(setCustomEvent:)
setCustomEvent(_ name: String)

// With group
@objc(setCustomEvent:group:)
setCustomEvent(_ name: String, group: String?)

// With group and snapshots
@objc(setCustomEvent:group:snapshots:)
setCustomEvent(_ name: String, group: String?, snapshots: String?)

// With group and numeric value
@objc(setCustomEvent:group:value:)
setCustomEvent(_ name: String, group: String?, value: Double)

// With group and metadata
@objc(setCustomEvent:group:info:)
setCustomEvent(_ name: String, group: String?, info: [String: String]?)

// With group, snapshots, and numeric value
@objc(setCustomEvent:group:snapshots:value:)
setCustomEvent(_ name: String, group: String?, snapshots: String?, value: Double)

// With group, snapshots, and metadata
@objc(setCustomEvent:group:snapshots:info:)
setCustomEvent(_ name: String, group: String?, snapshots: String?, info: [String: String]?)

// With group, numeric value, and metadata
@objc(setCustomEvent:group:value:info:)
setCustomEvent(_ name: String, group: String?, value: Double, info: [String: String]?)

// All parameters
@objc(setCustomEvent:group:snapshots:value:info:)
setCustomEvent(_ name: String, group: String?, snapshots: String?, value: Double, info: [String: String]?)

Example: report a purchase event with a value and metadata

setCustomEvent(
    "purchase_completed",
    group: "checkout",
    value: 99.99,
    info: ["currency": "USD", "item_count": "3"]
)

Report a custom log

Report a custom log entry with optional name, snapshot, level, and metadata. Like custom events, the SDK provides multiple overloads.

Full method signature (all optional parameters included):

@objc(setCustomLog:name:snapshots:level:info:)
public static func setCustomLog(
    _ logInfo: String,
    name: String? = nil,
    snapshots: String? = "",
    level: String? = "INFO",
    info: [String: String]? = nil
)

Parameters

ParameterRequiredDescriptionConstraintsOn failure
logInfoYesLog message content1--10,000 characters; truncated if exceeded.The call fails. The setting is not applied.
nameNoLog name for categorization1--256 characters.N/A
snapshotsNoLog snapshot dataCan be null or empty. Maximum 7,000 characters; truncated if exceeded.N/A
levelNoLog severity level1--256 characters. Defaults to INFO.N/A
infoNoAdditional key-value metadataCan be null or empty. The serialized JSON length counts toward the total logInfo size limit.N/A

Available overloads

// Log message only
@objc(setCustomLog:)
setCustomLog(_ logInfo: String)

// With name
@objc(setCustomLog:name:)
setCustomLog(_ logInfo: String, name: String?)

// With name and snapshots
@objc(setCustomLog:name:snapshots:)
setCustomLog(_ logInfo: String, name: String?, snapshots: String?)

// All parameters
@objc(setCustomLog:name:snapshots:level:info:)
setCustomLog(_ logInfo: String, name: String?, snapshots: String?, level: String?, info: [String: String]?)

Example: report a warning-level log with metadata

setCustomLog(
    "Payment gateway timeout after 30s",
    name: "payment_error",
    level: "WARNING",
    info: ["gateway": "stripe", "retry_count": "2"]
)