Skip to content

Commit 73f1568

Browse files
author
erichmzhang
committed
New COSV4 SDK Release
1 parent 87bdaae commit 73f1568

File tree

4 files changed

+23
-11
lines changed

4 files changed

+23
-11
lines changed

QCloudNewCOSV4.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Pod::Spec.new do |s|
1010
s.name = "QCloudNewCOSV4"
11-
s.version = "5.2.0"
11+
s.version = "5.3.2"
1212
s.summary = "New refactored COSV4 framework"
1313

1414
s.description = <<-DESC
@@ -22,6 +22,6 @@ TODO: Add long description of the pod here.aaa
2222
s.ios.deployment_target = '8.0'
2323
s.source_files = 'QCloudNewCOSV4/Pod/Classes/**'
2424

25-
s.dependency 'QCloudCore','5.2.0'
25+
s.dependency 'QCloudCore','5.3.2'
2626

2727
end

QCloudNewCOSV4/Pod/Classes/QCloudUploadObjectRequest.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,9 @@ - (void) uploadPart:(NSArray*)fileParts
254254
}
255255
if (error) {
256256
[weakSelf onError:error];
257+
if (_queueSource) {
257258
dispatch_source_cancel(weakSelf.queueSource);
259+
}
258260
QCloudLogError(@"上传分片失败%@",error);
259261
return ;
260262
}

QCloudNewCOSV4/README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# 快速集成与入门
22

33
## 前言
4-
** 对于新接入COS SDK的用户,我们推荐使用[基于XML API封装的SDK](https://cloud.tencent.com/document/product/436/11280) **
4+
**对于新接入COS SDK的用户,我们推荐使用[基于XML API封装的SDK](https://cloud.tencent.com/document/product/436/11280)**
5+
对于种种原因仍需要使用V4 SDK的用户,可以使用这一版我们基于旧版本V4 SDK重构后的SDK。
56

67
## 开发准备
78

@@ -11,7 +12,7 @@
1112
需要下载打包好的Framework格式的SDK可以从realease中选择需要的版本进行下载。
1213

1314
更多示例可参考Demo:[iOS Demo](https://github.com/tencentyun/qcloud-sdk-ios-samples.git)
14-
本版本SDK基于JSON API封装组成)
15+
本版本SDK基于COS JSON API封装组成)
1516

1617
### 环境要求
1718

@@ -28,15 +29,13 @@
2829
在Podfile文件中使用:
2930

3031
~~~
31-
pod 'QCloduCOS'
32+
pod 'QCloduCOSNewV4'
3233
~~~
3334

3435
##### 使用打包好的动态库导入
3536

36-
将我们提供的**QCloudCOS.framework和QCloudCore.framework**拖入到工程中:
37-
38-
![](http://ericcheung-1253653367.cosgz.myqcloud.com/%E4%B8%A4%E4%B8%AAframework%E6%88%AA%E5%9B%BE.png)
39-
37+
将我们提供的**QCloudNewCOSV4.framework和QCloudCore.framework**拖入到工程中, 并且勾选 Copy items if needed:
38+
![](http://eric-image-bed-1253653367.cosgz.myqcloud.com/Frameworks%E6%88%AA%E5%9B%BE.png )
4039
并添加以下依赖库:
4140

4241
1. CoreTelephony
@@ -483,6 +482,7 @@ QCloudUpdateFileAttributesRequest* request = [[QCloudUpdateFileAttributesRequest
483482
request.bucket = testBucket;
484483
request.fileName = @"填入文件名";
485484
request.attributes = @"填入自定义属性";
485+
request.flag = QCloudUpdateAttributeFlagBizAttr;
486486
[request setFinishBlock:^(NSDictionary* result, NSError* error) {
487487
//设置完成回调
488488
}];
@@ -496,6 +496,7 @@ QCloudUpdateFileAttributesRequest* request = [[QCloudUpdateFileAttributesRequest
496496
|fileName|NSString||在COS上的文件名|
497497
|customHeaders|NSDictionary*||用户自定义 header,在执行更新操作时,只需填写需要增加或修改的项|
498498
|authority|NSString*||Object 的权限,默认与 Bucket 权限一致,此时不会返回该字段。如果设置了独立权限,则会返回该字段。有效值:eInvalid(空权限),此时系统会默认调取 Bucket 权限,eWRPrivate(私有读写) ,eWPrivateRPublic (公有读私有写)|
499+
|flag|QCloudUpdateAttributeFlag||更新属性的时候需要带上一个flag,更新属性时该flag为QCloudUpdateAttributeFlagBizAttr|
499500
|attributes|NSString*|COS 服务调用方自定义属性,可通过 查询目录属性 获取该属性值|
500501
### 复制文件
501502
#### 示例

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,22 @@
88
- 运行环境为 iOS 8 以上
99

1010
本仓库中只包含了SDK的代码和docset格式的文档。如果需要更多的信息可以浏览腾讯云官网。具体SDK的文档在对应目录下的REAME.md中。
11+
## 产品列表
12+
当前仓库内提供的产品有:
13+
- 基于 COS JSON API 封装的 SDK
14+
- 基于 COS XML API 封装的 SDK
1115

1216
## 集成SDK
13-
您可以通过Cocoapods集成、下载源代码或者使用我们打包好的动态库来进行SDK的集成工作。在这里我们推荐您使用Cocoapods的方式来进行集成。在您的podfile中加入需要集成的库即可。
17+
您可以通过Cocoapods集成、下载源代码或者使用我们打包好的动态库来进行SDK的集成工作。在这里我们推荐您使用Cocoapods的方式来进行集成。在您的podfile中加入需要集成的库即可。
18+
如果需要使用基于XML封装的SDK:
1419
```
1520
pod 'QCloudCOSXML'
1621
```
17-
其他的具体的集成方式可以详见具体库的文档。
22+
如果需要使用基于V4封装的,重构后的SDK:
23+
```
24+
pod 'QCloudNewCOSV4'
25+
```
26+
其他的具体的集成方式进入该SDK所在的文件夹中,查看README可以详见具体库的文档。
1827

1928
## 文档集成
2029
我们提供了docset格式的文档,在仓库的Documents目录中,或者可以从release中下载。您可以直接使用Dash来打开。也可以将文档集成到Xcode中去。

0 commit comments

Comments
 (0)