//
//  UmengAppAnalysics.m
//  UmengAppAnalysics
//
//  Created by HuierCloud on 20/02/2017.
//  Copyright © 2017 Hank. All rights reserved.
//

#import "UmengAppAnalysics.h"

// 桥接
#import "RCTBridgeModule.h"
#import "UMMobClick/MobClick.h"

@implementation UmengAppAnalysics

RCT_EXPORT_MODULE(HUmengModule)

RCT_EXPORT_METHOD(registerAppKey:(NSString *) appKey) {
    
    UMConfigInstance.appKey = appKey;
    UMConfigInstance.eSType = E_UM_GAME;
    UMConfigInstance.channelId = @"App Store";
    
    //配置以上参数后调用此方法初始化SDK！
    [MobClick startWithConfigure:UMConfigInstance];
}

RCT_EXPORT_METHOD(event:(NSString *) eventName) {
    
    [MobClick event:eventName];
}

@end
