Authored by 周蓉君

修改发送策略枚举值。Review by 阿瑟。

... ... @@ -11,11 +11,11 @@
#import "YHAnalyticsMacro.h"
#import "YH_Analytics_Evevt.h"
typedef enum _YHLogStrategy {
typedef NS_ENUM(NSInteger, YHLogStrategy) {
LogStrategyAppLaunch = 1, //每次程序启动
LogStrategyCustom = 1<<2, //根据时间间隔接口发送
LogStrategyImmedi = 1<<3, // 立即发送
} YHLogStrategy;
LogStrategyCustom = 1<<1, //根据时间间隔接口发送
LogStrategyImmedi = 1<<2 //立即发送
};
@class YHEvent;
@class YHError;
... ...
... ... @@ -280,7 +280,7 @@
self.event.param = param;
// 立即发送策略
if (self.logStrategy == LogStrategyImmedi) {
if ((self.logStrategy & LogStrategyImmedi) != 0) {
[[YHAssemblyAssistant sharedInstance] uploadImmedilyWithEvent:self.event];
} else {
[[YHAssemblyAssistant sharedInstance] saveItemData:self.event];
... ... @@ -304,7 +304,7 @@
self.error.param = param;
// crash 不支持立即发送
if (self.logStrategy == LogStrategyImmedi && ![errorType isEqualToString:kErrorTypeCrash]) {
if ((self.logStrategy & LogStrategyImmedi) != 0 && ![errorType isEqualToString:kErrorTypeCrash]) {
[[YHAssemblyAssistant sharedInstance] uploadImmedilyWithEvent:self.error];
} else {
[[YHAssemblyAssistant sharedInstance] saveItemData:self.error];
... ... @@ -323,7 +323,7 @@
self.perfermance.param = param;
// 立即发送策略
if (self.logStrategy == LogStrategyImmedi) {
if ((self.logStrategy & LogStrategyImmedi) != 0) {
[[YHAssemblyAssistant sharedInstance] uploadImmedilyWithEvent:self.perfermance];
} else {
[[YHAssemblyAssistant sharedInstance] saveItemData:self.perfermance];
... ...