Skip to content

Commit

Permalink
Release 1.11.13
Browse files Browse the repository at this point in the history
  • Loading branch information
wangzhzh committed Sep 21, 2019
1 parent 1026324 commit 308bc2e
Show file tree
Hide file tree
Showing 10 changed files with 206 additions and 100 deletions.
4 changes: 2 additions & 2 deletions Example/SensorsData/JSCallOCViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ - (void)viewDidLoad
[self.view addSubview:webView];

// //网址
// NSString *httpStr=@"https://www.sensorsdata.cn/test/in.html";
// NSString *httpStr = @"https://www.sensorsdata.cn/test/in.html";
// NSURL *httpUrl=[NSURL URLWithString:httpStr];
// NSURLRequest *request=[NSURLRequest requestWithURL:httpUrl];

[webView loadRequest:request];
}

Expand Down
4 changes: 2 additions & 2 deletions Example/SensorsData/JSCallOCViewController2.m
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ - (void)viewDidLoad
[self.view addSubview:_webView];

//网址
// NSString *httpStr=@"https://www.sensorsdata.cn/test/in.html";
// NSString *httpStr = @"https://www.sensorsdata.cn/test/in.html";
// NSURL *httpUrl=[NSURL URLWithString:httpStr];
// NSURLRequest *request=[NSURLRequest requestWithURL:httpUrl];

[self.webView loadRequest:request];

}
Expand Down
10 changes: 9 additions & 1 deletion 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.11.12"
s.version = "1.11.13"
s.summary = "The official 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 Expand Up @@ -126,4 +126,12 @@ Pod::Spec.new do |s|
f.pod_target_xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => 'SENSORS_ANALYTICS_ENABLE_AUTOTRACK_CHILD_VIEWSCREEN=1'}
end

# 禁用 UIWebView
s.subspec 'DISABLE_UIWEBVIEW' do |f|
# 需要使用 WKWebView,支持最低版本为 iOS 8
f.platform = :ios, "8.0"
f.dependency 'SensorsAnalyticsSDK/core'
f.pod_target_xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => 'SENSORS_ANALYTICS_DISABLE_UIWEBVIEW=1'}
end

end
8 changes: 8 additions & 0 deletions SensorsAnalyticsSDK/SALogger.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,12 @@ typedef NS_ENUM(NSUInteger, SALoggerLevel) {
function:(const char *)function
line:(NSUInteger)line
format:(NSString *)format, ... ;

- (void)log:(BOOL)asynchronous
message:(NSString *)message
level:(NSInteger)level
file:(const char *)file
function:(const char *)function
line:(NSUInteger)line;

@end
6 changes: 4 additions & 2 deletions SensorsAnalyticsSDK/SALogger.m
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,10 @@ - (void)log:(BOOL)asynchronous
function:(const char *)function
line:(NSUInteger)line {
@try {
NSString *logMessage = [[NSString alloc] initWithFormat:@"[SALog][%@] %s [line %lu] %s %@", [self descriptionForLevel:level], function, (unsigned long)line, [@"" UTF8String], message.sensorsdata_unicodeString];
NSLog(@"%@", logMessage);
dispatch_async(__logQueue__ , ^{
NSString *logMessage = [[NSString alloc] initWithFormat:@"[SALog][%@] %s [line %lu] %s %@", [self descriptionForLevel:level], function, (unsigned long)line, [@"" UTF8String], message.sensorsdata_unicodeString];
NSLog(@"%@", logMessage);
});
} @catch(NSException *e) {

}
Expand Down
7 changes: 3 additions & 4 deletions SensorsAnalyticsSDK/SensorsAnalyticsExceptionHandler.m
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,9 @@ - (void) sa_handleUncaughtException:(NSException *)exception {
}
});
}

dispatch_sync(instance.serialQueue, ^{

});

// 阻塞当前线程,完成 serialQueue 中数据相关的任务
sensorsdata_dispatch_safe_sync(instance.serialQueue, ^{});
}
SALog(@"Encountered an uncaught exception. All SensorsAnalytics instances were archived.");
} @catch(NSException *exception) {
Expand Down
2 changes: 2 additions & 0 deletions SensorsAnalyticsSDK/SensorsAnalyticsSDK+Private.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ typedef NS_ENUM(NSInteger, SensorsAnalyticsTrackType) {

@property (nonatomic, strong, readonly) SANetwork *network;

@property (nonatomic, weak) UIViewController *previousTrackViewController;

@end


Expand Down
2 changes: 1 addition & 1 deletion SensorsAnalyticsSDK/SensorsAnalyticsSDK.h
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ NS_ASSUME_NONNULL_BEGIN
*
* @param controllers controller ‘字符串’数组
*/
- (void)ignoreAutoTrackViewControllers:(NSArray *)controllers;
- (void)ignoreAutoTrackViewControllers:(NSArray<NSString *> *)controllers;

/**
* @abstract
Expand Down
Loading

0 comments on commit 308bc2e

Please sign in to comment.