//
//  SuiteWindVaneConfig.m
//  suite-ios-h5
//
//  Created by junmo on 2018/12/10.
//  Copyright © 2018年 junmo. All rights reserved.
//
#if __has_include(<WindVane/WindVane.h>)
#import <WindVane/WindVane.h>

#else
#endif

#import "SuiteWindVaneConfig.h"

static NSString *appKey = @"20000067";
static NSString *appSecret = @"48ea1729433f6be32c2fee36c487b2e8";
static NSString *appUA = @"JMUA";
static NSString *appName = @"JMDemo";
static NSString *appVersion = @"1.0.0";

@implementation SuiteWindVaneConfig
#if __has_include(<WindVane/WindVane.h>)

+ (void)setUpWindValuePlugin {
    // 设置appKey和appSecret
    [WVUserConfig setAppKey:appKey secrect:appSecret];
    // 不使用黑匣子
    [WVUserConfig useSafeSecert:NO];
    // 设置环境，是否有必要透出？
    [WVUserConfig setEnvironment:WVEnvironmentRelease];
    // 设置UA
    [WVUserConfig setAppUA:appUA];
    // 设置App名称
    [WVUserConfig setAppName:appName];
    // 设置App版本
    [WVUserConfig setAppVersion:appVersion];
    // WKWebView支持NSURLProtocol拦截
    [WVURLProtocolService setSupportWKURLProtocol:YES];
    
#ifdef DEBUG
    [WVBasicUserConfig setDebugMode:YES];
    [WVBasicUserConfig openWindVaneLog];
    [WVUserConfig setLogLevel:WVLogLevelVerbose];
    [WVBasic setJSLogLevel:WVLogLevelVerbose];
#endif
    
    // 初始化WindVane各模块
    [WVBasic setup];
    [WVAPI setup];
    [WVMonitor startMonitoring];
    [EMASWVExtensionConfig setup];
}
#else

#warning WindVane is not included

#endif
@end


