Skip to content

Commit 0219c4f

Browse files
committed
Merge branch 'master' of code.sohuno.com:ifox-mac/SCNetworkKit
* 'master' of code.sohuno.com:ifox-mac/SCNetworkKit: 支持 tvos add application/octet-stream resume download task only when the task's state is correct Bump up the version SCNetworkDownloadRequest support to limit the download speed Update download state when write data failed Enclose with try-catch, to avoid the crash occasional, https://appcenter.ms/orgs/Mac-ying3-yin1/apps/SHPlayer/crashes/errors/3004720804u/overview Update statusCode in the userinfo when occur HTTP error Add 'SCNResponseParserError_HTTPStatusNotOK' error code # Conflicts: # Example/SCNetworkDemo/Podfile.lock # SCNetworkKit.podspec # SCNetworkKit/Classes/Request/SCNetworkRequest.h bump to 1.0.33
2 parents f9180bd + 815e1af commit 0219c4f

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

Example/SCNetworkDemo/Podfile.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PODS:
22
- SCJSONUtil (2.5.2)
3-
- SCNetworkKit (1.0.26)
3+
- SCNetworkKit (1.0.33)
44

55
DEPENDENCIES:
66
- SCJSONUtil
@@ -16,7 +16,7 @@ EXTERNAL SOURCES:
1616

1717
SPEC CHECKSUMS:
1818
SCJSONUtil: c4ab28a8d976ddf57f4b9f27a8f795f1166c9593
19-
SCNetworkKit: 38cd4075c43f71030dab6ce69c2d0ccd349d155d
19+
SCNetworkKit: d70a7e0c854ff20a8690524ed2ecf41beadbb1af
2020

2121
PODFILE CHECKSUM: 9120efb6f105af6d89aad920d156c216adb37e9f
2222

SCNetworkKit.podspec

+4-3
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,17 @@
99
Pod::Spec.new do |s|
1010

1111
s.name = "SCNetworkKit"
12-
s.version = "1.0.26"
12+
s.version = "1.0.33"
1313
s.summary = "SCNetworkKit is a simple but powerful iOS and OS X networking framework."
1414
s.description = <<-DESC
1515
SCNetworkKit is a simple but powerful iOS and OS X networking framework,based on NSURLSession and NSURLSessionConfiguration, written by Objective-C, Support iOS 7+ ;
1616
DESC
1717
s.homepage = "http://debugly.cn/SCNetworkKit/"
1818
s.license = { :type => "MIT", :file => "LICENSE" }
1919
s.author = { "qianlongxu" => "[email protected]" }
20-
s.ios.deployment_target = "11.0"
21-
s.osx.deployment_target = "10.11"
20+
s.ios.deployment_target = "7.0"
21+
s.osx.deployment_target = "10.10"
22+
s.tvos.deployment_target = "12.0"
2223
s.source = { :git => "https://github.com/debugly/SCNetworkKit.git", :tag => "#{s.version}" }
2324
s.source_files = "SCNetworkKit/Classes/**/*.{h,m}"
2425
s.public_header_files = "SCNetworkKit/Classes/SCNetworkKit.h", "SCNetworkKit/Classes/Util/NSDictionary+SCAddtions.h", "SCNetworkKit/Classes/Util/NSString+SCAddtions.h", "SCNetworkKit/Classes/NetworkService/SCNetworkService*.h", "SCNetworkKit/Classes/Request/SCNetworkRequest.h", "SCNetworkKit/Classes/ResponseParser/*.h"

SCNetworkKit/Classes/Request/SCNetworkRequest.h

+2
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ API_AVAILABLE(macos(10.10),ios(7.0))
9393
@property (nonatomic, assign) BOOL useBreakpointContinuous;
9494
///限速值,单位 bytes,默认 0 不限速
9595
@property (nonatomic, assign) int64_t speedLimit;
96+
///最近一次写入数据时间戳
97+
@property (nonatomic, assign) NSTimeInterval lastWriteDataTime;
9698

9799
@end
98100

SCNetworkKit/Classes/ResponseParser/SCNJSONResponseParser.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ - (instancetype)init
2222
self = [super init];
2323
if (self) {
2424
self.autoRemovesNullValues = YES;
25-
self.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"application/javascript",@"text/json",@"text/javascript",@"text/plain",@"text/html", nil];
25+
self.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"application/javascript",@"application/octet-stream",@"text/json",@"text/javascript",@"text/plain",@"text/html", nil];
2626
}
2727
return self;
2828
}

0 commit comments

Comments
 (0)