The Real User Monitoring (RUM) sub-service of Application Real-Time Monitoring Service (ARMS) provides comprehensive monitoring capabilities for iOS apps and Android apps. This topic describes how to integrate an iOS app into RUM through Xcode.
Step 1: Add the app and obtain the OpenRUM SDK
- Log on to the ARMS console.
In the left-side navigation pane, choose . In the top navigation bar, select a region.
On the Applications page, click Add Application.
In the Create Application panel, click iOS.
In the iOS panel, enter the app name and description, and click Create.
NoteThe name must be unique.
Then, an address to which monitoring data is reported (ConfigAddress) and an app ID (AppID) are automatically generated for the app.
Download the installation package of the OpenRUM SDK and decompress the package.
The following figure shows the files of the OpenRUM SDK.

Step 2: Integrate the OpenRUM SDK into the project
Move the
OpenRUM.frameworkfile from the ios-arm64_armv7_armv7s or ios-arm64_i386_x86_64-simulator folder to the directory of the Xcode project based on whether you are using a simulator or not.ios-arm64_armv7_armv7s: real computer
ios-arm64_i386_x86_64-simulator: simulator
Configure the settings and click Finish.

View the added OpenRUM dependencies in the file navigator sidebar.

In the section of the Build Phases tab, add the
OpenRUM.frameworkfile and the following libraries.libresolv.tbd. Required.
libc++.tbd. Required.
webKit.framework. Add the library if the project supports iOS versions earlier than 8.

Search for the
Other Linker Flagssetting on theBuild Settingstab and add the-ObjCflag.
Step 3: Initialize the OpenRUM SDK
You must enter the code in sequence. Otherwise, the SDK fails to be initialized.
Objective-C
Introduce the header file to the
main.morAppDelegate.mfile.#import <OpenRUM/OpenRUM.h>Initialize the OpenRUM SDK in the
mainfunction or the- application:didFinishLaunchingWithOptions:method.NoteReplace
AddressandappIdin the following code with the address and app ID obtained from the ARMS console.- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [OpenRUM setConfigAddress:@"Address"]; // Specify the address. [OpenRUM startWithAppID:@"appId"]; [OpenRUM setUserID:@"user-id"]; // Optional. Specify the username. return YES; }If
SDK Config Succeededis returned after the preceding code is executed, the SDK has been initialized.Sample output:
2023-07-31 16:07:18.450 [OpenRUM] [CONFIG] SDK Config Succeeded.NoteWe recommend that you initialize the SDK in the
mainfunction because it can completely capture the startup duration and the time consumption details of the- application didFinishLaunchingWithOptionsmethod and the internal methods. Otherwise, only the startup duration is captured when the agent is running.
Swift
Introduce the header file to the Bridging Header file.
#import <OpenRUM/OpenRUM.h>Configure the following code in the AppDelegate.swift file.
NoteReplace
AddressandappIdin the following code with the address and app ID obtained from the ARMS console.class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { OpenRUM.setConfigAddress("Address") // Specify the address. OpenRUM.start(withAppID: "appId") OpenRUM.setUserID("user-id") // Optional. Specify the username. return true } }If
SDK Config Succeededis returned after the preceding code is executed, the SDK has been initialized.Sample output:
2023-07-31 16:07:18.450 [OpenRUM] [CONFIG] SDK Config Succeeded.