All Products
Search
Document Center

Application Real-Time Monitoring Service:Integrate an iOS application

Last Updated:Mar 11, 2026

Application Real-Time Monitoring Service (ARMS) Real User Monitoring (RUM) captures performance metrics, crashes, and UI stuttering from your iOS application in real time. This guide walks you through adding the ARMS RUM SDK to an iOS project and verifying that monitoring data flows to the ARMS console.

The integration takes four steps:

  1. Add the SDK to your project

  2. Import the SDK module

  3. Initialize the SDK

  4. Verify the integration

Prerequisites

Before you begin, ensure that you have:

  • Xcode installed on your machine

  • An ARMS RUM application created in the ARMS console. During creation, note the following values -- they are required for SDK initialization:

    • Endpoint -- the data collection endpoint

    • Workspace -- the workspace identifier

    • ServiceId -- the service identifier

Important

SDK 2.0.0 introduced breaking changes to initialization parameters. If you are upgrading from a version earlier than 2.0.0, follow this guide to re-integrate. The previous initialization code is not compatible with 2.0.0 or later.

Step 1: Add the SDK

Add the ARMS RUM SDK to your project using one of the following methods.

CocoaPods (recommended)

  1. Add the SDK to the Podfile of your Xcode project:

    source 'https://github.com/CocoaPods/Specs.git'
    
    target 'iOSDemo' do
      # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
      use_frameworks!
    
      # ARMS RUM SDK
      pod 'AlibabaCloudRUM', '2.0.2'
    end

    Replace iOSDemo with your actual target name.

  2. From the directory that contains the Podfile, run:

    pod install --repo-update

Manual integration

  1. Download the SDK and decompress the .zip file. It contains two frameworks:

    • AlibabaCloudRUM.xcframework

    • AlibabaCloudRUMSDK.xcframework

  2. Add the frameworks to your Xcode project:

    1. In Xcode, choose File > Add Files to "Your Project Name"..., select both frameworks, enable Copy files to destination, and click Add.

      Note

      The exact menu path may vary depending on your Xcode version.

      Add frameworks to Xcode project

    2. Go to target > Build Phases > Link Binary With Libraries and add the following dependency libraries:

      • libc++.tbd (required)

      • libresolv.tbd (required)

      Link Binary With Libraries

    3. Go to target > Build Settings, search for Other Linker Flags, and add the -ObjC flag.

      Important

      This flag is case-sensitive. Type -ObjC exactly as shown.

      Other Linker Flags

Step 2: Import the SDK module

Import the AlibabaCloudRUM module at the top of your main.m or AppDelegate.m file.

Objective-C

@import AlibabaCloudRUM;

Swift

import AlibabaCloudRUM

Step 3: Initialize the SDK

Initialize the SDK in the main function or the - application:didFinishLaunchingWithOptions: method.

Objective-C

// Set the data collection endpoint (from the ARMS console RUM application page)
[AlibabaCloudRUM setEndpoint:@"<your-endpoint>"];

// Set the workspace identifier (from the ARMS console RUM application page)
[AlibabaCloudRUM setWorkspace:@"<your-workspace>"];

// Start the SDK with your service ID (from the ARMS console RUM application page)
[AlibabaCloudRUM start:@"<your-service-id>"];

Swift

// Set the data collection endpoint (from the ARMS console RUM application page)
AlibabaCloudRUM.setEndpoint("<your-endpoint>")

// Set the workspace identifier (from the ARMS console RUM application page)
AlibabaCloudRUM.setWorkspace("<your-workspace>")

// Start the SDK with your service ID (from the ARMS console RUM application page)
AlibabaCloudRUM.start("<your-service-id>")

Replace the placeholders with values from your ARMS RUM application page in the ARMS console:

Placeholder Description
<your-endpoint> Data collection endpoint. Found on the RUM application page in the ARMS console.
<your-workspace> Workspace identifier. Found on the RUM application page in the ARMS console.
<your-service-id> Service ID. Found on the RUM application page in the ARMS console.

Step 4: Verify the integration

Build and run the application. A successful initialization produces the following message in the Xcode console:

[AlibabaCloudRUM] [INFO   ] [RUM] <start> AlibabaCloud RUM init success