瀏覽代碼

fix: comile error

Albert Luo 5 年之前
父節點
當前提交
ae58926d73

二進制
Example/ios/AliyunOSSiOS.framework/AliyunOSSiOS 查看文件


+ 20
- 0
Example/ios/AliyunOSSiOS.framework/Headers/AliyunOSSiOS.h 查看文件

@@ -0,0 +1,20 @@
1
+//
2
+//  AliyunOSSiOS.h
3
+//  AliyunOSSiOS
4
+//
5
+//  Created by xuyecan on 28/11/2016.
6
+//  Copyright © 2016 xuyecan. All rights reserved.
7
+//
8
+
9
+#import <UIKit/UIKit.h>
10
+
11
+//! Project version number for AliyunOSSiOS.
12
+FOUNDATION_EXPORT double AliyunOSSiOSVersionNumber;
13
+
14
+//! Project version string for AliyunOSSiOS.
15
+FOUNDATION_EXPORT const unsigned char AliyunOSSiOSVersionString[];
16
+
17
+// In this header, you should import all the public headers of your framework using statements like #import <AliyunOSSiOS/PublicHeader.h>
18
+
19
+#import "OSSService.h"
20
+#import "OSSCompat.h"

+ 26
- 0
Example/ios/AliyunOSSiOS.framework/Headers/OSSBolts.h 查看文件

@@ -0,0 +1,26 @@
1
+/*
2
+ *  Copyright (c) 2014, Facebook, Inc.
3
+ *  All rights reserved.
4
+ *
5
+ *  This source code is licensed under the BSD-style license found in the
6
+ *  LICENSE file in the root directory of this source tree. An additional grant
7
+ *  of patent rights can be found in the PATENTS file in the same directory.
8
+ *
9
+ */
10
+
11
+#import "OSSCancellationToken.h"
12
+#import "OSSCancellationTokenRegistration.h"
13
+#import "OSSCancellationTokenSource.h"
14
+#import "OSSExecutor.h"
15
+#import "OSSTask.h"
16
+#import "OSSTaskCompletionSource.h"
17
+
18
+
19
+NS_ASSUME_NONNULL_BEGIN
20
+
21
+/**
22
+ A string containing the version of the Bolts Framework used by the current application.
23
+ */
24
+extern NSString *const OSSBoltsFrameworkVersionString;
25
+
26
+NS_ASSUME_NONNULL_END

+ 42
- 0
Example/ios/AliyunOSSiOS.framework/Headers/OSSCancellationToken.h 查看文件

@@ -0,0 +1,42 @@
1
+/*
2
+ *  Copyright (c) 2014, Facebook, Inc.
3
+ *  All rights reserved.
4
+ *
5
+ *  This source code is licensed under the BSD-style license found in the
6
+ *  LICENSE file in the root directory of this source tree. An additional grant
7
+ *  of patent rights can be found in the PATENTS file in the same directory.
8
+ *
9
+ */
10
+
11
+#import <Foundation/Foundation.h>
12
+
13
+#import "OSSCancellationTokenRegistration.h"
14
+
15
+NS_ASSUME_NONNULL_BEGIN
16
+
17
+/*!
18
+ A block that will be called when a token is cancelled.
19
+ */
20
+typedef void(^OSSCancellationBlock)();
21
+
22
+/*!
23
+ The consumer view of a CancellationToken.
24
+ Propagates notification that operations should be canceled.
25
+ A OSSCancellationToken has methods to inspect whether the token has been cancelled.
26
+ */
27
+@interface OSSCancellationToken : NSObject
28
+
29
+/*!
30
+ Whether cancellation has been requested for this token source.
31
+ */
32
+@property (nonatomic, assign, readonly, getter=isCancellationRequested) BOOL cancellationRequested;
33
+
34
+/*!
35
+ Register a block to be notified when the token is cancelled.
36
+ If the token is already cancelled the delegate will be notified immediately.
37
+ */
38
+- (OSSCancellationTokenRegistration *)registerCancellationObserverWithBlock:(OSSCancellationBlock)block;
39
+
40
+@end
41
+
42
+NS_ASSUME_NONNULL_END

+ 29
- 0
Example/ios/AliyunOSSiOS.framework/Headers/OSSCancellationTokenRegistration.h 查看文件

@@ -0,0 +1,29 @@
1
+/*
2
+ *  Copyright (c) 2014, Facebook, Inc.
3
+ *  All rights reserved.
4
+ *
5
+ *  This source code is licensed under the BSD-style license found in the
6
+ *  LICENSE file in the root directory of this source tree. An additional grant
7
+ *  of patent rights can be found in the PATENTS file in the same directory.
8
+ *
9
+ */
10
+
11
+#import <Foundation/Foundation.h>
12
+
13
+NS_ASSUME_NONNULL_BEGIN
14
+
15
+/*!
16
+ Represents the registration of a cancellation observer with a cancellation token.
17
+ Can be used to unregister the observer at a later time.
18
+ */
19
+@interface OSSCancellationTokenRegistration : NSObject
20
+
21
+/*!
22
+ Removes the cancellation observer registered with the token
23
+ and releases all resources associated with this registration.
24
+ */
25
+- (void)dispose;
26
+
27
+@end
28
+
29
+NS_ASSUME_NONNULL_END

+ 60
- 0
Example/ios/AliyunOSSiOS.framework/Headers/OSSCancellationTokenSource.h 查看文件

@@ -0,0 +1,60 @@
1
+/*
2
+ *  Copyright (c) 2014, Facebook, Inc.
3
+ *  All rights reserved.
4
+ *
5
+ *  This source code is licensed under the BSD-style license found in the
6
+ *  LICENSE file in the root directory of this source tree. An additional grant
7
+ *  of patent rights can be found in the PATENTS file in the same directory.
8
+ *
9
+ */
10
+
11
+#import <Foundation/Foundation.h>
12
+
13
+NS_ASSUME_NONNULL_BEGIN
14
+
15
+@class OSSCancellationToken;
16
+
17
+/*!
18
+ OSSCancellationTokenSource represents the producer side of a CancellationToken.
19
+ Signals to a CancellationToken that it should be canceled.
20
+ It is a cancellation token that also has methods
21
+ for changing the state of a token by cancelling it.
22
+ */
23
+@interface OSSCancellationTokenSource : NSObject
24
+
25
+/*!
26
+ Creates a new cancellation token source.
27
+ */
28
++ (instancetype)cancellationTokenSource;
29
+
30
+/*!
31
+ The cancellation token associated with this CancellationTokenSource.
32
+ */
33
+@property (nonatomic, strong, readonly) OSSCancellationToken *token;
34
+
35
+/*!
36
+ Whether cancellation has been requested for this token source.
37
+ */
38
+@property (nonatomic, assign, readonly, getter=isCancellationRequested) BOOL cancellationRequested;
39
+
40
+/*!
41
+ Cancels the token if it has not already been cancelled.
42
+ */
43
+- (void)cancel;
44
+
45
+/*!
46
+ Schedules a cancel operation on this CancellationTokenSource after the specified number of milliseconds.
47
+ @param millis The number of milliseconds to wait before completing the returned task.
48
+ If delay is `0` the cancel is executed immediately. If delay is `-1` any scheduled cancellation is stopped.
49
+ */
50
+- (void)cancelAfterDelay:(int)millis;
51
+
52
+/*!
53
+ Releases all resources associated with this token source,
54
+ including disposing of all registrations.
55
+ */
56
+- (void)dispose;
57
+
58
+@end
59
+
60
+NS_ASSUME_NONNULL_END

+ 273
- 0
Example/ios/AliyunOSSiOS.framework/Headers/OSSClient.h 查看文件

@@ -0,0 +1,273 @@
1
+//
2
+//  OSSClient.h
3
+//  oss_ios_sdk
4
+//
5
+//  Created by zhouzhuo on 8/16/15.
6
+//  Copyright (c) 2015 aliyun.com. All rights reserved.
7
+//
8
+
9
+#import <Foundation/Foundation.h>
10
+@class OSSGetServiceRequest;
11
+@class OSSCreateBucketRequest;
12
+@class OSSDeleteBucketRequest;
13
+@class OSSHeadObjectRequest;
14
+@class OSSGetBucketRequest;
15
+@class OSSGetBucketACLRequest;
16
+@class OSSGetObjectRequest;
17
+@class OSSPutObjectRequest;
18
+@class OSSPutObjectACLRequest;
19
+@class OSSDeleteObjectRequest;
20
+@class OSSCopyObjectRequest;
21
+@class OSSInitMultipartUploadRequest;
22
+@class OSSUploadPartRequest;
23
+@class OSSCompleteMultipartUploadRequest;
24
+@class OSSListPartsRequest;
25
+@class OSSAbortMultipartUploadRequest;
26
+@class OSSAppendObjectRequest;
27
+@class OSSResumableUploadRequest;
28
+@class OSSTask;
29
+@class OSSExecutor;
30
+
31
+@class OSSNetworking;
32
+@class OSSClientConfiguration;
33
+@protocol OSSCredentialProvider;
34
+
35
+NS_ASSUME_NONNULL_BEGIN
36
+
37
+/**
38
+ OSSClient是OSS服务的iOS客户端,它为调用者提供了一系列的方法,用于和OSS服务进行交互。
39
+ 一般来说,全局内只需要保持一个OSSClient,用来调用各种操作。
40
+ */
41
+@interface OSSClient : NSObject
42
+
43
+/**
44
+ OSS访问域名
45
+ */
46
+@property (nonatomic, strong) NSString * endpoint;
47
+
48
+/**
49
+ 用以收发网络请求
50
+ */
51
+@property (nonatomic, strong) OSSNetworking * networking;
52
+
53
+/**
54
+ 提供访问所需凭证
55
+ */
56
+@property (nonatomic, strong) id<OSSCredentialProvider> credentialProvider;
57
+
58
+/**
59
+ 客户端设置
60
+ */
61
+@property (nonatomic, strong) OSSClientConfiguration * clientConfiguration;
62
+
63
+/**
64
+ 任务队列
65
+ */
66
+@property (nonatomic, strong, readonly) OSSExecutor * ossOperationExecutor;
67
+
68
+/**
69
+ 初始化OSSClient,使用默认的本地设置
70
+ @endpoint 指明Bucket所在的Region域名,2017年以后苹果要求APP符合ATS政策,这里要写https的endpoint,如 "https://oss-cn-hangzhou.aliyuncs.com"
71
+ @credentialProvider 需要实现的签名器
72
+ */
73
+- (instancetype)initWithEndpoint:(NSString *)endpoint
74
+              credentialProvider:(id<OSSCredentialProvider>) credentialProvider;
75
+
76
+/**
77
+ 初始化OSSClient,使用自定义设置
78
+ @endpoint 指明Bucket所在的Region域名,2017年以后苹果要求APP符合ATS政策,这里要写https的endpoint,如 "https://oss-cn-hangzhou.aliyuncs.com"
79
+ @credentialProvider 需要实现的签名器
80
+ @conf 可以设置一些本地参数如重试次数、超时时间等
81
+ */
82
+- (instancetype)initWithEndpoint:(NSString *)endpoint
83
+              credentialProvider:(id<OSSCredentialProvider>)credentialProvider
84
+             clientConfiguration:(OSSClientConfiguration *)conf;
85
+
86
+#pragma mark restful-api
87
+
88
+/**
89
+ 对应RESTFul API:GetService
90
+ 获取请求者当前拥有的全部Bucket。
91
+ 注意:
92
+ 1. 尚不支持STS;
93
+ 2. 当所有的bucket都返回时,返回的xml中不包含Prefix、Marker、MaxKeys、IsTruncated、NextMarker节点,如果还有部分结果未返回,则增加上述节点,其中NextMarker用于继续查询时给marker赋值。
94
+ */
95
+- (OSSTask *)getService:(OSSGetServiceRequest *)request;
96
+
97
+/**
98
+ 对应RESTFul API:PutBucket
99
+ 用于创建Bucket(不支持匿名访问)。默认情况下,创建的Bucket位于默认的数据中心:oss-cn-hangzhou。
100
+ 用户可以显式指定Bucket位于的数据中心,从而最优化延迟,最小化费用或者满足监管要求等。
101
+ 注意:
102
+ 1. 尚不支持STS。
103
+ */
104
+- (OSSTask *)createBucket:(OSSCreateBucketRequest *)request;
105
+
106
+/**
107
+ 对应RESTFul API:DeleteBucket
108
+ 用于删除某个Bucket。
109
+ */
110
+- (OSSTask *)deleteBucket:(OSSDeleteBucketRequest *)request;
111
+
112
+/**
113
+ 对应RESTFul API:GetBucket
114
+ 用来list Bucket中所有Object的信息,可以通过prefix,marker,delimiter和max-keys对list做限定,返回部分结果。
115
+ */
116
+- (OSSTask *)getBucket:(OSSGetBucketRequest *)request;
117
+
118
+/**
119
+ 对应RESTFul API:GetBucketACL
120
+ 用来获取某个Bucket的访问权限。
121
+ */
122
+- (OSSTask *)getBucketACL:(OSSGetBucketACLRequest *)request;
123
+
124
+/**
125
+ 对应RESTFul API:HeadObject
126
+ 只返回某个Object的meta信息,不返回文件内容。
127
+ */
128
+- (OSSTask *)headObject:(OSSHeadObjectRequest *)request;
129
+
130
+/**
131
+ 对应RESTFul API:GetObject
132
+ 用于获取某个Object,此操作要求用户对该Object有读权限。
133
+ */
134
+- (OSSTask *)getObject:(OSSGetObjectRequest *)request;
135
+
136
+/**
137
+ 对应RESTFul API:PutObject
138
+ 用于上传文件。
139
+ */
140
+- (OSSTask *)putObject:(OSSPutObjectRequest *)request;
141
+
142
+/**
143
+ Put Object ACL接口用于修改Object的访问权限。目前Object有三种访问权限:private, public-read, public-read-write。
144
+ Put Object ACL操作通过Put请求中的“x-oss-object-acl”头来设置,这个操作只有Bucket Owner有权限执行。如果操作成功,则返回200;否则返回相应的错误码和提示信息。
145
+ */
146
+- (OSSTask *)putObjectACL:(OSSPutObjectACLRequest *)request;
147
+
148
+/**
149
+ 对应RESTFul API:AppendObject
150
+ 以追加写的方式上传文件。通过Append Object操作创建的Object类型为Appendable Object,而通过Put Object上传的Object是Normal Object。
151
+ */
152
+- (OSSTask *)appendObject:(OSSAppendObjectRequest *)request;
153
+
154
+/**
155
+ 对应RESTFul API:copyObject
156
+ 拷贝一个在OSS上已经存在的object成另外一个object,可以发送一个PUT请求给OSS,并在PUT请求头中添加元素“x-oss-copy-source”来指定拷贝源。
157
+ OSS会自动判断出这是一个Copy操作,并直接在服务器端执行该操作。如果拷贝成功,则返回新的object信息给用户。
158
+ 该操作适用于拷贝小于1GB的文件。
159
+ */
160
+- (OSSTask *)copyObject:(OSSCopyObjectRequest *)request;
161
+
162
+/**
163
+ 对应RESTFul API:DeleteObject
164
+ 用于删除某个Object。
165
+ */
166
+- (OSSTask *)deleteObject:(OSSDeleteObjectRequest *)request;
167
+
168
+/**
169
+ 对应RESTFul API:InitiateMultipartUpload
170
+ 使用Multipart Upload模式传输数据前,必须先调用该接口来通知OSS初始化一个Multipart Upload事件。该接口会返回一个OSS服务器创建的全局唯一的Upload ID,用于标识本次Multipart Upload事件。
171
+ 用户可以根据这个ID来发起相关的操作,如中止Multipart Upload、查询Multipart Upload等。
172
+ */
173
+- (OSSTask *)multipartUploadInit:(OSSInitMultipartUploadRequest *)request;
174
+
175
+/**
176
+ 对应RESTFul API:UploadPart
177
+ 初始化一个Multipart Upload之后,可以根据指定的Object名和Upload ID来分块(Part)上传数据。
178
+ 每一个上传的Part都有一个标识它的号码(part number,范围是1~10,000)。
179
+ 对于同一个Upload ID,该号码不但唯一标识这一块数据,也标识了这块数据在整个文件内的相对位置。
180
+ 如果你用同一个part号码,上传了新的数据,那么OSS上已有的这个号码的Part数据将被覆盖。除了最后一块Part以外,其他的part最小为100KB;
181
+ 最后一块Part没有大小限制。
182
+ */
183
+- (OSSTask *)uploadPart:(OSSUploadPartRequest *)request;
184
+
185
+/**
186
+ 对应RESTFul API:CompleteMultipartUpload
187
+ 在将所有数据Part都上传完成后,必须调用Complete Multipart Upload API来完成整个文件的Multipart Upload。
188
+ 在执行该操作时,用户必须提供所有有效的数据Part的列表(包括part号码和ETAG);OSS收到用户提交的Part列表后,会逐一验证每个数据Part的有效性。
189
+ 当所有的数据Part验证通过后,OSS将把这些数据part组合成一个完整的Object。
190
+ */
191
+- (OSSTask *)completeMultipartUpload:(OSSCompleteMultipartUploadRequest *)request;
192
+
193
+/**
194
+ 对应RESTFul API:ListParts
195
+ 可以罗列出指定Upload ID所属的所有已经上传成功Part。
196
+ */
197
+- (OSSTask *)listParts:(OSSListPartsRequest *)request;
198
+
199
+/**
200
+ 对应RESTFul API:AbortMultipartUpload
201
+ 该接口可以根据用户提供的Upload ID中止其对应的Multipart Upload事件。
202
+ 当一个Multipart Upload事件被中止后,就不能再使用这个Upload ID做任何操作,已经上传的Part数据也会被删除。
203
+ */
204
+- (OSSTask *)abortMultipartUpload:(OSSAbortMultipartUploadRequest *)request;
205
+
206
+#pragma mark extention method
207
+
208
+/**
209
+ 对一个Object签名出一个URL,可以把该URL转给第三方实现授权访问。
210
+ @bucketName Object所在的Bucket名称
211
+ @objectKey Object名称
212
+ @interval 签名URL时,可以指定这个URL的有效时长是多久,单位是秒,比如说需要有效时长为1小时的URL,这里传入3600
213
+ */
214
+- (OSSTask *)presignConstrainURLWithBucketName:(NSString *)bucketName
215
+                                withObjectKey:(NSString *)objectKey
216
+                       withExpirationInterval:(NSTimeInterval)interval;
217
+
218
+/**
219
+ 对一个Object签名出一个URL,可以把该URL转给第三方实现授权访问。
220
+ @bucketName Object所在的Bucket名称
221
+ @objectKey Object名称
222
+ @interval 签名URL时,可以指定这个URL的有效时长是多久,单位是秒,比如说需要有效时长为1小时的URL,这里传入3600
223
+ @parameter 参数
224
+ */
225
+- (OSSTask *)presignConstrainURLWithBucketName:(NSString *)bucketName
226
+                                 withObjectKey:(NSString *)objectKey
227
+                        withExpirationInterval:(NSTimeInterval)interval
228
+                                withParameters:(NSDictionary *)parameters;
229
+
230
+/**
231
+ 如果Object的权限是公共读或者公共读写,调用这个接口对该Object签名出一个URL,可以把该URL转给第三方实现授权访问。
232
+ @bucketName Object所在的Bucket名称
233
+ @objectKey Object名称
234
+ */
235
+- (OSSTask *)presignPublicURLWithBucketName:(NSString *)bucketName
236
+                            withObjectKey:(NSString *)objectKey;
237
+
238
+/**
239
+ 如果Object的权限是公共读或者公共读写,调用这个接口对该Object签名出一个URL,可以把该URL转给第三方实现授权访问。
240
+ @bucketName Object所在的Bucket名称
241
+ @objectKey Object名称
242
+ @parameter 参数
243
+ */
244
+- (OSSTask *)presignPublicURLWithBucketName:(NSString *)bucketName
245
+                             withObjectKey:(NSString *)objectKey
246
+                             withParameters:(NSDictionary *)parameters;
247
+
248
+/**
249
+ 断点上传接口
250
+ 这个接口封装了分块上传的若干接口以实现断点上传,但是需要用户自行保存UploadId。
251
+ 对一个新文件,用户需要首先调用multipartUploadInit接口获得一个UploadId,然后调用此接口上传这个文件。
252
+ 如果上传失败,首先需要检查一下失败原因:
253
+     如果非不可恢复的失败,那么可以用同一个UploadId和同一文件继续调用这个接口续传
254
+     否则,需要重新获取UploadId,重新上传这个文件。
255
+ 详细参考demo。
256
+ */
257
+- (OSSTask *)resumableUpload:(OSSResumableUploadRequest *)request;
258
+
259
+/**
260
+ 查看某个Object是否存在
261
+ @bucketName Object所在的Bucket名称
262
+ @objectKey Object名称
263
+ 
264
+ return YES                     Object存在
265
+ return NO && *error = nil      Object不存在
266
+ return NO && *error != nil     发生错误
267
+ */
268
+- (BOOL)doesObjectExistInBucket:(NSString *)bucketName
269
+                      objectKey:(NSString *)objectKey
270
+                          error:(const NSError **)error;
271
+@end
272
+
273
+NS_ASSUME_NONNULL_END

+ 81
- 0
Example/ios/AliyunOSSiOS.framework/Headers/OSSCompat.h 查看文件

@@ -0,0 +1,81 @@
1
+//
2
+//  OSSCompat.h
3
+//  oss_ios_sdk_new
4
+//
5
+//  Created by zhouzhuo on 9/10/15.
6
+//  Copyright (c) 2015 aliyun.com. All rights reserved.
7
+//
8
+
9
+#import <Foundation/Foundation.h>
10
+#import "OSSService.h"
11
+
12
+@class OSSCancellationTokenSource;
13
+
14
+typedef OSSCancellationTokenSource OSSTaskHandler;
15
+
16
+@interface OSSClient (Compat)
17
+
18
+/**
19
+ 兼容老版本用法的上传数据接口
20
+ 建议更换使用:putObject
21
+ */
22
+- (OSSTaskHandler *)uploadData:(NSData *)data
23
+               withContentType:(NSString *)contentType
24
+                withObjectMeta:(NSDictionary *)meta
25
+                  toBucketName:(NSString *)bucketName
26
+                   toObjectKey:(NSString *)objectKey
27
+                   onCompleted:(void(^)(BOOL, NSError *))onCompleted
28
+                    onProgress:(void(^)(float progress))onProgress;
29
+
30
+/**
31
+ 兼容老版本用法的下载数据接口
32
+ 建议更换使用:getObject
33
+ */
34
+- (OSSTaskHandler *)downloadToDataFromBucket:(NSString *)bucketName
35
+                   objectKey:(NSString *)objectKey
36
+                 onCompleted:(void(^)(NSData *, NSError *))onCompleted
37
+                  onProgress:(void(^)(float progress))onProgress;
38
+
39
+/**
40
+ 兼容老版本用法的上传文件接口
41
+ 建议更换使用:putObject
42
+ */
43
+- (OSSTaskHandler *)uploadFile:(NSString *)filePath
44
+                withContentType:(NSString *)contentType
45
+                 withObjectMeta:(NSDictionary *)meta
46
+                   toBucketName:(NSString *)bucketName
47
+                    toObjectKey:(NSString *)objectKey
48
+                    onCompleted:(void(^)(BOOL, NSError *))onCompleted
49
+                     onProgress:(void(^)(float progress))onProgress;
50
+
51
+/**
52
+ 兼容老版本用法的下载文件接口
53
+ 建议更换使用:getObject
54
+ */
55
+- (OSSTaskHandler *)downloadToFileFromBucket:(NSString *)bucketName
56
+                  objectKey:(NSString *)objectKey
57
+                     toFile:(NSString *)filePath
58
+                onCompleted:(void(^)(BOOL, NSError *))onCompleted
59
+                 onProgress:(void(^)(float progress))onProgress;
60
+
61
+
62
+/**
63
+ 兼容老版本用法的断点上传文件接口
64
+ 建议更换使用:resumableUpload
65
+ */
66
+- (OSSTaskHandler *)resumableUploadFile:(NSString *)filePath
67
+          withContentType:(NSString *)contentType
68
+           withObjectMeta:(NSDictionary *)meta
69
+             toBucketName:(NSString *)bucketName
70
+              toObjectKey:(NSString *)objectKey
71
+              onCompleted:(void(^)(BOOL, NSError *))onCompleted
72
+               onProgress:(void(^)(float progress))onProgress;
73
+
74
+/**
75
+ 兼容老版本用法的删除Object接口
76
+ 建议更换使用:deleteObject
77
+ */
78
+- (void)deleteObjectInBucket:(NSString *)bucketName
79
+                   objectKey:(NSString *)objectKey
80
+                 onCompleted:(void(^)(BOOL, NSError *))onCompleted;
81
+@end

+ 67
- 0
Example/ios/AliyunOSSiOS.framework/Headers/OSSDefine.h 查看文件

@@ -0,0 +1,67 @@
1
+//
2
+//  OSSDefine.h
3
+//  AliyunOSSiOS
4
+//
5
+//  Created by zhouzhuo on 5/1/16.
6
+//  Copyright © 2016 zhouzhuo. All rights reserved.
7
+//
8
+
9
+#import <Foundation/Foundation.h>
10
+
11
+#ifndef OSSDefine_h
12
+#define OSSDefine_h
13
+
14
+#define OSSUAPrefix                             @"aliyun-sdk-ios"
15
+#define OSSSDKVersion                           @"2.6.1"
16
+
17
+#define OSSListBucketResultXMLTOKEN             @"ListBucketResult"
18
+#define OSSNameXMLTOKEN                         @"Name"
19
+#define OSSDelimiterXMLTOKEN                    @"Delimiter"
20
+#define OSSMarkerXMLTOKEN                       @"Marker"
21
+#define OSSNextMarkerXMLTOKEN                   @"NextMarker"
22
+#define OSSMaxKeysXMLTOKEN                      @"MaxKeys"
23
+#define OSSIsTruncatedXMLTOKEN                  @"IsTruncated"
24
+#define OSSContentsXMLTOKEN                     @"Contents"
25
+#define OSSKeyXMLTOKEN                          @"Key"
26
+#define OSSLastModifiedXMLTOKEN                 @"LastModified"
27
+#define OSSETagXMLTOKEN                         @"ETag"
28
+#define OSSTypeXMLTOKEN                         @"Type"
29
+#define OSSSizeXMLTOKEN                         @"Size"
30
+#define OSSStorageClassXMLTOKEN                 @"StorageClass"
31
+#define OSSCommonPrefixesXMLTOKEN               @"CommonPrefixes"
32
+#define OSSOwnerXMLTOKEN                        @"Owner"
33
+#define OSSAccessControlListXMLTOKEN            @"AccessControlList"
34
+#define OSSGrantXMLTOKEN                        @"Grant"
35
+#define OSSIDXMLTOKEN                           @"ID"
36
+#define OSSDisplayNameXMLTOKEN                  @"DisplayName"
37
+#define OSSBucketsXMLTOKEN                      @"Buckets"
38
+#define OSSBucketXMLTOKEN                       @"Bucket"
39
+#define OSSCreationDate                         @"CreationDate"
40
+#define OSSPrefixXMLTOKEN                       @"Prefix"
41
+#define OSSUploadIdXMLTOKEN                     @"UploadId"
42
+#define OSSLocationXMLTOKEN                     @"Location"
43
+#define OSSNextPartNumberMarkerXMLTOKEN         @"NextPartNumberMarker"
44
+#define OSSMaxPartsXMLTOKEN                     @"MaxParts"
45
+#define OSSPartXMLTOKEN                         @"Part"
46
+#define OSSPartNumberXMLTOKEN                   @"PartNumber"
47
+
48
+#define OSSClientErrorDomain                    @"com.aliyun.oss.clientError"
49
+#define OSSServerErrorDomain                    @"com.aliyun.oss.serverError"
50
+
51
+#define OSSErrorMessageTOKEN                    @"ErrorMessage"
52
+
53
+#define OSSHttpHeaderContentDisposition         @"Content-Disposition"
54
+#define OSSHttpHeaderXOSSCallback               @"x-oss-callback"
55
+#define OSSHttpHeaderXOSSCallbackVar            @"x-oss-callback-var"
56
+#define OSSHttpHeaderContentEncoding            @"Content-Encoding"
57
+#define OSSHttpHeaderContentType                @"Content-Type"
58
+#define OSSHttpHeaderContentMD5                 @"Content-MD5"
59
+#define OSSHttpHeaderCacheControl               @"Cache-Control"
60
+#define OSSHttpHeaderExpires                    @"Expires"
61
+
62
+#define OSSDefaultRetryCount                    3
63
+#define OSSDefaultMaxConcurrentNum              5
64
+#define OSSDefaultTimeoutForRequestInSecond     15
65
+#define OSSDefaultTimeoutForResourceInSecond    7 * 24 * 60 * 60
66
+
67
+#endif /* OSSDefine_h */

+ 62
- 0
Example/ios/AliyunOSSiOS.framework/Headers/OSSExecutor.h 查看文件

@@ -0,0 +1,62 @@
1
+/*
2
+ *  Copyright (c) 2014, Facebook, Inc.
3
+ *  All rights reserved.
4
+ *
5
+ *  This source code is licensed under the BSD-style license found in the
6
+ *  LICENSE file in the root directory of this source tree. An additional grant
7
+ *  of patent rights can be found in the PATENTS file in the same directory.
8
+ *
9
+ */
10
+
11
+#import <Foundation/Foundation.h>
12
+
13
+NS_ASSUME_NONNULL_BEGIN
14
+
15
+/*!
16
+ An object that can run a given block.
17
+ */
18
+@interface OSSExecutor : NSObject
19
+
20
+/*!
21
+ Returns a default executor, which runs continuations immediately until the call stack gets too
22
+ deep, then dispatches to a new GCD queue.
23
+ */
24
++ (instancetype)defaultExecutor;
25
+
26
+/*!
27
+ Returns an executor that runs continuations on the thread where the previous task was completed.
28
+ */
29
++ (instancetype)immediateExecutor;
30
+
31
+/*!
32
+ Returns an executor that runs continuations on the main thread.
33
+ */
34
++ (instancetype)mainThreadExecutor;
35
+
36
+/*!
37
+ Returns a new executor that uses the given block to execute continuations.
38
+ @param block The block to use.
39
+ */
40
++ (instancetype)executorWithBlock:(void(^)(void(^block)()))block;
41
+
42
+/*!
43
+ Returns a new executor that runs continuations on the given queue.
44
+ @param queue The instance of `dispatch_queue_t` to dispatch all continuations onto.
45
+ */
46
++ (instancetype)executorWithDispatchQueue:(dispatch_queue_t)queue;
47
+
48
+/*!
49
+ Returns a new executor that runs continuations on the given queue.
50
+ @param queue The instance of `NSOperationQueue` to run all continuations on.
51
+ */
52
++ (instancetype)executorWithOperationQueue:(NSOperationQueue *)queue;
53
+
54
+/*!
55
+ Runs the given block using this executor's particular strategy.
56
+ @param block The block to execute.
57
+ */
58
+- (void)execute:(void(^)())block;
59
+
60
+@end
61
+
62
+NS_ASSUME_NONNULL_END

+ 40
- 0
Example/ios/AliyunOSSiOS.framework/Headers/OSSLog.h 查看文件

@@ -0,0 +1,40 @@
1
+//
2
+//  OSSLog.h
3
+//  oss_ios_sdk
4
+//
5
+//  Created by zhouzhuo on 8/16/15.
6
+//  Copyright (c) 2015 aliyun.com. All rights reserved.
7
+//
8
+
9
+#import <Foundation/Foundation.h>
10
+
11
+// colorful log configuration
12
+// see https://github.com/robbiehanson/XcodeColors
13
+
14
+#define XCODE_COLORS_ESCAPE @"\033["
15
+
16
+#define XCODE_COLORS_RESET_FG  XCODE_COLORS_ESCAPE @"fg;" // Clear any foreground color
17
+#define XCODE_COLORS_RESET_BG  XCODE_COLORS_ESCAPE @"bg;" // Clear any background color
18
+#define XCODE_COLORS_RESET     XCODE_COLORS_ESCAPE @";"   // Clear any foreground or background color
19
+
20
+#define OSSLogVerbose(frmt, ...)\
21
+if ([OSSLog isLogEnable]) {\
22
+NSLog(@"[Verbose]: %@", [NSString stringWithFormat:(frmt), ##__VA_ARGS__]);\
23
+}
24
+
25
+#define OSSLogDebug(frmt, ...)\
26
+if ([OSSLog isLogEnable]) {\
27
+NSLog(@"[Debug]: %@", [NSString stringWithFormat:(frmt), ##__VA_ARGS__]);\
28
+}
29
+
30
+#define OSSLogError(frmt, ...)\
31
+if ([OSSLog isLogEnable]) {\
32
+NSLog(@"[Error]: %@", [NSString stringWithFormat:(frmt), ##__VA_ARGS__]);\
33
+}
34
+static BOOL isEnable;
35
+
36
+@interface OSSLog : NSObject
37
++ (void)enableLog;
38
++ (void)disableLog;
39
++ (BOOL)isLogEnable;
40
+@end

+ 1303
- 0
Example/ios/AliyunOSSiOS.framework/Headers/OSSModel.h
文件差異過大導致無法顯示
查看文件


+ 143
- 0
Example/ios/AliyunOSSiOS.framework/Headers/OSSNetworking.h 查看文件

@@ -0,0 +1,143 @@
1
+//
2
+//  OSSNetworking.h
3
+//  oss_ios_sdk
4
+//
5
+//  Created by zhouzhuo on 8/16/15.
6
+//  Copyright (c) 2015 aliyun.com. All rights reserved.
7
+//
8
+
9
+#import <Foundation/Foundation.h>
10
+#import "OSSModel.h"
11
+
12
+@class OSSSyncMutableDictionary;
13
+@class OSSNetworkingRequestDelegate;
14
+@class OSSExecutor;
15
+
16
+/**
17
+ 定义重试类型
18
+ */
19
+typedef NS_ENUM(NSInteger, OSSNetworkingRetryType) {
20
+    OSSNetworkingRetryTypeUnknown,
21
+    OSSNetworkingRetryTypeShouldRetry,
22
+    OSSNetworkingRetryTypeShouldNotRetry,
23
+    OSSNetworkingRetryTypeShouldRefreshCredentialsAndRetry,
24
+    OSSNetworkingRetryTypeShouldCorrectClockSkewAndRetry
25
+};
26
+
27
+/**
28
+ 重试处理器
29
+ */
30
+@interface OSSURLRequestRetryHandler : NSObject
31
+@property (nonatomic, assign) uint32_t maxRetryCount;
32
+
33
+- (OSSNetworkingRetryType)shouldRetry:(uint32_t)currentRetryCount
34
+                      requestDelegate:(OSSNetworkingRequestDelegate *)delegate
35
+                             response:(NSHTTPURLResponse *)response
36
+                                error:(NSError *)error;
37
+
38
+- (NSTimeInterval)timeIntervalForRetry:(uint32_t)currentRetryCount
39
+                             retryType:(OSSNetworkingRetryType)retryType;
40
+
41
++ (instancetype)defaultRetryHandler;
42
+@end
43
+
44
+/**
45
+ 网络参数设置
46
+ */
47
+@interface OSSNetworkingConfiguration : NSObject
48
+@property (nonatomic, assign) uint32_t maxRetryCount;
49
+@property (nonatomic, assign) uint32_t maxConcurrentRequestCount;
50
+@property (nonatomic, assign) BOOL enableBackgroundTransmitService;
51
+@property (nonatomic, strong) NSString * backgroundSessionIdentifier;
52
+@property (nonatomic, assign) NSTimeInterval timeoutIntervalForRequest;
53
+@property (nonatomic, assign) NSTimeInterval timeoutIntervalForResource;
54
+@property (nonatomic, strong) NSString * proxyHost;
55
+@property (nonatomic, strong) NSNumber * proxyPort;
56
+@end
57
+
58
+/**
59
+ 对操作发起的每一次请求构造一个信息代理
60
+ */
61
+@interface OSSNetworkingRequestDelegate : NSObject
62
+
63
+@property (nonatomic, strong) NSMutableArray * interceptors;
64
+@property (nonatomic, strong) OSSAllRequestNeededMessage * allNeededMessage;
65
+@property (nonatomic, strong) NSMutableURLRequest * internalRequest;
66
+@property (nonatomic, assign) OSSOperationType operType;
67
+@property (nonatomic, assign) BOOL isAccessViaProxy;
68
+
69
+@property (nonatomic, assign) BOOL isRequestCancelled;
70
+
71
+@property (nonatomic, strong) OSSHttpResponseParser * responseParser;
72
+
73
+@property (nonatomic, strong) NSData * uploadingData;
74
+@property (nonatomic, strong) NSURL * uploadingFileURL;
75
+
76
+@property (nonatomic, assign) int64_t payloadTotalBytesWritten;
77
+
78
+@property (nonatomic, assign) BOOL isBackgroundUploadFileTask;
79
+@property (nonatomic, assign) BOOL isHttpdnsEnable;
80
+
81
+@property (nonatomic, strong) OSSURLRequestRetryHandler * retryHandler;
82
+@property (nonatomic, assign) uint32_t currentRetryCount;
83
+@property (nonatomic, strong) NSError * error;
84
+@property (nonatomic, assign) BOOL isHttpRequestNotSuccessResponse;
85
+@property (nonatomic, strong) NSMutableData * httpRequestNotSuccessResponseBody;
86
+
87
+@property (atomic, strong) NSURLSessionDataTask * currentSessionTask;
88
+
89
+@property (nonatomic, copy) OSSNetworkingUploadProgressBlock uploadProgress;
90
+@property (nonatomic, copy) OSSNetworkingDownloadProgressBlock downloadProgress;
91
+@property (nonatomic, copy) OSSNetworkingCompletionHandlerBlock completionHandler;
92
+@property (nonatomic, copy) OSSNetworkingOnRecieveDataBlock onRecieveData;
93
+
94
+- (OSSTask *)buildInternalHttpRequest;
95
+- (void)reset;
96
+- (void)cancel;
97
+@end
98
+
99
+/**
100
+ 包含一次网络请求所需的所有信息
101
+ */
102
+@interface OSSAllRequestNeededMessage : NSObject
103
+@property (nonatomic, strong) NSString * endpoint;
104
+@property (nonatomic, strong) NSString * httpMethod;
105
+@property (nonatomic, strong) NSString * bucketName;
106
+@property (nonatomic, strong) NSString * objectKey;
107
+@property (nonatomic, strong) NSString * contentType;
108
+@property (nonatomic, strong) NSString * contentMd5;
109
+@property (nonatomic, strong) NSString * range;
110
+@property (nonatomic, strong) NSString * date;
111
+@property (nonatomic, strong) NSMutableDictionary * headerParams;
112
+@property (nonatomic, strong) NSMutableDictionary * querys;
113
+
114
+@property (nonatomic, assign) BOOL isHostInCnameExcludeList;
115
+
116
+- (instancetype)initWithEndpoint:(NSString *)endpoint
117
+                      httpMethod:(NSString *)httpMethod
118
+                      bucketName:(NSString *)bucketName
119
+                       objectKey:(NSString *)objectKey
120
+                            type:(NSString *)contentType
121
+                             md5:(NSString *)contentMd5
122
+                           range:(NSString *)range
123
+                            date:(NSString *)date
124
+                    headerParams:(NSMutableDictionary *)headerParams
125
+                          querys:(NSMutableDictionary *)querys;
126
+
127
+- (OSSTask *)validateRequestParamsInOperationType:(OSSOperationType)operType;
128
+@end
129
+
130
+/**
131
+ 每个OSSClient持有一个OSSNetworking用以收发网络请求
132
+ */
133
+@interface OSSNetworking : NSObject <NSURLSessionDelegate>
134
+@property (nonatomic, strong) NSURLSession * dataSession;
135
+@property (nonatomic, strong) NSURLSession * uploadFileSession;
136
+@property (nonatomic, assign) BOOL isUsingBackgroundSession;
137
+@property (nonatomic, strong) OSSSyncMutableDictionary * sessionDelagateManager;
138
+@property (nonatomic, strong) OSSNetworkingConfiguration * configuration;
139
+@property (nonatomic, strong) OSSExecutor * taskExecutor;
140
+
141
+- (instancetype)initWithConfiguration:(OSSNetworkingConfiguration *)configuration;
142
+- (OSSTask *)sendRequest:(OSSNetworkingRequestDelegate *)request;
143
+@end

+ 20
- 0
Example/ios/AliyunOSSiOS.framework/Headers/OSSService.h 查看文件

@@ -0,0 +1,20 @@
1
+//
2
+//  OSSService.h
3
+//  oss_ios_sdk
4
+//
5
+//  Created by zhouzhuo on 8/20/15.
6
+//  Copyright (c) 2015 aliyun.com. All rights reserved.
7
+//
8
+
9
+#import <Foundation/Foundation.h>
10
+
11
+#define OSS_IOS_SDK_VERSION OSSSDKVersion
12
+
13
+#import "OSSDefine.h"
14
+#import "OSSNetworking.h"
15
+#import "OSSClient.h"
16
+#import "OSSModel.h"
17
+#import "OSSUtil.h"
18
+#import "OSSLog.h"
19
+
20
+#import "OSSBolts.h"

+ 281
- 0
Example/ios/AliyunOSSiOS.framework/Headers/OSSTask.h 查看文件

@@ -0,0 +1,281 @@
1
+/*
2
+ *  Copyright (c) 2014, Facebook, Inc.
3
+ *  All rights reserved.
4
+ *
5
+ *  This source code is licensed under the BSD-style license found in the
6
+ *  LICENSE file in the root directory of this source tree. An additional grant
7
+ *  of patent rights can be found in the PATENTS file in the same directory.
8
+ *
9
+ */
10
+
11
+#import <Foundation/Foundation.h>
12
+
13
+#import "OSSCancellationToken.h"
14
+
15
+NS_ASSUME_NONNULL_BEGIN
16
+
17
+/*!
18
+ Error domain used if there was multiple errors on <OSSTask taskForCompletionOfAllTasks:>.
19
+ */
20
+extern NSString *const OSSTaskErrorDomain;
21
+
22
+/*!
23
+ An error code used for <OSSTask taskForCompletionOfAllTasks:>, if there were multiple errors.
24
+ */
25
+extern NSInteger const kOSSMultipleErrorsError;
26
+
27
+/*!
28
+ An exception that is thrown if there was multiple exceptions on <OSSTask taskForCompletionOfAllTasks:>.
29
+ */
30
+extern NSString *const OSSTaskMultipleExceptionsException;
31
+
32
+/*!
33
+ An error userInfo key used if there were multiple errors on <OSSTask taskForCompletionOfAllTasks:>.
34
+ Value type is `NSArray<NSError *> *`.
35
+ */
36
+extern NSString *const OSSTaskMultipleErrorsUserInfoKey;
37
+
38
+/*!
39
+ An error userInfo key used if there were multiple exceptions on <OSSTask taskForCompletionOfAllTasks:>.
40
+ Value type is `NSArray<NSException *> *`.
41
+ */
42
+extern NSString *const OSSTaskMultipleExceptionsUserInfoKey;
43
+
44
+@class OSSExecutor;
45
+@class OSSTask;
46
+
47
+/*!
48
+ The consumer view of a Task. A OSSTask has methods to
49
+ inspect the state of the task, and to add continuations to
50
+ be run once the task is complete.
51
+ */
52
+@interface OSSTask<__covariant ResultType> : NSObject
53
+
54
+/*!
55
+ A block that can act as a continuation for a task.
56
+ */
57
+typedef __nullable id(^OSSContinuationBlock)(OSSTask<ResultType> *task);
58
+
59
+/*!
60
+ Creates a task that is already completed with the given result.
61
+ @param result The result for the task.
62
+ */
63
++ (instancetype)taskWithResult:(nullable ResultType)result;
64
+
65
+/*!
66
+ Creates a task that is already completed with the given error.
67
+ @param error The error for the task.
68
+ */
69
++ (instancetype)taskWithError:(NSError *)error;
70
+
71
+/*!
72
+ Creates a task that is already completed with the given exception.
73
+ @param exception The exception for the task.
74
+ */
75
++ (instancetype)taskWithException:(NSException *)exception;
76
+
77
+/*!
78
+ Creates a task that is already cancelled.
79
+ */
80
++ (instancetype)cancelledTask;
81
+
82
+/*!
83
+ Returns a task that will be completed (with result == nil) once
84
+ all of the input tasks have completed.
85
+ @param tasks An `NSArray` of the tasks to use as an input.
86
+ */
87
++ (instancetype)taskForCompletionOfAllTasks:(nullable NSArray<OSSTask *> *)tasks;
88
+
89
+/*!
90
+ Returns a task that will be completed once all of the input tasks have completed.
91
+ If all tasks complete successfully without being faulted or cancelled the result will be
92
+ an `NSArray` of all task results in the order they were provided.
93
+ @param tasks An `NSArray` of the tasks to use as an input.
94
+ */
95
++ (instancetype)taskForCompletionOfAllTasksWithResults:(nullable NSArray<OSSTask *> *)tasks;
96
+
97
+/*!
98
+ Returns a task that will be completed once there is at least one successful task.
99
+ The first task to successuly complete will set the result, all other tasks results are 
100
+ ignored.
101
+ @param tasks An `NSArray` of the tasks to use as an input.
102
+ */
103
++ (instancetype)taskForCompletionOfAnyTask:(nullable NSArray<OSSTask *> *)tasks;
104
+
105
+/*!
106
+ Returns a task that will be completed a certain amount of time in the future.
107
+ @param millis The approximate number of milliseconds to wait before the
108
+ task will be finished (with result == nil).
109
+ */
110
++ (instancetype)taskWithDelay:(int)millis;
111
+
112
+/*!
113
+ Returns a task that will be completed a certain amount of time in the future.
114
+ @param millis The approximate number of milliseconds to wait before the
115
+ task will be finished (with result == nil).
116
+ @param token The cancellation token (optional).
117
+ */
118
++ (instancetype)taskWithDelay:(int)millis cancellationToken:(nullable OSSCancellationToken *)token;
119
+
120
+/*!
121
+ Returns a task that will be completed after the given block completes with
122
+ the specified executor.
123
+ @param executor A OSSExecutor responsible for determining how the
124
+ continuation block will be run.
125
+ @param block The block to immediately schedule to run with the given executor.
126
+ @returns A task that will be completed after block has run.
127
+ If block returns a OSSTask, then the task returned from
128
+ this method will not be completed until that task is completed.
129
+ */
130
++ (instancetype)taskFromExecutor:(OSSExecutor *)executor withBlock:(nullable id (^)())block;
131
+
132
+// Properties that will be set on the task once it is completed.
133
+
134
+/*!
135
+ The result of a successful task.
136
+ */
137
+@property (nullable, nonatomic, strong, readonly) ResultType result;
138
+
139
+/*!
140
+ The error of a failed task.
141
+ */
142
+@property (nullable, nonatomic, strong, readonly) NSError *error;
143
+
144
+/*!
145
+ The exception of a failed task.
146
+ */
147
+@property (nullable, nonatomic, strong, readonly) NSException *exception;
148
+
149
+/*!
150
+ Whether this task has been cancelled.
151
+ */
152
+@property (nonatomic, assign, readonly, getter=isCancelled) BOOL cancelled;
153
+
154
+/*!
155
+ Whether this task has completed due to an error or exception.
156
+ */
157
+@property (nonatomic, assign, readonly, getter=isFaulted) BOOL faulted;
158
+
159
+/*!
160
+ Whether this task has completed.
161
+ */
162
+@property (nonatomic, assign, readonly, getter=isCompleted) BOOL completed;
163
+
164
+/*!
165
+ Enqueues the given block to be run once this task is complete.
166
+ This method uses a default execution strategy. The block will be
167
+ run on the thread where the previous task completes, unless the
168
+ the stack depth is too deep, in which case it will be run on a
169
+ dispatch queue with default priority.
170
+ @param block The block to be run once this task is complete.
171
+ @returns A task that will be completed after block has run.
172
+ If block returns a OSSTask, then the task returned from
173
+ this method will not be completed until that task is completed.
174
+ */
175
+- (OSSTask *)continueWithBlock:(OSSContinuationBlock)block;
176
+
177
+/*!
178
+ Enqueues the given block to be run once this task is complete.
179
+ This method uses a default execution strategy. The block will be
180
+ run on the thread where the previous task completes, unless the
181
+ the stack depth is too deep, in which case it will be run on a
182
+ dispatch queue with default priority.
183
+ @param block The block to be run once this task is complete.
184
+ @param cancellationToken The cancellation token (optional).
185
+ @returns A task that will be completed after block has run.
186
+ If block returns a OSSTask, then the task returned from
187
+ this method will not be completed until that task is completed.
188
+ */
189
+- (OSSTask *)continueWithBlock:(OSSContinuationBlock)block cancellationToken:(nullable OSSCancellationToken *)cancellationToken;
190
+
191
+/*!
192
+ Enqueues the given block to be run once this task is complete.
193
+ @param executor A OSSExecutor responsible for determining how the
194
+ continuation block will be run.
195
+ @param block The block to be run once this task is complete.
196
+ @returns A task that will be completed after block has run.
197
+ If block returns a OSSTask, then the task returned from
198
+ this method will not be completed until that task is completed.
199
+ */
200
+- (OSSTask *)continueWithExecutor:(OSSExecutor *)executor withBlock:(OSSContinuationBlock)block;
201
+/*!
202
+ Enqueues the given block to be run once this task is complete.
203
+ @param executor A OSSExecutor responsible for determining how the
204
+ continuation block will be run.
205
+ @param block The block to be run once this task is complete.
206
+ @param cancellationToken The cancellation token (optional).
207
+ @returns A task that will be completed after block has run.
208
+ If block returns a OSSTask, then the task returned from
209
+ his method will not be completed until that task is completed.
210
+ */
211
+- (OSSTask *)continueWithExecutor:(OSSExecutor *)executor
212
+                           block:(OSSContinuationBlock)block
213
+               cancellationToken:(nullable OSSCancellationToken *)cancellationToken;
214
+
215
+/*!
216
+ Identical to continueWithBlock:, except that the block is only run
217
+ if this task did not produce a cancellation, error, or exception.
218
+ If it did, then the failure will be propagated to the returned
219
+ task.
220
+ @param block The block to be run once this task is complete.
221
+ @returns A task that will be completed after block has run.
222
+ If block returns a OSSTask, then the task returned from
223
+ this method will not be completed until that task is completed.
224
+ */
225
+- (OSSTask *)continueWithSuccessBlock:(OSSContinuationBlock)block;
226
+
227
+/*!
228
+ Identical to continueWithBlock:, except that the block is only run
229
+ if this task did not produce a cancellation, error, or exception.
230
+ If it did, then the failure will be propagated to the returned
231
+ task.
232
+ @param block The block to be run once this task is complete.
233
+ @param cancellationToken The cancellation token (optional).
234
+ @returns A task that will be completed after block has run.
235
+ If block returns a OSSTask, then the task returned from
236
+ this method will not be completed until that task is completed.
237
+ */
238
+- (OSSTask *)continueWithSuccessBlock:(OSSContinuationBlock)block cancellationToken:(nullable OSSCancellationToken *)cancellationToken;
239
+
240
+/*!
241
+ Identical to continueWithExecutor:withBlock:, except that the block
242
+ is only run if this task did not produce a cancellation, error, or
243
+ exception. If it did, then the failure will be propagated to the
244
+ returned task.
245
+ @param executor A OSSExecutor responsible for determining how the
246
+ continuation block will be run.
247
+ @param block The block to be run once this task is complete.
248
+ @returns A task that will be completed after block has run.
249
+ If block returns a OSSTask, then the task returned from
250
+ this method will not be completed until that task is completed.
251
+ */
252
+- (OSSTask *)continueWithExecutor:(OSSExecutor *)executor withSuccessBlock:(OSSContinuationBlock)block;
253
+
254
+/*!
255
+ Identical to continueWithExecutor:withBlock:, except that the block
256
+ is only run if this task did not produce a cancellation, error, or
257
+ exception. If it did, then the failure will be propagated to the
258
+ returned task.
259
+ @param executor A OSSExecutor responsible for determining how the
260
+ continuation block will be run.
261
+ @param block The block to be run once this task is complete.
262
+ @param cancellationToken The cancellation token (optional).
263
+ @returns A task that will be completed after block has run.
264
+ If block returns a OSSTask, then the task returned from
265
+ this method will not be completed until that task is completed.
266
+ */
267
+- (OSSTask *)continueWithExecutor:(OSSExecutor *)executor
268
+                    successBlock:(OSSContinuationBlock)block
269
+               cancellationToken:(nullable OSSCancellationToken *)cancellationToken;
270
+
271
+/*!
272
+ Waits until this operation is completed.
273
+ This method is inefficient and consumes a thread resource while
274
+ it's running. It should be avoided. This method logs a warning
275
+ message if it is used on the main thread.
276
+ */
277
+- (void)waitUntilFinished;
278
+
279
+@end
280
+
281
+NS_ASSUME_NONNULL_END

+ 89
- 0
Example/ios/AliyunOSSiOS.framework/Headers/OSSTaskCompletionSource.h 查看文件

@@ -0,0 +1,89 @@
1
+/*
2
+ *  Copyright (c) 2014, Facebook, Inc.
3
+ *  All rights reserved.
4
+ *
5
+ *  This source code is licensed under the BSD-style license found in the
6
+ *  LICENSE file in the root directory of this source tree. An additional grant
7
+ *  of patent rights can be found in the PATENTS file in the same directory.
8
+ *
9
+ */
10
+
11
+#import <Foundation/Foundation.h>
12
+
13
+NS_ASSUME_NONNULL_BEGIN
14
+
15
+@class OSSTask<ResultType>;
16
+
17
+/*!
18
+ A OSSTaskCompletionSource represents the producer side of tasks.
19
+ It is a task that also has methods for changing the state of the
20
+ task by settings its completion values.
21
+ */
22
+@interface OSSTaskCompletionSource<__covariant ResultType> : NSObject
23
+
24
+/*!
25
+ Creates a new unfinished task.
26
+ */
27
++ (instancetype)taskCompletionSource;
28
+
29
+/*!
30
+ The task associated with this TaskCompletionSource.
31
+ */
32
+@property (nonatomic, strong, readonly) OSSTask<ResultType> *task;
33
+
34
+/*!
35
+ Completes the task by setting the result.
36
+ Attempting to set this for a completed task will raise an exception.
37
+ @param result The result of the task.
38
+ */
39
+- (void)setResult:(nullable ResultType)result;
40
+
41
+/*!
42
+ Completes the task by setting the error.
43
+ Attempting to set this for a completed task will raise an exception.
44
+ @param error The error for the task.
45
+ */
46
+- (void)setError:(NSError *)error;
47
+
48
+/*!
49
+ Completes the task by setting an exception.
50
+ Attempting to set this for a completed task will raise an exception.
51
+ @param exception The exception for the task.
52
+ */
53
+- (void)setException:(NSException *)exception;
54
+
55
+/*!
56
+ Completes the task by marking it as cancelled.
57
+ Attempting to set this for a completed task will raise an exception.
58
+ */
59
+- (void)cancel;
60
+
61
+/*!
62
+ Sets the result of the task if it wasn't already completed.
63
+ @returns whether the new value was set.
64
+ */
65
+- (BOOL)trySetResult:(nullable ResultType)result;
66
+
67
+/*!
68
+ Sets the error of the task if it wasn't already completed.
69
+ @param error The error for the task.
70
+ @returns whether the new value was set.
71
+ */
72
+- (BOOL)trySetError:(NSError *)error;
73
+
74
+/*!
75
+ Sets the exception of the task if it wasn't already completed.
76
+ @param exception The exception for the task.
77
+ @returns whether the new value was set.
78
+ */
79
+- (BOOL)trySetException:(NSException *)exception;
80
+
81
+/*!
82
+ Sets the cancellation state of the task if it wasn't already completed.
83
+ @returns whether the new value was set.
84
+ */
85
+- (BOOL)trySetCancelled;
86
+
87
+@end
88
+
89
+NS_ASSUME_NONNULL_END

+ 37
- 0
Example/ios/AliyunOSSiOS.framework/Headers/OSSUtil.h 查看文件

@@ -0,0 +1,37 @@
1
+//
2
+//  OSSUtil.h
3
+//  oss_ios_sdk
4
+//
5
+//  Created by zhouzhuo on 8/16/15.
6
+//  Copyright (c) 2015 aliyun.com. All rights reserved.
7
+//
8
+
9
+#import <Foundation/Foundation.h>
10
+
11
+@class OSSFederationToken;
12
+
13
+@interface OSSUtil : NSObject
14
+
15
++ (NSString *)calBase64Sha1WithData:(NSString *)data withSecret:(NSString *)key;
16
++ (NSString *)calBase64WithData:(uint8_t *)data;
17
++ (NSString *)encodeURL:(NSString *)url;
18
++ (NSData *)constructHttpBodyFromPartInfos:(NSArray *)partInfos;
19
++ (NSData *)constructHttpBodyForCreateBucketWithLocation:(NSString *)location;
20
++ (BOOL)validateBucketName:(NSString *)bucketName;
21
++ (BOOL)validateObjectKey:(NSString *)objectKey;
22
++ (BOOL)isOssOriginBucketHost:(NSString *)host;
23
++ (NSString *)getIpByHost:(NSString *)host;
24
++ (BOOL)isNetworkDelegateState;
25
++ (NSString *)dataMD5String:(NSData *)data;
26
++ (NSString *)fileMD5String:(NSString *)path;
27
++ (NSString*)base64ForData:(uint8_t *)input length:(int32_t)length;
28
++ (NSString *)base64Md5ForData:(NSData *)data;
29
++ (NSString *)base64Md5ForFilePath:(NSString *)filePath;
30
++ (NSString *)base64Md5ForFileURL:(NSURL *)fileURL;
31
++ (NSString *)populateSubresourceStringFromParameter:(NSDictionary *)parameters;
32
++ (NSString *)populateQueryStringFromParameter:(NSDictionary *)parameters;
33
++ (BOOL)isSubresource:(NSString *)param;
34
++ (NSString *)sign:(NSString *)content withToken:(OSSFederationToken *)token;
35
++ (NSString *)getRelativePath:(NSString *)fullPath;
36
++ (NSString *)detemineMimeTypeForFilePath:(NSString *)filePath uploadName:(NSString *)uploadName;
37
+@end

+ 6
- 0
Example/ios/AliyunOSSiOS.framework/Modules/module.modulemap 查看文件

@@ -0,0 +1,6 @@
1
+framework module AliyunOSSiOS {
2
+  umbrella header "AliyunOSSiOS.h"
3
+
4
+  export *
5
+  module * { export * }
6
+}

+ 158
- 4
Example/ios/Example.xcodeproj/project.pbxproj 查看文件

@@ -40,7 +40,6 @@
40 40
 		3EEFBBCF20CCF44400A55F2E /* libresolv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 3EEFBBCE20CCF44400A55F2E /* libresolv.tbd */; };
41 41
 		3EEFBBD120CCF45200A55F2E /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3EEFBBD020CCF45200A55F2E /* CoreTelephony.framework */; };
42 42
 		3EEFBBD320CCF45B00A55F2E /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3EEFBBD220CCF45B00A55F2E /* SystemConfiguration.framework */; };
43
-		3EEFBC3E20CCF79B00A55F2E /* AliyunOSSiOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3EEFBC3D20CCF79A00A55F2E /* AliyunOSSiOS.framework */; };
44 43
 		5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; };
45 44
 		832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
46 45
 		ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */; };
@@ -215,6 +214,76 @@
215 214
 			remoteGlobalIDString = 3D3CD9181DE5FBD800167DC4;
216 215
 			remoteInfo = "jschelpers-tvOS";
217 216
 		};
217
+		3EA1B26520EB49E9006F8C30 /* PBXContainerItemProxy */ = {
218
+			isa = PBXContainerItemProxy;
219
+			containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
220
+			proxyType = 2;
221
+			remoteGlobalIDString = 3DBE0D001F3B181A0099AA32;
222
+			remoteInfo = fishhook;
223
+		};
224
+		3EA1B26720EB49E9006F8C30 /* PBXContainerItemProxy */ = {
225
+			isa = PBXContainerItemProxy;
226
+			containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
227
+			proxyType = 2;
228
+			remoteGlobalIDString = 3DBE0D0D1F3B181C0099AA32;
229
+			remoteInfo = "fishhook-tvOS";
230
+		};
231
+		3EA1B27920EB49E9006F8C30 /* PBXContainerItemProxy */ = {
232
+			isa = PBXContainerItemProxy;
233
+			containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
234
+			proxyType = 2;
235
+			remoteGlobalIDString = EBF21BDC1FC498900052F4D5;
236
+			remoteInfo = jsinspector;
237
+		};
238
+		3EA1B27B20EB49E9006F8C30 /* PBXContainerItemProxy */ = {
239
+			isa = PBXContainerItemProxy;
240
+			containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
241
+			proxyType = 2;
242
+			remoteGlobalIDString = EBF21BFA1FC4989A0052F4D5;
243
+			remoteInfo = "jsinspector-tvOS";
244
+		};
245
+		3EA1B27D20EB49E9006F8C30 /* PBXContainerItemProxy */ = {
246
+			isa = PBXContainerItemProxy;
247
+			containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
248
+			proxyType = 2;
249
+			remoteGlobalIDString = 139D7ECE1E25DB7D00323FB7;
250
+			remoteInfo = "third-party";
251
+		};
252
+		3EA1B27F20EB49E9006F8C30 /* PBXContainerItemProxy */ = {
253
+			isa = PBXContainerItemProxy;
254
+			containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
255
+			proxyType = 2;
256
+			remoteGlobalIDString = 3D383D3C1EBD27B6005632C8;
257
+			remoteInfo = "third-party-tvOS";
258
+		};
259
+		3EA1B28120EB49E9006F8C30 /* PBXContainerItemProxy */ = {
260
+			isa = PBXContainerItemProxy;
261
+			containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
262
+			proxyType = 2;
263
+			remoteGlobalIDString = 139D7E881E25C6D100323FB7;
264
+			remoteInfo = "double-conversion";
265
+		};
266
+		3EA1B28320EB49E9006F8C30 /* PBXContainerItemProxy */ = {
267
+			isa = PBXContainerItemProxy;
268
+			containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
269
+			proxyType = 2;
270
+			remoteGlobalIDString = 3D383D621EBD27B9005632C8;
271
+			remoteInfo = "double-conversion-tvOS";
272
+		};
273
+		3EA1B28520EB49E9006F8C30 /* PBXContainerItemProxy */ = {
274
+			isa = PBXContainerItemProxy;
275
+			containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
276
+			proxyType = 2;
277
+			remoteGlobalIDString = 9936F3131F5F2E4B0010BF04;
278
+			remoteInfo = privatedata;
279
+		};
280
+		3EA1B28720EB49E9006F8C30 /* PBXContainerItemProxy */ = {
281
+			isa = PBXContainerItemProxy;
282
+			containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
283
+			proxyType = 2;
284
+			remoteGlobalIDString = 9936F32F1F5F2E5B0010BF04;
285
+			remoteInfo = "privatedata-tvOS";
286
+		};
218 287
 		3EEFBC3820CCF73300A55F2E /* PBXContainerItemProxy */ = {
219 288
 			isa = PBXContainerItemProxy;
220 289
 			containerPortal = 46BEA5E531C04237A969A4C2 /* RNAliyunOSS.xcodeproj */;
@@ -292,7 +361,6 @@
292 361
 		3EEFBBCE20CCF44400A55F2E /* libresolv.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libresolv.tbd; path = usr/lib/libresolv.tbd; sourceTree = SDKROOT; };
293 362
 		3EEFBBD020CCF45200A55F2E /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; };
294 363
 		3EEFBBD220CCF45B00A55F2E /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
295
-		3EEFBC3D20CCF79A00A55F2E /* AliyunOSSiOS.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AliyunOSSiOS.framework; path = "../node_modules/aliyun-oss-react-native/ios/AliyunSDK/AliyunOSSiOS.framework"; sourceTree = "<group>"; };
296 364
 		46BEA5E531C04237A969A4C2 /* RNAliyunOSS.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNAliyunOSS.xcodeproj; path = "../node_modules/aliyun-oss-react-native/ios/RNAliyunOSS.xcodeproj"; sourceTree = "<group>"; };
297 365
 		5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = "<group>"; };
298 366
 		78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; };
@@ -331,7 +399,6 @@
331 399
 				139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */,
332 400
 				832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */,
333 401
 				00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */,
334
-				3EEFBC3E20CCF79B00A55F2E /* AliyunOSSiOS.framework in Frameworks */,
335 402
 				139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
336 403
 				007900295C044ECCBA7BE212 /* libRNAliyunOSS.a in Frameworks */,
337 404
 				00341B0CCE814E85BA2A8217 /* libRNImagePicker.a in Frameworks */,
@@ -437,6 +504,8 @@
437 504
 			children = (
438 505
 				139FDEF41B06529B00C62182 /* libRCTWebSocket.a */,
439 506
 				3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */,
507
+				3EA1B26620EB49E9006F8C30 /* libfishhook.a */,
508
+				3EA1B26820EB49E9006F8C30 /* libfishhook-tvOS.a */,
440 509
 			);
441 510
 			name = Products;
442 511
 			sourceTree = "<group>";
@@ -466,6 +535,14 @@
466 535
 				3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */,
467 536
 				3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */,
468 537
 				3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */,
538
+				3EA1B27A20EB49E9006F8C30 /* libjsinspector.a */,
539
+				3EA1B27C20EB49E9006F8C30 /* libjsinspector-tvOS.a */,
540
+				3EA1B27E20EB49E9006F8C30 /* libthird-party.a */,
541
+				3EA1B28020EB49E9006F8C30 /* libthird-party.a */,
542
+				3EA1B28220EB49E9006F8C30 /* libdouble-conversion.a */,
543
+				3EA1B28420EB49E9006F8C30 /* libdouble-conversion.a */,
544
+				3EA1B28620EB49E9006F8C30 /* libprivatedata.a */,
545
+				3EA1B28820EB49E9006F8C30 /* libprivatedata-tvOS.a */,
469 546
 			);
470 547
 			name = Products;
471 548
 			sourceTree = "<group>";
@@ -473,7 +550,6 @@
473 550
 		2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
474 551
 			isa = PBXGroup;
475 552
 			children = (
476
-				3EEFBC3D20CCF79A00A55F2E /* AliyunOSSiOS.framework */,
477 553
 				3EEFBBD220CCF45B00A55F2E /* SystemConfiguration.framework */,
478 554
 				3EEFBBD020CCF45200A55F2E /* CoreTelephony.framework */,
479 555
 				3EEFBBCE20CCF44400A55F2E /* libresolv.tbd */,
@@ -923,6 +999,76 @@
923 999
 			remoteRef = 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */;
924 1000
 			sourceTree = BUILT_PRODUCTS_DIR;
925 1001
 		};
1002
+		3EA1B26620EB49E9006F8C30 /* libfishhook.a */ = {
1003
+			isa = PBXReferenceProxy;
1004
+			fileType = archive.ar;
1005
+			path = libfishhook.a;
1006
+			remoteRef = 3EA1B26520EB49E9006F8C30 /* PBXContainerItemProxy */;
1007
+			sourceTree = BUILT_PRODUCTS_DIR;
1008
+		};
1009
+		3EA1B26820EB49E9006F8C30 /* libfishhook-tvOS.a */ = {
1010
+			isa = PBXReferenceProxy;
1011
+			fileType = archive.ar;
1012
+			path = "libfishhook-tvOS.a";
1013
+			remoteRef = 3EA1B26720EB49E9006F8C30 /* PBXContainerItemProxy */;
1014
+			sourceTree = BUILT_PRODUCTS_DIR;
1015
+		};
1016
+		3EA1B27A20EB49E9006F8C30 /* libjsinspector.a */ = {
1017
+			isa = PBXReferenceProxy;
1018
+			fileType = archive.ar;
1019
+			path = libjsinspector.a;
1020
+			remoteRef = 3EA1B27920EB49E9006F8C30 /* PBXContainerItemProxy */;
1021
+			sourceTree = BUILT_PRODUCTS_DIR;
1022
+		};
1023
+		3EA1B27C20EB49E9006F8C30 /* libjsinspector-tvOS.a */ = {
1024
+			isa = PBXReferenceProxy;
1025
+			fileType = archive.ar;
1026
+			path = "libjsinspector-tvOS.a";
1027
+			remoteRef = 3EA1B27B20EB49E9006F8C30 /* PBXContainerItemProxy */;
1028
+			sourceTree = BUILT_PRODUCTS_DIR;
1029
+		};
1030
+		3EA1B27E20EB49E9006F8C30 /* libthird-party.a */ = {
1031
+			isa = PBXReferenceProxy;
1032
+			fileType = archive.ar;
1033
+			path = "libthird-party.a";
1034
+			remoteRef = 3EA1B27D20EB49E9006F8C30 /* PBXContainerItemProxy */;
1035
+			sourceTree = BUILT_PRODUCTS_DIR;
1036
+		};
1037
+		3EA1B28020EB49E9006F8C30 /* libthird-party.a */ = {
1038
+			isa = PBXReferenceProxy;
1039
+			fileType = archive.ar;
1040
+			path = "libthird-party.a";
1041
+			remoteRef = 3EA1B27F20EB49E9006F8C30 /* PBXContainerItemProxy */;
1042
+			sourceTree = BUILT_PRODUCTS_DIR;
1043
+		};
1044
+		3EA1B28220EB49E9006F8C30 /* libdouble-conversion.a */ = {
1045
+			isa = PBXReferenceProxy;
1046
+			fileType = archive.ar;
1047
+			path = "libdouble-conversion.a";
1048
+			remoteRef = 3EA1B28120EB49E9006F8C30 /* PBXContainerItemProxy */;
1049
+			sourceTree = BUILT_PRODUCTS_DIR;
1050
+		};
1051
+		3EA1B28420EB49E9006F8C30 /* libdouble-conversion.a */ = {
1052
+			isa = PBXReferenceProxy;
1053
+			fileType = archive.ar;
1054
+			path = "libdouble-conversion.a";
1055
+			remoteRef = 3EA1B28320EB49E9006F8C30 /* PBXContainerItemProxy */;
1056
+			sourceTree = BUILT_PRODUCTS_DIR;
1057
+		};
1058
+		3EA1B28620EB49E9006F8C30 /* libprivatedata.a */ = {
1059
+			isa = PBXReferenceProxy;
1060
+			fileType = archive.ar;
1061
+			path = libprivatedata.a;
1062
+			remoteRef = 3EA1B28520EB49E9006F8C30 /* PBXContainerItemProxy */;
1063
+			sourceTree = BUILT_PRODUCTS_DIR;
1064
+		};
1065
+		3EA1B28820EB49E9006F8C30 /* libprivatedata-tvOS.a */ = {
1066
+			isa = PBXReferenceProxy;
1067
+			fileType = archive.ar;
1068
+			path = "libprivatedata-tvOS.a";
1069
+			remoteRef = 3EA1B28720EB49E9006F8C30 /* PBXContainerItemProxy */;
1070
+			sourceTree = BUILT_PRODUCTS_DIR;
1071
+		};
926 1072
 		3EEFBC3920CCF73300A55F2E /* libRNAliyunOSS.a */ = {
927 1073
 			isa = PBXReferenceProxy;
928 1074
 			fileType = archive.ar;
@@ -1165,6 +1311,10 @@
1165 1311
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
1166 1312
 				CURRENT_PROJECT_VERSION = 1;
1167 1313
 				DEAD_CODE_STRIPPING = NO;
1314
+				FRAMEWORK_SEARCH_PATHS = (
1315
+					"$(inherited)",
1316
+					"$(PROJECT_DIR)",
1317
+				);
1168 1318
 				HEADER_SEARCH_PATHS = (
1169 1319
 					"$(inherited)",
1170 1320
 					"$(SRCROOT)/../node_modules/aliyun-oss-react-native/ios/**",
@@ -1187,6 +1337,10 @@
1187 1337
 			buildSettings = {
1188 1338
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
1189 1339
 				CURRENT_PROJECT_VERSION = 1;
1340
+				FRAMEWORK_SEARCH_PATHS = (
1341
+					"$(inherited)",
1342
+					"$(PROJECT_DIR)",
1343
+				);
1190 1344
 				HEADER_SEARCH_PATHS = (
1191 1345
 					"$(inherited)",
1192 1346
 					"$(SRCROOT)/../node_modules/aliyun-oss-react-native/ios/**",

+ 42
- 0
ios/RNAliyunOSS.xcodeproj/project.pbxproj 查看文件

@@ -8,6 +8,13 @@
8 8
 
9 9
 /* Begin PBXBuildFile section */
10 10
 		1842ED021EEBA70B004D40E3 /* RNAliyunOSS.m in Sources */ = {isa = PBXBuildFile; fileRef = 1842ED011EEBA70B004D40E3 /* RNAliyunOSS.m */; };
11
+		3E200E7C20EB5DA5002AF220 /* RNAliyunOSS+UPLOAD.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E200E6F20EB5DA5002AF220 /* RNAliyunOSS+UPLOAD.m */; };
12
+		3E200E7D20EB5DA5002AF220 /* RNAliyunOSS+BUCKET.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E200E7320EB5DA5002AF220 /* RNAliyunOSS+BUCKET.m */; };
13
+		3E200E7E20EB5DA5002AF220 /* RNAliyunOSS+OBJECT.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E200E7420EB5DA5002AF220 /* RNAliyunOSS+OBJECT.m */; };
14
+		3E200E7F20EB5DA5002AF220 /* RNAliyunOSS+MULTIPARTUPLOAD.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E200E7720EB5DA5002AF220 /* RNAliyunOSS+MULTIPARTUPLOAD.m */; };
15
+		3E200E8020EB5DA5002AF220 /* RNAliyunOSS+DOWNLOAD.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E200E7920EB5DA5002AF220 /* RNAliyunOSS+DOWNLOAD.m */; };
16
+		3E200E8120EB5DA5002AF220 /* RNAliyunOSS+AUTH.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E200E7A20EB5DA5002AF220 /* RNAliyunOSS+AUTH.m */; };
17
+		3E200E8220EB5DA5002AF220 /* RNAliyunOSS+LOG.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E200E7B20EB5DA5002AF220 /* RNAliyunOSS+LOG.m */; };
11 18
 /* End PBXBuildFile section */
12 19
 
13 20
 /* Begin PBXCopyFilesBuildPhase section */
@@ -27,6 +34,20 @@
27 34
 		1842ED001EEBA70B004D40E3 /* RNAliyunOSS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNAliyunOSS.h; sourceTree = "<group>"; };
28 35
 		1842ED011EEBA70B004D40E3 /* RNAliyunOSS.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNAliyunOSS.m; sourceTree = "<group>"; };
29 36
 		186899B21F31997000841D5D /* AliyunOSSiOS.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AliyunOSSiOS.framework; path = AliyunSDK/AliyunOSSiOS.framework; sourceTree = "<group>"; };
37
+		3E200E6E20EB5DA5002AF220 /* RNAliyunOSS+BUCKET.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "RNAliyunOSS+BUCKET.h"; sourceTree = "<group>"; };
38
+		3E200E6F20EB5DA5002AF220 /* RNAliyunOSS+UPLOAD.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "RNAliyunOSS+UPLOAD.m"; sourceTree = "<group>"; };
39
+		3E200E7020EB5DA5002AF220 /* RNAliyunOSS+AUTH.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "RNAliyunOSS+AUTH.h"; sourceTree = "<group>"; };
40
+		3E200E7120EB5DA5002AF220 /* RNAliyunOSS+DOWNLOAD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "RNAliyunOSS+DOWNLOAD.h"; sourceTree = "<group>"; };
41
+		3E200E7220EB5DA5002AF220 /* RNAliyunOSS+LOG.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "RNAliyunOSS+LOG.h"; sourceTree = "<group>"; };
42
+		3E200E7320EB5DA5002AF220 /* RNAliyunOSS+BUCKET.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "RNAliyunOSS+BUCKET.m"; sourceTree = "<group>"; };
43
+		3E200E7420EB5DA5002AF220 /* RNAliyunOSS+OBJECT.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "RNAliyunOSS+OBJECT.m"; sourceTree = "<group>"; };
44
+		3E200E7520EB5DA5002AF220 /* RNAliyunOSS+OBJECT.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "RNAliyunOSS+OBJECT.h"; sourceTree = "<group>"; };
45
+		3E200E7620EB5DA5002AF220 /* RNAliyunOSS+MULTIPARTUPLOAD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "RNAliyunOSS+MULTIPARTUPLOAD.h"; sourceTree = "<group>"; };
46
+		3E200E7720EB5DA5002AF220 /* RNAliyunOSS+MULTIPARTUPLOAD.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "RNAliyunOSS+MULTIPARTUPLOAD.m"; sourceTree = "<group>"; };
47
+		3E200E7820EB5DA5002AF220 /* RNAliyunOSS+UPLOAD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "RNAliyunOSS+UPLOAD.h"; sourceTree = "<group>"; };
48
+		3E200E7920EB5DA5002AF220 /* RNAliyunOSS+DOWNLOAD.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "RNAliyunOSS+DOWNLOAD.m"; sourceTree = "<group>"; };
49
+		3E200E7A20EB5DA5002AF220 /* RNAliyunOSS+AUTH.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "RNAliyunOSS+AUTH.m"; sourceTree = "<group>"; };
50
+		3E200E7B20EB5DA5002AF220 /* RNAliyunOSS+LOG.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "RNAliyunOSS+LOG.m"; sourceTree = "<group>"; };
30 51
 /* End PBXFileReference section */
31 52
 
32 53
 /* Begin PBXFrameworksBuildPhase section */
@@ -59,6 +80,20 @@
59 80
 		58B511D21A9E6C8500147676 = {
60 81
 			isa = PBXGroup;
61 82
 			children = (
83
+				3E200E7020EB5DA5002AF220 /* RNAliyunOSS+AUTH.h */,
84
+				3E200E7A20EB5DA5002AF220 /* RNAliyunOSS+AUTH.m */,
85
+				3E200E6E20EB5DA5002AF220 /* RNAliyunOSS+BUCKET.h */,
86
+				3E200E7320EB5DA5002AF220 /* RNAliyunOSS+BUCKET.m */,
87
+				3E200E7120EB5DA5002AF220 /* RNAliyunOSS+DOWNLOAD.h */,
88
+				3E200E7920EB5DA5002AF220 /* RNAliyunOSS+DOWNLOAD.m */,
89
+				3E200E7220EB5DA5002AF220 /* RNAliyunOSS+LOG.h */,
90
+				3E200E7B20EB5DA5002AF220 /* RNAliyunOSS+LOG.m */,
91
+				3E200E7620EB5DA5002AF220 /* RNAliyunOSS+MULTIPARTUPLOAD.h */,
92
+				3E200E7720EB5DA5002AF220 /* RNAliyunOSS+MULTIPARTUPLOAD.m */,
93
+				3E200E7520EB5DA5002AF220 /* RNAliyunOSS+OBJECT.h */,
94
+				3E200E7420EB5DA5002AF220 /* RNAliyunOSS+OBJECT.m */,
95
+				3E200E7820EB5DA5002AF220 /* RNAliyunOSS+UPLOAD.h */,
96
+				3E200E6F20EB5DA5002AF220 /* RNAliyunOSS+UPLOAD.m */,
62 97
 				186899B11F31993900841D5D /* AliyunSDK */,
63 98
 				1842ED001EEBA70B004D40E3 /* RNAliyunOSS.h */,
64 99
 				1842ED011EEBA70B004D40E3 /* RNAliyunOSS.m */,
@@ -122,7 +157,14 @@
122 157
 			isa = PBXSourcesBuildPhase;
123 158
 			buildActionMask = 2147483647;
124 159
 			files = (
160
+				3E200E8220EB5DA5002AF220 /* RNAliyunOSS+LOG.m in Sources */,
161
+				3E200E7E20EB5DA5002AF220 /* RNAliyunOSS+OBJECT.m in Sources */,
162
+				3E200E8120EB5DA5002AF220 /* RNAliyunOSS+AUTH.m in Sources */,
163
+				3E200E7C20EB5DA5002AF220 /* RNAliyunOSS+UPLOAD.m in Sources */,
164
+				3E200E7D20EB5DA5002AF220 /* RNAliyunOSS+BUCKET.m in Sources */,
165
+				3E200E7F20EB5DA5002AF220 /* RNAliyunOSS+MULTIPARTUPLOAD.m in Sources */,
125 166
 				1842ED021EEBA70B004D40E3 /* RNAliyunOSS.m in Sources */,
167
+				3E200E8020EB5DA5002AF220 /* RNAliyunOSS+DOWNLOAD.m in Sources */,
126 168
 			);
127 169
 			runOnlyForDeploymentPostprocessing = 0;
128 170
 		};