Skip to content

Commit

Permalink
Release 1.4.8
Browse files Browse the repository at this point in the history
1. 修改 Debug 模式,网络异常时,不抛出 Debug Exception
  • Loading branch information
Yuhan ZOU committed May 25, 2016
1 parent 910613e commit 4be93b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion SensorsAnalyticsSDK/SensorsAnalyticsSDK.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "SensorsAnalyticsSDK"
s.version = "1.4.7"
s.version = "1.4.8"
s.summary = "The offical iOS SDK of Sensors Analytics."
s.homepage = "http://www.sensorsdata.cn"
s.source = { :git => 'https://github.com/sensorsdata/sa-sdk-ios.git', :tag => "v#{s.version}" }
Expand Down
14 changes: 4 additions & 10 deletions SensorsAnalyticsSDK/SensorsAnalyticsSDK/SensorsAnalyticsSDK.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#import "SASwizzler.h"
#import "SensorsAnalyticsSDK.h"

#define VERSION @"1.4.7"
#define VERSION @"1.4.8"

#define PROPERTY_LENGTH_LIMITATION 255

Expand Down Expand Up @@ -306,13 +306,7 @@ - (void)flush {
void (^block)(NSData*, NSURLResponse*, NSError*) = ^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSString *errMsg = [NSString stringWithFormat:@"%@ network failure: %@", self, error];
if (_debugMode != SensorsAnalyticsDebugOff) {
@throw [SensorsAnalyticsDebugException exceptionWithName:@"NetworkException"
reason:errMsg
userInfo:nil];
} else {
SAError(@"%@", errMsg);
}
SAError(@"%@", errMsg);
flushSucc = NO;
return;
}
Expand Down Expand Up @@ -1097,8 +1091,8 @@ - (void)setFlushInterval:(UInt64)interval {
- (void)startFlushTimer {
[self stopFlushTimer];
dispatch_async(dispatch_get_main_queue(), ^{
double interval = _flushInterval > 100 ? (double)_flushInterval / 1000.0 : 0.1f;
if (self.flushInterval > 100) {
if (_flushInterval > 0) {
double interval = _flushInterval > 100 ? (double)_flushInterval / 1000.0 : 0.1f;
self.timer = [NSTimer scheduledTimerWithTimeInterval:interval
target:self
selector:@selector(flush)
Expand Down

0 comments on commit 4be93b2

Please sign in to comment.