This document describes the network analysis API for the Mobile Monitoring iOS SDK.
1. Configure network collection
Enable or disable network collection. This feature is enabled by default.
API reference
+ (void)setDataCollectionEnabled:(BOOL)dataCollectionEnabled;
+ (BOOL)dataCollectionEnabled;class var dataCollectionEnabled: Bool { get set }Code example
#import "AlicloudApmPerformance/AlicloudApmPerformance.h"
// Enable network collection.
[EAPMNetworkConfigurations setDataCollectionEnabled:YES];
// Get the status of network collection.
BOOL enabled = [EAPMNetworkConfigurations dataCollectionEnabled];#import "AlicloudApmPerformance/AlicloudApmPerformance.h"
// Enable network collection.
EAPMNetworkConfigurations.dataCollectionEnabled = true
// Get the status of network collection.
let enabled = EAPMNetworkConfigurations.dataCollectionEnabled该文章对您有帮助吗?