Skip to content

Commit ef0c1d5

Browse files
authored
Merge pull request #321 from XiaopingSun/uplog_v4_developing
Uplog v4 developing
2 parents df56361 + 494d2ea commit ef0c1d5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+2488
-1262
lines changed

.travis.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
language: objective-c
2-
osx_image: xcode9
2+
osx_image: xcode11
33

44
before_install:
5-
- rvm install 2.3.1
6-
- rvm use 2.3.1
5+
- rvm install 2.6.4
6+
- rvm use 2.6.4
77
- brew update
88
- gem install cocoapods --pre
99
- pod --version
10-
- pod repo remove master
1110
- rm -rf ~/.cocoapods
1211
- pod setup
1312
- pod install --verbose --no-repo-update
@@ -16,7 +15,7 @@ before_script:
1615
- export QINIU_TEST_ENV="travis"
1716

1817
script:
19-
- xcodebuild test -workspace QiniuSDK.xcworkspace -scheme QiniuSDK_iOS -configuration Release -destination 'platform=iOS Simulator,OS=11.0,name=iPhone SE' -enableCodeCoverage YES
18+
- xcodebuild test -workspace QiniuSDK.xcworkspace -scheme QiniuSDK_iOS -configuration Release -destination 'platform=iOS Simulator,OS=12.4,name=iPhone Xs Max' -enableCodeCoverage YES
2019
- xcodebuild test -workspace QiniuSDK.xcworkspace -scheme QiniuSDK_Mac -configuration Release -destination 'platform=macOS,arch=x86_64'
2120

2221
after_success:

QiniuSDK.xcodeproj/project.pbxproj

Lines changed: 83 additions & 54 deletions
Large diffs are not rendered by default.

QiniuSDK.xcodeproj/xcshareddata/xcschemes/QiniuSDK_Mac.xcscheme

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1130"
3+
LastUpgradeVersion = "1140"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -28,6 +28,16 @@
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
2929
shouldUseLaunchSchemeArgsEnv = "YES">
3030
<Testables>
31+
<TestableReference
32+
skipped = "NO">
33+
<BuildableReference
34+
BuildableIdentifier = "primary"
35+
BlueprintIdentifier = "DF2CDE0919DAC05500CE01FB"
36+
BuildableName = "QiniuSDK_MacTests.xctest"
37+
BlueprintName = "QiniuSDK_MacTests"
38+
ReferencedContainer = "container:QiniuSDK.xcodeproj">
39+
</BuildableReference>
40+
</TestableReference>
3141
</Testables>
3242
</TestAction>
3343
<LaunchAction

QiniuSDK.xcodeproj/xcshareddata/xcschemes/QiniuSDK_MacTests.xcscheme

Lines changed: 1 addition & 1 deletion
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 = "1140"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

QiniuSDK.xcodeproj/xcshareddata/xcschemes/QiniuSDK_iOS.xcscheme

Lines changed: 1 addition & 1 deletion
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 = "1140"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

QiniuSDK.xcodeproj/xcshareddata/xcschemes/QiniuSDK_iOSTests.xcscheme

Lines changed: 1 addition & 1 deletion
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 = "1140"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

QiniuSDK/BigData/QNPipeline.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef QNPipeline_h
1010
#define QNPipeline_h
1111

12-
@class QNResponseInfo;
12+
@class QNHttpResponseInfo;
1313

1414
@interface QNPipelineConfig : NSObject
1515

@@ -31,8 +31,10 @@
3131

3232
/**
3333
* 上传完成后的回调函数
34+
*
35+
* @param info 上下文信息,包括状态码,错误值
3436
*/
35-
typedef void (^QNPipelineCompletionHandler)(QNResponseInfo *info);
37+
typedef void (^QNPipelineCompletionHandler)(QNHttpResponseInfo *info);
3638

3739
@interface QNPipeline : NSObject
3840

QiniuSDK/BigData/QNPipeline.m

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ - (instancetype)initWithHost:(NSString*)host {
3030

3131
@interface QNPipeline ()
3232

33-
@property (nonatomic) id<QNHttpDelegate> httpManager;
33+
@property (nonatomic) QNSessionManager *httpManager;
3434
@property (nonatomic) QNPipelineConfig* config;
3535

3636
+ (NSDateFormatter*)dateFormatter;
@@ -132,12 +132,9 @@ - (void)pumpRepo:(NSString*)repo
132132
handler:(QNPipelineCompletionHandler)handler {
133133
NSDictionary* headers = @{ @"Authorization" : token,
134134
@"Content-Type" : @"text/plain" };
135-
[_httpManager post:[self url:repo] withData:[str dataUsingEncoding:NSUTF8StringEncoding] withParams:nil withHeaders:headers withTaskIdentifier:nil withCompleteBlock:^(QNResponseInfo* info, NSDictionary* resp) {
136-
handler(info);
137-
}
138-
withProgressBlock:nil
139-
withCancelBlock:nil
140-
withAccess:nil];
135+
[_httpManager post:[self url:repo] withData:[str dataUsingEncoding:NSUTF8StringEncoding] withParams:nil withHeaders:headers withIdentifier:nil withCompleteBlock:^(QNHttpResponseInfo *httpResponseInfo, NSDictionary *respBody) {
136+
handler(httpResponseInfo);
137+
} withProgressBlock:nil withCancelBlock:nil withAccess:nil];
141138
}
142139

143140
+ (NSDateFormatter*)dateFormatter {

QiniuSDK/Common/QNPHAssetFile.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#import "QNFileDelegate.h"
1212

1313
API_AVAILABLE_BEGIN(ios(9.1))
14-
API_UNAVAILABLE_BEGIN(macos, tvos)
1514

1615
@class PHAsset;
1716
@interface QNPHAssetFile : NSObject <QNFileDelegate>
@@ -28,4 +27,3 @@ API_UNAVAILABLE_BEGIN(macos, tvos)
2827
@end
2928

3029
API_AVAILABLE_END
31-
API_UNAVAILABLE_END

QiniuSDK/Common/QNPHAssetFile.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
//
88

99
#import "QNPHAssetFile.h"
10-
#import <AVFoundation/AVFoundation.h>
1110
#import <Photos/Photos.h>
1211
#import "QNResponseInfo.h"
1312

0 commit comments

Comments
 (0)