Skip to content

macOS Application Integration


TrueWatch APM can collect metric data from various macOS applications and analyze the performance of each macOS application end through visualization.

Reading Path

Prerequisites

Note

If the RUM Headless service has been activated, the prerequisites are already configured automatically, and you can proceed directly with the application integration.

Application Integration

  1. Navigate to RUM > Create Application > macOS;
  2. Enter the application name;
  3. Enter the application ID;
  4. Select the application integration method:

    • Public DataWay: Directly receives RUM data without installing the DataKit collector.
    • Local Environment Deployment: Receives RUM data after meeting the prerequisites.

Installation

Source Code Repository: https://github.com/GuanceCloud/datakit-macos

Demo: https://github.com/GuanceCloud/datakit-macos/Example

  1. Configure the Podfile file.
   target 'yourProjectName' do

   # Pods for your project
   pod 'FTMacOSSDK', '~>[latest_version]'

   end
  1. Execute pod install in the directory containing the Podfile to install the SDK.
  1. Select PROJECT -> Package Dependency, then click the + under the Packages section.

  2. In the pop-up page, enter https://github.com/GuanceCloud/datakit-macos in the search box, which is the repository location of the code.

  3. After Xcode successfully fetches the package, it will display the SDK configuration page.

Dependency Rule: It is recommended to select Up to Next Major Version.

Add To Project: Select the supported project.

After filling in the configuration, click the Add Package button and wait for the loading to complete.

  1. In the pop-up window Choose Package Products for datakit-macos, select the Target to which the SDK needs to be added, then click the Add Package button. The SDK is now successfully added.

If your project is managed by SPM, add FTMacOSSDK as a dependency by adding dependencies to Package.swift.

  dependencies: [
    .package(url: "https://github.com/GuanceCloud/datakit-macos.git", .upToNextMajor(from: "[latest_version]"))
]

Add Header File

#import "FTMacOSSDK.h"
import FTMacOSSDK

Detailed Configuration Entries

Advanced Scenarios

Frequently Asked Questions

About Crash Log Analysis

For crash log analysis and dSYM instructions, please refer to Troubleshooting.

Encountering the "Include of non-modular header inside framework module" Error

Because the SDK's .h file includes .h files from dependency libraries, you need to set:

Target -> Build Settings -> CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES to YES.