//
//  UMengSDKAdapter.m
//  suixinkan
//
//  Created by Codex on 2026/7/2.
//

#import "UMengSDKAdapter.h"
#import <UMCommon/UMCommon.h>
#import <UMAPM/UMAPMConfig.h>
#import <UMAPM/UMCrashConfigure.h>

@implementation UMengSDKAdapter

+ (void)configureWithAppKey:(NSString *)appKey
                    channel:(NSString *)channel
crashAndBlockMonitorEnable:(BOOL)crashAndBlockMonitorEnable
        launchMonitorEnable:(BOOL)launchMonitorEnable
           memMonitorEnable:(BOOL)memMonitorEnable
           oomMonitorEnable:(BOOL)oomMonitorEnable
              networkEnable:(BOOL)networkEnable
           logCollectEnable:(BOOL)logCollectEnable {
    UMAPMConfig *config = [UMAPMConfig defaultConfig];
    config.crashAndBlockMonitorEnable = crashAndBlockMonitorEnable;
    config.launchMonitorEnable = launchMonitorEnable;
    config.memMonitorEnable = memMonitorEnable;
    config.oomMonitorEnable = oomMonitorEnable;
    config.networkEnable = networkEnable;
    config.logCollectEnable = logCollectEnable;

    [UMConfigure setLogEnabled:NO];
    [UMCrashConfigure setAPMConfig:config];
    [UMConfigure initWithAppkey:appKey channel:channel];
}

@end
