CNTools.h 2.36 KB
//
//  CNTools.h
//  CNLiveNetAdd
//
//  Created by 张旭 on 2017/12/30.
//  Copyright © 2017年 cnlive. All rights reserved.
//

#import <Foundation/Foundation.h>
//#import <ImSDK/ImSDK.h>
//#import "CNLiveLabel.h"
//#import "OpenInstallSDK.h"



NS_ASSUME_NONNULL_BEGIN

@interface CNTools : NSObject

+ (instancetype)manager;

//+(BOOL)selectLinkAndPhoneNumber:(YYLabel *)yyLabel CurrentPoint:(CGPoint)point;
/// 请求App配置信息
+ (void)requestAppSettingAndSaveAppInfoWithVersionMsgBlock:(void(^)())versionMsgBlock;
/// 获取分类频道
+ (void)GetClassifyChannelsUrlsAndSave;
// 获取广告信息
+ (void)GetAdvertisingDataSourceWithSuccessBlock:(void(^)(NSDictionary *openScreenAdv))successBlock;
@property (nonatomic, assign) BOOL channelsRequesting;
@property (nonatomic, assign) BOOL channelsRequested;
@property (nonatomic, assign) BOOL appSettingRequesting;

+ (void)createAlertView:(NSString *)phone;

//alert
typedef void(^ConfirmActionBlock)(void);
//+ (id)showAlertWithTitle:(NSString *)title vc:(UIViewController *)vc cancelTitle:(NSString *)cancelTitle confirmTitle:(NSString *)confirmTitle confirmClick:(ConfirmActionBlock)confirmClick;

+ (NSMutableAttributedString * _Nonnull)attributedStringWithText:(NSString *_Nonnull)text font:(CGFloat)font;


#pragma mark - 计算字符数

//去识别url的正则表达式
+ (NSAttributedString *)recognizerLink:(NSMutableAttributedString *)attribut;
#pragma mark 创建联系人
+ (void)createNewContactWithPhoneNum:(NSString *)phoneNum;

/**
 加密前的params转string

 @param parameters 要加密的params
 @return params对应的string
 */
//+ (nullable NSString *)CNENcryptRequestStringFromParameters:(nullable NSDictionary *)parameters;


//设置朋友圈会话已读
//+ (void)readSysMomentConv;

////文字转语音播放
//+ (AVSpeechSynthesizer *)startAVVoiceWithText:(NSString *)text;

#pragma mark - Openinstall 取得参数
/*** 第一次安装获取渠道参数 ***/
+ (void)getOpenisntallFirstInstallParms;

// 渠道id
+ (NSString *)getFrmId;

/*** 验证码获取渠道参数 ***/
+ (void)setFrmId;

/*** 用户一键拉起 ***/
//+ (void)openInstallPullUpParams:(OpeninstallData *)appData urlStr:(NSString *)urlStr;
//
///*** Openisntall用户登录后跳转 ***/
//+ (void)openInstallLoginJumpStr:(NSString *)str;
//
///*** 跳转实现 ***/
//+ (void)jumpVCWithAvtivityUrl:(NSURL *)avtivityUrl;



@end
NS_ASSUME_NONNULL_END