Skip to content

Commit

Permalink
Merge pull request #417 from YangSen-qn/resume-check-ctx-expire
Browse files Browse the repository at this point in the history
Resume upload check ctx expire
  • Loading branch information
bachue authored Oct 24, 2022
2 parents 32853c3 + 0fd6f97 commit 42d25c3
Show file tree
Hide file tree
Showing 30 changed files with 229 additions and 125 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Demo
DemoTestResource/
DemoResource/

# System
.DS_Store
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
#Changelog
## 8.5.0 (2022-10-25)
- 优化分片上传 ctx 超时检测
- QNDnsDelegate 代理函数名调整 lookup: 调整为 query:【不兼容变更】
- 移除雾存储区域:华东一区
- 增加亚太-首尔和华东浙江 2 区固定 Region
- 处理网络检测阶段可能出现的并发异常

## 8.4.4 (2022-06-02)
- HappyDns 依赖升至 [v1.0.2](https://github.com/qiniu/happy-dns-objc/releases/tag/v1.0.2)

Expand Down
2 changes: 1 addition & 1 deletion Qiniu.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'Qiniu'
s.version = '8.4.4'
s.version = '8.5.0'
s.summary = 'Qiniu Resource Storage SDK for iOS and Mac'
s.homepage = 'https://github.com/qiniu/objc-sdk'
s.social_media_url = 'http://weibo.com/qiniutek'
Expand Down
34 changes: 21 additions & 13 deletions QiniuDemo/QiniuDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

/* Begin PBXBuildFile section */
26F62ADDD5B6306E978C9A3F /* libPods-QiniuDemoTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 14CB2139715DD7B6FD5B146E /* libPods-QiniuDemoTests.a */; };
2B848FF719DFA7ECB394CA9F /* libPods-QiniuDemo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6B9BC5A8D93F988C1240E05F /* libPods-QiniuDemo.a */; };
4561F02C28D9A6F80098A697 /* UploadResource_14M.zip in Resources */ = {isa = PBXBuildFile; fileRef = 4561F02B28D9A6F80098A697 /* UploadResource_14M.zip */; };
93D230241C86D7F700434F6D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D230231C86D7F700434F6D /* main.m */; };
93D230271C86D7F700434F6D /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D230261C86D7F700434F6D /* AppDelegate.m */; };
93D2302A1C86D7F700434F6D /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D230291C86D7F700434F6D /* ViewController.m */; };
Expand Down Expand Up @@ -40,6 +40,8 @@
14CB2139715DD7B6FD5B146E /* libPods-QiniuDemoTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-QiniuDemoTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
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>"; };
3189882026469145003CCA68 /* QiniuDemo.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = QiniuDemo.entitlements; sourceTree = "<group>"; };
4561F02B28D9A6F80098A697 /* UploadResource_14M.zip */ = {isa = PBXFileReference; lastKnownFileType = archive.zip; path = UploadResource_14M.zip; sourceTree = "<group>"; };
4561F02F28D9AB090098A697 /* Configure.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Configure.h; sourceTree = "<group>"; };
6B9BC5A8D93F988C1240E05F /* libPods-QiniuDemo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-QiniuDemo.a"; sourceTree = BUILT_PRODUCTS_DIR; };
93D2301F1C86D7F700434F6D /* QiniuDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = QiniuDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
93D230231C86D7F700434F6D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -67,7 +69,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
2B848FF719DFA7ECB394CA9F /* libPods-QiniuDemo.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -89,11 +90,13 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
318191A92531516F00D18536 /* DemoTestResource */ = {
4561F02A28D9A6F80098A697 /* DemoResource */ = {
isa = PBXGroup;
children = (
4561F02B28D9A6F80098A697 /* UploadResource_14M.zip */,
4561F02F28D9AB090098A697 /* Configure.h */,
);
path = DemoTestResource;
path = DemoResource;
sourceTree = "<group>";
};
63D8EA8E5532E578D972E007 /* Pods */ = {
Expand Down Expand Up @@ -141,8 +144,8 @@
93D230211C86D7F700434F6D /* QiniuDemo */ = {
isa = PBXGroup;
children = (
4561F02A28D9A6F80098A697 /* DemoResource */,
3189882026469145003CCA68 /* QiniuDemo.entitlements */,
318191A92531516F00D18536 /* DemoTestResource */,
93D230251C86D7F700434F6D /* AppDelegate.h */,
93D230261C86D7F700434F6D /* AppDelegate.m */,
93D230281C86D7F700434F6D /* ViewController.h */,
Expand Down Expand Up @@ -246,12 +249,12 @@
93D230171C86D7F700434F6D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1100;
LastUpgradeCheck = 1340;
ORGANIZATIONNAME = Aaron;
TargetAttributes = {
93D2301E1C86D7F700434F6D = {
CreatedOnToolsVersion = 7.2;
DevelopmentTeam = W2TP34G2MM;
DevelopmentTeam = X2US9XXC6H;
};
93D230371C86D7F700434F6D = {
CreatedOnToolsVersion = 7.2;
Expand Down Expand Up @@ -289,6 +292,7 @@
buildActionMask = 2147483647;
files = (
93D230321C86D7F700434F6D /* LaunchScreen.storyboard in Resources */,
4561F02C28D9A6F80098A697 /* UploadResource_14M.zip in Resources */,
93D2302F1C86D7F700434F6D /* Assets.xcassets in Resources */,
93D2302D1C86D7F700434F6D /* Main.storyboard in Resources */,
);
Expand Down Expand Up @@ -434,6 +438,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand All @@ -458,7 +463,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -489,6 +494,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand All @@ -507,7 +513,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
Expand All @@ -521,9 +527,10 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = QiniuDemo/QiniuDemo.entitlements;
DEVELOPMENT_TEAM = W2TP34G2MM;
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
DEVELOPMENT_TEAM = X2US9XXC6H;
INFOPLIST_FILE = QiniuDemo/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.qiniu.QiniuDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -538,9 +545,10 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = QiniuDemo/QiniuDemo.entitlements;
DEVELOPMENT_TEAM = W2TP34G2MM;
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
DEVELOPMENT_TEAM = X2US9XXC6H;
INFOPLIST_FILE = QiniuDemo/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.qiniu.QiniuDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1100"
LastUpgradeVersion = "1340"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
12 changes: 5 additions & 7 deletions QiniuDemo/QiniuDemo/ViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,10 @@
// Copyright © 2016年 Aaron. All rights reserved.
//

#ifdef YourToken

#if __has_include("Configure.h")
#import "Configure.h" // 测试参数配置,暂时只有token,可删除

#else

#define YourToken @""

#endif

#import "ViewController.h"
Expand Down Expand Up @@ -73,7 +69,7 @@ - (IBAction)uploadAction:(UIButton *)sender {
NSString *path = [[NSBundle mainBundle] pathForResource:@"UploadResource.dmg" ofType:nil];
path = [[NSBundle mainBundle] pathForResource:@"image.png" ofType:nil];
path = [[NSBundle mainBundle] pathForResource:@"image.jpg" ofType:nil];
path = [[NSBundle mainBundle] pathForResource:@"UploadResource_118M.zip" ofType:nil];
path = [[NSBundle mainBundle] pathForResource:@"UploadResource_14M.zip" ofType:nil];
// path = [[NSBundle mainBundle] pathForResource:@"UploadResource_9M.zip" ofType:nil];
// path = [[NSBundle mainBundle] pathForResource:@"UploadResource_49M.zip" ofType:nil];
// path = [[NSBundle mainBundle] pathForResource:@"UploadResource_1.44G.zip" ofType:nil];
Expand Down Expand Up @@ -151,7 +147,9 @@ - (void)uploadImageToQNFilePath:(NSString *)filePath complete:(dispatch_block_t)
builder.putThreshold = 4*1024*1024;
builder.chunkSize = 1*1024*1024;
builder.zone = [[QNFixedZone alloc] initWithUpDomainList:@[kUploadFixHost00, kUploadFixHost01]];
builder.recorder = [QNFileRecorder fileRecorderWithFolder:[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"] error:nil];
NSString *recorderPath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
NSLog(@"== record path:%@", recorderPath);
builder.recorder = [QNFileRecorder fileRecorderWithFolder:recorderPath error:nil];
}];


Expand Down
Loading

0 comments on commit 42d25c3

Please sign in to comment.