//
//  ToolHelper.m
//  Lighting
//
//  Created by 曹云霄 on 2017/3/31.
//  Copyright © 2017年 上海勾芒科技有限公司. All rights reserved.
//

#import "ToolHelper.h"
#import <Bugly/Bugly.h>

@implementation ToolHelper


/**
 加载第三方工具
 */
+ (void)startLoad {
    
    [[self class] setUpUMShare];
    [[self class] setUpBugly];
    [[self class] setKeyboard];
}

#pragma mark - 友盟
+ (void)setUpUMShare
{
    /* 打开调试日志 */
    [[UMSocialManager defaultManager] openLog:YES];
    /* 设置友盟appkey */
    [[UMSocialManager defaultManager] setUmSocialAppkey:@"574bc8fee0f55a4edb001078"];
    /* 设置微信的appKey和appSecret */
    [[UMSocialManager defaultManager] setPlaform:UMSocialPlatformType_WechatSession appKey:@"wxab385878d9441f23" appSecret:@"58b85af13973bdf597fa807208ac0dff" redirectURL:@"http://mobile.umeng.com/social"];
    /* 设置微信朋友圈的appKey和appSecret */
    [[UMSocialManager defaultManager] setPlaform:UMSocialPlatformType_WechatTimeLine appKey:@"wxab385878d9441f23" appSecret:@"58b85af13973bdf597fa807208ac0dff" redirectURL:@"http://mobile.umeng.com/social"];
    /* 设置新浪的appKey和appSecret */
    [[UMSocialManager defaultManager] setPlaform:UMSocialPlatformType_Sina appKey:@"1111393286"  appSecret:@"5d011c05122b5539ec9592372f944d3c" redirectURL:@"https://sns.whalecloud.com/sina2/callback"];
}

#pragma mark - Bugly
+ (void)setUpBugly
{
    [Bugly startWithAppId:@"900033734"];
}


#pragma mark - 键盘
+ (void)setKeyboard
{
    IQKeyboardManager *manager = [IQKeyboardManager sharedManager];
    [[IQKeyboardManager sharedManager]setKeyboardDistanceFromTextField:0];
    manager.enable = YES;
    manager.shouldResignOnTouchOutside = YES;
    manager.enableAutoToolbar = NO;
}









@end
