Skip to content

Commit 6c58085

Browse files
authored
Merge pull request #376 from qiniu/develop
发布v8.0.5
2 parents 569f989 + 4615eed commit 6c58085

29 files changed

+416
-142
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#Changelog
2+
## 8.0.5(2020-11-18)
3+
## 优化
4+
- 优化无可用Host时的处理逻辑
5+
26
## 8.0.4(2020-11-03)
37
## 优化
48
- 优化Host冻结逻辑带来客户端上传超时问题,提高上传成功率

Qiniu.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'Qiniu'
3-
s.version = '8.0.4'
3+
s.version = '8.0.5'
44
s.summary = 'Qiniu Resource Storage SDK for iOS and Mac'
55
s.homepage = 'https://github.com/qiniu/objc-sdk'
66
s.social_media_url = 'http://weibo.com/qiniutek'

QiniuDemo/Podfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ source 'https://github.com/CocoaPods/Specs.git'
33
target "QiniuDemo" do
44
platform :ios, "7.0"
55

6+
# pod 'Qiniu'
67
pod 'Qiniu',:path => '../'
78
end
89

QiniuDemo/QiniuDemo.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
/* Begin PBXBuildFile section */
1010
26F62ADDD5B6306E978C9A3F /* libPods-QiniuDemoTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 14CB2139715DD7B6FD5B146E /* libPods-QiniuDemoTests.a */; };
1111
2B848FF719DFA7ECB394CA9F /* libPods-QiniuDemo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6B9BC5A8D93F988C1240E05F /* libPods-QiniuDemo.a */; };
12+
31304CA7256368E7001034D2 /* UploadResource_49M.zip in Resources */ = {isa = PBXBuildFile; fileRef = 31304CA6256368E7001034D2 /* UploadResource_49M.zip */; };
1213
318191AB2531516F00D18536 /* UploadResource.dmg in Resources */ = {isa = PBXBuildFile; fileRef = 318191AA2531516F00D18536 /* UploadResource.dmg */; };
1314
93D230241C86D7F700434F6D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D230231C86D7F700434F6D /* main.m */; };
1415
93D230271C86D7F700434F6D /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D230261C86D7F700434F6D /* AppDelegate.m */; };
@@ -40,6 +41,7 @@
4041
/* Begin PBXFileReference section */
4142
14CB2139715DD7B6FD5B146E /* libPods-QiniuDemoTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-QiniuDemoTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
4243
24EE530BBB100BED89B08A3D /* Pods-QiniuDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-QiniuDemo.release.xcconfig"; path = "Pods/Target Support Files/Pods-QiniuDemo/Pods-QiniuDemo.release.xcconfig"; sourceTree = "<group>"; };
44+
31304CA6256368E7001034D2 /* UploadResource_49M.zip */ = {isa = PBXFileReference; lastKnownFileType = archive.zip; path = UploadResource_49M.zip; sourceTree = "<group>"; };
4345
318191AA2531516F00D18536 /* UploadResource.dmg */ = {isa = PBXFileReference; lastKnownFileType = file; path = UploadResource.dmg; sourceTree = "<group>"; };
4446
318191AF25315F3500D18536 /* Configure.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Configure.h; sourceTree = "<group>"; };
4547
6B9BC5A8D93F988C1240E05F /* libPods-QiniuDemo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-QiniuDemo.a"; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -94,6 +96,7 @@
9496
318191A92531516F00D18536 /* DemoTestResource */ = {
9597
isa = PBXGroup;
9698
children = (
99+
31304CA6256368E7001034D2 /* UploadResource_49M.zip */,
97100
318191AF25315F3500D18536 /* Configure.h */,
98101
318191AA2531516F00D18536 /* UploadResource.dmg */,
99102
);
@@ -292,6 +295,7 @@
292295
buildActionMask = 2147483647;
293296
files = (
294297
93D230321C86D7F700434F6D /* LaunchScreen.storyboard in Resources */,
298+
31304CA7256368E7001034D2 /* UploadResource_49M.zip in Resources */,
295299
318191AB2531516F00D18536 /* UploadResource.dmg in Resources */,
296300
93D2302F1C86D7F700434F6D /* Assets.xcassets in Resources */,
297301
93D2302D1C86D7F700434F6D /* Main.storyboard in Resources */,

QiniuDemo/QiniuDemo/ViewController.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ - (IBAction)uploadAction:(UIButton *)sender {
4747
if (self.uploadState == UploadStatePrepare) {
4848

4949
#ifdef YourToken
50-
NSString *path = [[NSBundle mainBundle] pathForResource:@"UploadResource.dmg" ofType:nil];
50+
// NSString *path = [[NSBundle mainBundle] pathForResource:@"UploadResource.dmg" ofType:nil];
51+
NSString *path = [[NSBundle mainBundle] pathForResource:@"UploadResource_49M.zip" ofType:nil];
5152
[self uploadImageToQNFilePath:path];
5253
[self changeUploadState:UploadStateUploading];
5354
#else

QiniuSDK.xcodeproj/project.pbxproj

Lines changed: 162 additions & 29 deletions
Large diffs are not rendered by default.

QiniuSDK/Common/QNErrorCode.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ extern const int kQNLocalIOError;
4848
*/
4949
extern const int kQNMaliciousResponseError;
5050

51+
/**
52+
* 没有可用的Host 错误
53+
*/
54+
extern const int kQNNoUsableHostError;
55+
5156
/**
5257
* 非预期的系统调用 错误
5358
*/

QiniuSDK/Common/QNErrorCode.m

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,17 @@
88

99
#import "QNErrorCode.h"
1010

11+
const int kQNUnexpectedSysCallError = -10;
12+
const int kQNNoUsableHostError = -9;
13+
const int kQNMaliciousResponseError = -8;
14+
const int kQNLocalIOError = -7;
1115
const int kQNZeroDataSize = -6;
1216
const int kQNInvalidToken = -5;
1317
const int kQNFileError = -4;
1418
const int kQNInvalidArgument = -3;
1519
const int kQNRequestCancelled = -2;
1620
const int kQNNetworkError = -1;
17-
const int kQNLocalIOError = -7;
18-
const int kQNMaliciousResponseError = -8;
19-
const int kQNUnexpectedSysCallError = -10;
21+
22+
23+
24+

QiniuSDK/Common/QNZone.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@
66
// Copyright © 2020 Qiniu. All rights reserved.
77
//
88

9-
#import "QNZoneInfo.h"
10-
#import "QNResponseInfo.h"
11-
#import "QNUploadRequestMetrics.h"
9+
#import <Foundation/Foundation.h>
1210

1311
NS_ASSUME_NONNULL_BEGIN
1412

15-
@class QNUpToken, QNZonesInfo, QNUploadRegionRequestMetrics;
13+
@class QNResponseInfo, QNUpToken, QNZonesInfo, QNUploadRegionRequestMetrics;
1614

1715
typedef void (^QNPrequeryReturn)(int code, QNResponseInfo * _Nullable httpResponseInfo, QNUploadRegionRequestMetrics * _Nullable metrics);
1816

QiniuSDK/Http/Dns/QNDnsPrefetch.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ NS_ASSUME_NONNULL_BEGIN
2121

2222
+ (instancetype)shared;
2323

24-
/// 无效缓存,会根据inetAddress的host获取缓存列表,并移除inetAddress
25-
/// @param inetAddress address 信息
26-
- (void)invalidInetAdress:(id <QNIDnsNetworkAddress>)inetAddress;
27-
2824
/// 根据host从缓存中读取DNS信息
2925
/// @param host 域名
3026
- (NSArray <id <QNIDnsNetworkAddress> > *)getInetAddressByHost:(NSString *)host;

0 commit comments

Comments
 (0)