1. SDK Feature Configuration with Precompile Macros
In order to meet the special needs of customers in certain scenarios, the SDK supports selective compilation of certain features through precompile macros. When integrating through CocoaPods, configuration can be done by adding the subspecs; for other integration methods, the configuration can be done in the project with the Preprocessor Macros.
Features | subspec (CocoaPods Integration) | Preprocessor Macros (Other Integration Methods) | Notes |
---|
Use of UIWebView with the Old Integration Solution | WebView | Import the WebView folder | - By default, the UIWebView module is not used
- This module contains the -addWebViewUserAgentSensorsDataFlag: method
|
Use of WKWebView with the Old Integration Solution | WKWebView | Import the WKWebView folder | - By default, the WKWebView module is not used
- This module contains the -addWebViewUserAgentSensorsDataFlag: method
|
Data Collection of GPS | Location | Import the Location folder | Location module is not included by default |
1.1. Configuration of CocoaPods integration method
# 添加单个 subspec pod 'SensorsAnalyticsSDK', :subspecs => ['WebView'] # 添加多个 subspec pod 'SensorsAnalyticsSDK', :subspecs => ['WebView', 'Location']
CODE
1.2. Configuration of other integration methods
2. View the App ID Prefix of the application
Login to Apple Developer Website and check the corresponding App ID Prefix in the Certificates, Identifiers & Profiles page.
3. Real-time view of device event data
- Before using this feature, make sure that your App is configured for the Scheme of the current project. For detailed operation steps, refer to Configure Scheme.
- Debug mode is only valid for the current launch and automatically expires when quitting the App
Open the Sensing Analytics page on your computer, navigate to Tracking -> Import for Real-time View -> Debug Data -> Set Device Debug Mode, and use the camera or other QR code tools to scan the QR code on the screen.
After scanning the code to open the App, a prompt will pop up, select the debugging mode you want to switch:
To enable debugging mode (import data) : turn on debug mode, verify the data, and import the data into the Sensors analysis.
To enable debugging mode (without importing data) :If the debugging mode is enabled, data is only verified but not imported. Therefore, data will not enter the database.