Skip to content

Commit 94c8a67

Browse files
committed
refactor
1 parent 05a71b0 commit 94c8a67

File tree

4 files changed

+3
-39
lines changed

4 files changed

+3
-39
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
### 增加
66
* 使用 happydns 进行解析
7-
* 支持ALAsset上传
7+
* 支持ALAsset上传,多谢 github.com/NSFish的代码
88

99
### 修正
1010
* 当文件超过200M时,iOS上传失败

QiniuSDK/Common/QNALAssetFile.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
#import "QNFileDelegate.h"
1212

13+
#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED)
1314
@class ALAsset;
1415
@interface QNALAssetFile : NSObject <QNFileDelegate>
1516

@@ -24,3 +25,4 @@
2425
- (instancetype)init:(ALAsset *)asset
2526
error:(NSError *__autoreleasing *)error;
2627
@end
28+
#endif

QiniuSDK/Common/QNALAssetFile.m

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -69,39 +69,5 @@ - (int64_t)size {
6969
return _fileSize;
7070
}
7171
@end
72-
#else
73-
@implementation QNALAssetFile
74-
- (instancetype)init:(ALAsset *)asset
75-
error:(NSError *__autoreleasing *)error {
76-
if (self = [super init]) {
77-
}
78-
79-
return self;
80-
}
81-
82-
- (NSData *)read:(long)offset
83-
size:(long)size {
84-
return nil;
85-
}
86-
87-
- (NSData *)readAll {
88-
return nil;
89-
}
90-
91-
- (void)close {
92-
}
93-
94-
-(NSString *)path {
95-
return nil;
96-
}
97-
98-
- (int64_t)modifyTime {
99-
return 0;
100-
}
101-
102-
- (int64_t)size {
103-
return 0;
104-
}
105-
@end
10672
#endif
10773

QiniuSDKTests/QNResumeUploadTest.m

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@
1515
#import "QNTestConfig.h"
1616
#import "QNTempFile.h"
1717

18-
#ifdef __IPHONE_OS_VERSION_MIN_REQUIRED
19-
#import <AssetsLibrary/AssetsLibrary.h>
20-
#endif
21-
2218
@interface QNResumeUploadTest : XCTestCase
2319
@property QNUploadManager *upManager;
2420
@property BOOL inTravis;

0 commit comments

Comments
 (0)