2. Create the ImqaSettings.m file and enter the following:
3. Import the one below from the AppDelegate.h file.
4. In the AppDelegate.m file, add the code below to the top of - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions.
3. Detailed setting
The iOS MPM framework supports various settings.
Setting the collection interval
You can set the interval for the IMQA MPM framework to save and collect data in seconds.
Objective-C
Setting network collection
The IMQA MPM framework can set whether or not to collect network information. The framework also provides a function that can ignore the collection of a specific URL, which enables you to ignore the URL that requires security.
Objective-C
Checking collected data
If you want to check the data collected by the IMQA MPM framework, you can check the data on the console using its own options.
Objective-C
4. Network Collection (NSURLSession or URLSession)
When using NSURLSession or URLSession to communicate over the network, some settings are required for network collection.
ImqaSetting* is = [ImqaSetting new];
[is IMQASetting];
ImqaSettings.m
IMQAConfig* mpmConfig = [[IMQAConfig alloc] init:@"PROJECT_KEY"];
mpmConfig.dump_interval = 10; // Interval of getting the performance data dump (sec)
mpmConfig.save_interval = 60; // Interval of sending performance data to the collection server (sec)
ImqaSettings.m
IMQAConfig* mpmConfig = [[IMQAConfig alloc] init:@"PROJECT_KEY"];
mpmConfig.useNetworkCollect = YES; //YES: Collect, NO: Do not collect
mpmConfig.ignoreUrl = @[@"https://url1.com", @"http://url.com"]; // An array of specific URLs to ignore