Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 42d25c3

Browse files
authoredOct 24, 2022
Merge pull request #417 from YangSen-qn/resume-check-ctx-expire
Resume upload check ctx expire
2 parents 32853c3 + 0fd6f97 commit 42d25c3

30 files changed

+229
-125
lines changed
 

‎.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#Demo
22
DemoTestResource/
3+
DemoResource/
34

45
# System
56
.DS_Store

‎CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
#Changelog
2+
## 8.5.0 (2022-10-25)
3+
- 优化分片上传 ctx 超时检测
4+
- QNDnsDelegate 代理函数名调整 lookup: 调整为 query:【不兼容变更】
5+
- 移除雾存储区域:华东一区
6+
- 增加亚太-首尔和华东浙江 2 区固定 Region
7+
- 处理网络检测阶段可能出现的并发异常
8+
29
## 8.4.4 (2022-06-02)
310
- HappyDns 依赖升至 [v1.0.2](https://github.com/qiniu/happy-dns-objc/releases/tag/v1.0.2)
411

‎Qiniu.podspec

+1-1
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.4.4'
3+
s.version = '8.5.0'
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/QiniuDemo.xcodeproj/project.pbxproj

+21-13
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
/* Begin PBXBuildFile section */
1010
26F62ADDD5B6306E978C9A3F /* libPods-QiniuDemoTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 14CB2139715DD7B6FD5B146E /* libPods-QiniuDemoTests.a */; };
11-
2B848FF719DFA7ECB394CA9F /* libPods-QiniuDemo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6B9BC5A8D93F988C1240E05F /* libPods-QiniuDemo.a */; };
11+
4561F02C28D9A6F80098A697 /* UploadResource_14M.zip in Resources */ = {isa = PBXBuildFile; fileRef = 4561F02B28D9A6F80098A697 /* UploadResource_14M.zip */; };
1212
93D230241C86D7F700434F6D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D230231C86D7F700434F6D /* main.m */; };
1313
93D230271C86D7F700434F6D /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D230261C86D7F700434F6D /* AppDelegate.m */; };
1414
93D2302A1C86D7F700434F6D /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D230291C86D7F700434F6D /* ViewController.m */; };
@@ -40,6 +40,8 @@
4040
14CB2139715DD7B6FD5B146E /* libPods-QiniuDemoTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-QiniuDemoTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
4141
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>"; };
4242
3189882026469145003CCA68 /* QiniuDemo.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = QiniuDemo.entitlements; sourceTree = "<group>"; };
43+
4561F02B28D9A6F80098A697 /* UploadResource_14M.zip */ = {isa = PBXFileReference; lastKnownFileType = archive.zip; path = UploadResource_14M.zip; sourceTree = "<group>"; };
44+
4561F02F28D9AB090098A697 /* Configure.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Configure.h; sourceTree = "<group>"; };
4345
6B9BC5A8D93F988C1240E05F /* libPods-QiniuDemo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-QiniuDemo.a"; sourceTree = BUILT_PRODUCTS_DIR; };
4446
93D2301F1C86D7F700434F6D /* QiniuDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = QiniuDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
4547
93D230231C86D7F700434F6D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
@@ -67,7 +69,6 @@
6769
isa = PBXFrameworksBuildPhase;
6870
buildActionMask = 2147483647;
6971
files = (
70-
2B848FF719DFA7ECB394CA9F /* libPods-QiniuDemo.a in Frameworks */,
7172
);
7273
runOnlyForDeploymentPostprocessing = 0;
7374
};
@@ -89,11 +90,13 @@
8990
/* End PBXFrameworksBuildPhase section */
9091

9192
/* Begin PBXGroup section */
92-
318191A92531516F00D18536 /* DemoTestResource */ = {
93+
4561F02A28D9A6F80098A697 /* DemoResource */ = {
9394
isa = PBXGroup;
9495
children = (
96+
4561F02B28D9A6F80098A697 /* UploadResource_14M.zip */,
97+
4561F02F28D9AB090098A697 /* Configure.h */,
9598
);
96-
path = DemoTestResource;
99+
path = DemoResource;
97100
sourceTree = "<group>";
98101
};
99102
63D8EA8E5532E578D972E007 /* Pods */ = {
@@ -141,8 +144,8 @@
141144
93D230211C86D7F700434F6D /* QiniuDemo */ = {
142145
isa = PBXGroup;
143146
children = (
147+
4561F02A28D9A6F80098A697 /* DemoResource */,
144148
3189882026469145003CCA68 /* QiniuDemo.entitlements */,
145-
318191A92531516F00D18536 /* DemoTestResource */,
146149
93D230251C86D7F700434F6D /* AppDelegate.h */,
147150
93D230261C86D7F700434F6D /* AppDelegate.m */,
148151
93D230281C86D7F700434F6D /* ViewController.h */,
@@ -246,12 +249,12 @@
246249
93D230171C86D7F700434F6D /* Project object */ = {
247250
isa = PBXProject;
248251
attributes = {
249-
LastUpgradeCheck = 1100;
252+
LastUpgradeCheck = 1340;
250253
ORGANIZATIONNAME = Aaron;
251254
TargetAttributes = {
252255
93D2301E1C86D7F700434F6D = {
253256
CreatedOnToolsVersion = 7.2;
254-
DevelopmentTeam = W2TP34G2MM;
257+
DevelopmentTeam = X2US9XXC6H;
255258
};
256259
93D230371C86D7F700434F6D = {
257260
CreatedOnToolsVersion = 7.2;
@@ -289,6 +292,7 @@
289292
buildActionMask = 2147483647;
290293
files = (
291294
93D230321C86D7F700434F6D /* LaunchScreen.storyboard in Resources */,
295+
4561F02C28D9A6F80098A697 /* UploadResource_14M.zip in Resources */,
292296
93D2302F1C86D7F700434F6D /* Assets.xcassets in Resources */,
293297
93D2302D1C86D7F700434F6D /* Main.storyboard in Resources */,
294298
);
@@ -434,6 +438,7 @@
434438
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
435439
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
436440
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
441+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
437442
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
438443
CLANG_WARN_STRICT_PROTOTYPES = YES;
439444
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -458,7 +463,7 @@
458463
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
459464
GCC_WARN_UNUSED_FUNCTION = YES;
460465
GCC_WARN_UNUSED_VARIABLE = YES;
461-
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
466+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
462467
MTL_ENABLE_DEBUG_INFO = YES;
463468
ONLY_ACTIVE_ARCH = YES;
464469
SDKROOT = iphoneos;
@@ -489,6 +494,7 @@
489494
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
490495
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
491496
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
497+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
492498
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
493499
CLANG_WARN_STRICT_PROTOTYPES = YES;
494500
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -507,7 +513,7 @@
507513
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
508514
GCC_WARN_UNUSED_FUNCTION = YES;
509515
GCC_WARN_UNUSED_VARIABLE = YES;
510-
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
516+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
511517
MTL_ENABLE_DEBUG_INFO = NO;
512518
SDKROOT = iphoneos;
513519
TARGETED_DEVICE_FAMILY = "1,2";
@@ -521,9 +527,10 @@
521527
buildSettings = {
522528
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
523529
CODE_SIGN_ENTITLEMENTS = QiniuDemo/QiniuDemo.entitlements;
524-
DEVELOPMENT_TEAM = W2TP34G2MM;
530+
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
531+
DEVELOPMENT_TEAM = X2US9XXC6H;
525532
INFOPLIST_FILE = QiniuDemo/Info.plist;
526-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
533+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
527534
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
528535
PRODUCT_BUNDLE_IDENTIFIER = com.qiniu.QiniuDemo;
529536
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -538,9 +545,10 @@
538545
buildSettings = {
539546
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
540547
CODE_SIGN_ENTITLEMENTS = QiniuDemo/QiniuDemo.entitlements;
541-
DEVELOPMENT_TEAM = W2TP34G2MM;
548+
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
549+
DEVELOPMENT_TEAM = X2US9XXC6H;
542550
INFOPLIST_FILE = QiniuDemo/Info.plist;
543-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
551+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
544552
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
545553
PRODUCT_BUNDLE_IDENTIFIER = com.qiniu.QiniuDemo;
546554
PRODUCT_NAME = "$(TARGET_NAME)";

‎QiniuDemo/QiniuDemo.xcodeproj/xcshareddata/xcschemes/QiniuDemo.xcscheme

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1100"
3+
LastUpgradeVersion = "1340"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

‎QiniuDemo/QiniuDemo/ViewController.m

+5-7
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,10 @@
66
// Copyright © 2016年 Aaron. All rights reserved.
77
//
88

9-
#ifdef YourToken
10-
9+
#if __has_include("Configure.h")
1110
#import "Configure.h" // 测试参数配置,暂时只有token,可删除
12-
1311
#else
14-
1512
#define YourToken @""
16-
1713
#endif
1814

1915
#import "ViewController.h"
@@ -73,7 +69,7 @@ - (IBAction)uploadAction:(UIButton *)sender {
7369
NSString *path = [[NSBundle mainBundle] pathForResource:@"UploadResource.dmg" ofType:nil];
7470
path = [[NSBundle mainBundle] pathForResource:@"image.png" ofType:nil];
7571
path = [[NSBundle mainBundle] pathForResource:@"image.jpg" ofType:nil];
76-
path = [[NSBundle mainBundle] pathForResource:@"UploadResource_118M.zip" ofType:nil];
72+
path = [[NSBundle mainBundle] pathForResource:@"UploadResource_14M.zip" ofType:nil];
7773
// path = [[NSBundle mainBundle] pathForResource:@"UploadResource_9M.zip" ofType:nil];
7874
// path = [[NSBundle mainBundle] pathForResource:@"UploadResource_49M.zip" ofType:nil];
7975
// path = [[NSBundle mainBundle] pathForResource:@"UploadResource_1.44G.zip" ofType:nil];
@@ -151,7 +147,9 @@ - (void)uploadImageToQNFilePath:(NSString *)filePath complete:(dispatch_block_t)
151147
builder.putThreshold = 4*1024*1024;
152148
builder.chunkSize = 1*1024*1024;
153149
builder.zone = [[QNFixedZone alloc] initWithUpDomainList:@[kUploadFixHost00, kUploadFixHost01]];
154-
builder.recorder = [QNFileRecorder fileRecorderWithFolder:[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"] error:nil];
150+
NSString *recorderPath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
151+
NSLog(@"== record path:%@", recorderPath);
152+
builder.recorder = [QNFileRecorder fileRecorderWithFolder:recorderPath error:nil];
155153
}];
156154

157155

0 commit comments

Comments
 (0)
Please sign in to comment.