Authored by John Tai

升级接口到v3

... ... @@ -21,23 +21,21 @@
@interface YH_EventCacheManager()
//@property (strong, nonatomic) NSMutableArray *eventCacheArray;
@property (strong, nonatomic) NSMutableArray *performanceCacheArray;
@property (strong, nonatomic) YH_EventDataSession *eventDataSession;
@property (nonatomic, assign) YHEventReportStrategy mode;
@property (nonatomic,strong)YH_PerformanceAppInfo *performanceAppInfo;
@property (nonatomic,strong)NSTimer *timer;
@property (nonatomic,assign)long timeInterval;
@end
@implementation YH_EventCacheManager
static NSString *kParamKeyDevice = @"device";
static NSString *kParamKeyList = @"list";
static NSString *kParamKeyType = @"type";
+ (YH_EventCacheManager *)sharedInstance
{
static YH_EventCacheManager *sharedInstance = nil;
... ... @@ -250,9 +248,10 @@
NSMutableDictionary *performanceAryDic = [[NSMutableDictionary alloc]initWithCapacity:0];
if (IsArrayClass(ary)) {
[performanceAryDic setObject:dataArray forKey:@"list"];
[performanceAryDic setObject:dataArray forKey:kParamKeyList];
}
[performanceAryDic setObject:[YH_EventDataFactory getDataType:type] forKey:@"type"];
[performanceAryDic setObject:[YH_EventDataFactory getDataType:type] forKey:kParamKeyType];
[performanceAryDic setObject:[YH_EventDataFactory getDeviceInfo:self.performanceAppInfo] forKey:kParamKeyDevice];
return performanceAryDic;
}
... ...
... ... @@ -29,6 +29,8 @@
+(NSDictionary *)factoryEventAppInfo:(YH_PerformanceAppInfo*)appInfo;
+(NSDictionary *)getDeviceInfo:(YH_PerformanceAppInfo*)appInfo;
+(NSString *)getPointName:(YHEventReportPointName)pointName;
+(NSString *)getPointType:(YHPointType)pointType;
... ...
... ... @@ -126,12 +126,6 @@
}
NSDictionary *commonInfo = [NSDictionary dictionaryWithObjectsAndKeys:
YOHOAppReportDefaultAPPKey,YOHOAppReportKeyAK,
IsStrEmpty(appInfo.udid)?@"":appInfo.udid,YOHOAppReportKeyUDID,
IsStrEmpty(appInfo.ch)?@"":appInfo.ch,YOHOAppReportKeyCH,
IsStrEmpty(appInfo.os)?@"":appInfo.os,YOHOAppReportKeyOS,
IsStrEmpty(appInfo.osv)?@"":appInfo.osv,YOHOAppReportKeyOSV,
IsStrEmpty(appInfo.dm)?@"":appInfo.dm,YOHOAppReportKeyDM,
IsStrEmpty(appInfo.ps)?@"":appInfo.ps,YOHOAppReportKeyPS,
IsStrEmpty(appInfo.av)?@"":appInfo.av,YOHOAppReportKeyAV,
IsStrEmpty(appInfo.ab)?@"":appInfo.ab,YOHOAppReportKeyAB,
... ... @@ -306,4 +300,16 @@
return str;
}
+(NSDictionary *)getDeviceInfo:(YH_PerformanceAppInfo*)appInfo{
NSDictionary *deviceInfo = [NSDictionary dictionaryWithObjectsAndKeys:
YOHOAppReportDefaultAPPKey,YOHOAppReportKeyAK,
IsStrEmpty(appInfo.udid)?@"":appInfo.udid,YOHOAppReportKeyUDID,
IsStrEmpty(appInfo.ch)?@"":appInfo.ch,YOHOAppReportKeyCH,
IsStrEmpty(appInfo.os)?@"":appInfo.os,YOHOAppReportKeyOS,
IsStrEmpty(appInfo.osv)?@"":appInfo.osv,YOHOAppReportKeyOSV,
IsStrEmpty(appInfo.dm)?@"":appInfo.dm,YOHOAppReportKeyDM,
nil];
return deviceInfo;
}
@end
... ...