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¶
- First-time Integration: Start with Quick Start
- Complete Integration: Continue reading this article
- Initialization Parameters: Refer to SDK Initialization, RUM Configuration, Log Configuration, Trace Configuration
- Custom Capabilities: Refer to Custom Tag Usage, Data Collection Custom Rules
- Data Model: Refer to Application Data Collection
- Troubleshooting: Refer to Troubleshooting
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.
- Install DataKit;
- Configure the RUM Collector
Application Integration¶
- Navigate to RUM > Create Application > macOS;
- Enter the application name;
- Enter the application ID;
-
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
- Configure the
Podfilefile.
- Execute
pod installin the directory containing thePodfileto install the SDK.
-
Select
PROJECT->Package Dependency, then click the + under thePackagessection. -
In the pop-up page, enter
https://github.com/GuanceCloud/datakit-macosin the search box, which is the repository location of the code. -
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.
- In the pop-up window
Choose Package Products for datakit-macos, select the Target to which the SDK needs to be added, then click theAdd Packagebutton. The SDK is now successfully added.
If your project is managed by SPM, add FTMacOSSDK as a dependency by adding dependencies to Package.swift.
Add Header File¶
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.