lpw
2024-06-26 8f01f54b953653ea7e9c2c4b796135978acaa5d1
commit | author | age
6e1425 1 //
H 2 //  GHWHelper.h
3 //  GHWSdk
4 //
5 //  Created by GHW-T-01 on 15/5/21.
6 //  Copyright (c) 2015年 Wuyx. All rights reserved.
7 //
8
9 #import <Foundation/Foundation.h>
10 #import <UIKit/UIKit.h>
11
12
13 @interface WAHelper : NSObject
14 + (NSString *)getMd5_32Bit_String:(NSString *)srcString;
15 + (NSString *)file_md5:(NSString*) path;
16 + (NSString*)getOts;
17 + (id)toArrayOrNSDictionary:(NSString *)jsonString;
572e82 18 + (void)setClientId:(NSString*)newClientId;
6e1425 19 + (void)deleteClientId;
H 20 + (NSString*)getClientId;
21 + (NSString*)getBundleId;
22 + (NSString*)getBuild;
23 + (NSString*)getAppVersion;
24 + (NSString*)getCarrierName;
25 + (NSString*)getFingerId;
26 + (NSString*)getDeviceId;
27 + (void)saveCache:(NSString *const)key withString:(NSString *)value;
28 + (NSString *)getCacheWithKey:(NSString *const)key;
29 + (id)getCacheByKey:(NSString *const)key;
30 + (void)deleteCacheWithKey:(NSString *const)key;
31 + (void)saveCacheWithKey:(NSString *const)key andValue:(id)value;
32 + (void)archivedDataWithRootObject:(id)obj andKey:(NSString *const)key;
33 + (id)unarchiveObjectWithKey:(NSString *const)key;
34 + (void)dictionary:(NSMutableDictionary *)dictionary setObject:(id)object forKey:(id<NSCopying>)key;
35 +(NSString*)toJSONStringFromDictionary:(NSDictionary*)dict;
36 //keychain 增删改
37 +(UIImage*)loadImgWithBundleName:(NSString*)bundleName ImgName:(NSString*)imgName andExt:(NSString*)ext;
38 +(void)saveKeyChainWithObj:(id)obj andKey:(NSString *const)key;
39 +(id)loadObjFromKeyChainWithKey:(NSString *const)key;
40 +(void)deleteObjFromKeyChainWithKey:(NSString *const)key;
8a9285 41
L 42 // group
43 +(BOOL)saveKeyChainWithObj:(id)obj andKey:(NSString *const)key  group:(NSString*)group;
44 +(id)loadObjFromKeyChainWithKey:(NSString *const)key group:(NSString*)group;
45 +(void)deleteObjFromKeyChainWithKey:(NSString *const)key group:(NSString*)group;
46 + (NSString *)getUUID;
47
6e1425 48 +(NSString*)getIDFV;
H 49 +(NSString*)getIDFA;
711726 50 +(NSString*)getSimulateIDFA;
e395b5 51 +(NSArray*)getSimulateIDFAParams;
6e1425 52 +(NSString*)getPreferredLanguage;
8a9285 53
L 54 // 读取提前写入的group钥匙串是否正确 572fb189425e0cc04087b6703f95da3e = md5(thisistestgroupclientid)
55 +(NSString*)getGroupTestSdkClientid;
56 +(NSString*)getGHWTestValidationClientId;
6e1425 57 /**
H 58  *  获取本地时间
59  */
60 +(NSDate*)getLocalTime;
61 +(NSMutableDictionary*)addParam:(id)param andKey:(NSString *const)key forDict:(NSMutableDictionary*)dict;
62 +(UIViewController *)getCurrentVC;
63 +(void)addOrientationNotification:(id)observer selector:(SEL)selector object:(id)object;
64 +(void)removeOrientationNotification:(id)observer object:(id)object;
65 +(NSString *)getMacAddress;
66 /** 设备是否越狱 */
67 + (BOOL)isJailBreak;
68 /** 设置sdk类型 0 国外,1 国内 */
69 +(void)setSDKType:(NSInteger)sdkType;
70 /** 获取sdk类型 0 国外,1 国内 */
71 +(NSInteger)getSDKType;
72
73 +(NSString*)getMsgWithDict:(NSDictionary*)dict;
09e73a 74
L 75
76
77 +(NSMutableArray*)getContryDataSourceArray;
78
79
80
81
6e1425 82 @end