Skip to content

Commit ee33c04

Browse files
author
garenwang
committed
完善demo
1 parent a3d81a4 commit ee33c04

37 files changed

+1442
-96
lines changed

Podfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ use_frameworks!
44

55
target 'QCloudCOSXMLDemo' do
66
pod 'QCloudCOSXML', path:'.'
7+
pod 'QCloudCore/DNSLoader', path:'.'
78
pod 'QCloudCore', path:'.'
89
pod 'QCloudQuic', path:'.'
910
pod 'QCloudTrack', path:'.'
1011
pod 'QCloudTrack/Beacon', path:'.'
1112
pod 'QCloudTrack/Cls', path:'.'
13+
pod 'AFNetworking'
1214
target 'QCloudCOSXMLDemoTests' do
1315
inherit! :search_paths
1416
end

Podfile.lock

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,29 @@
11
PODS:
2+
- AFNetworking (4.0.1):
3+
- AFNetworking/NSURLSession (= 4.0.1)
4+
- AFNetworking/Reachability (= 4.0.1)
5+
- AFNetworking/Security (= 4.0.1)
6+
- AFNetworking/Serialization (= 4.0.1)
7+
- AFNetworking/UIKit (= 4.0.1)
8+
- AFNetworking/NSURLSession (4.0.1):
9+
- AFNetworking/Reachability
10+
- AFNetworking/Security
11+
- AFNetworking/Serialization
12+
- AFNetworking/Reachability (4.0.1)
13+
- AFNetworking/Security (4.0.1)
14+
- AFNetworking/Serialization (4.0.1)
15+
- AFNetworking/UIKit (4.0.1):
16+
- AFNetworking/NSURLSession
217
- GMOpenSSL (2.2.9)
18+
- MSDKDns_C11 (1.11.1)
319
- QCloudCore (6.4.8):
420
- QCloudCore/Default (= 6.4.8)
521
- QCloudCore/Default (6.4.8):
622
- QCloudTrack/Beacon (= 6.4.8)
23+
- QCloudCore/DNSLoader (6.4.8):
24+
- MSDKDns_C11
25+
- QCloudCore/WithoutMTA
26+
- QCloudCore/WithoutMTA (6.4.8)
727
- QCloudCOSXML (6.4.8):
828
- QCloudCOSXML/Default (= 6.4.8)
929
- QCloudCOSXML/Default (6.4.8):
@@ -23,7 +43,9 @@ PODS:
2343
- GMOpenSSL (~> 2.2.6)
2444

2545
DEPENDENCIES:
46+
- AFNetworking
2647
- QCloudCore (from `.`)
48+
- QCloudCore/DNSLoader (from `.`)
2749
- QCloudCOSXML (from `.`)
2850
- QCloudQuic (from `.`)
2951
- QCloudTrack (from `.`)
@@ -32,7 +54,9 @@ DEPENDENCIES:
3254

3355
SPEC REPOS:
3456
https://github.com/CocoaPods/Specs:
57+
- AFNetworking
3558
- GMOpenSSL
59+
- MSDKDns_C11
3660
- TencentCloudLogProducer
3761

3862
EXTERNAL SOURCES:
@@ -46,13 +70,15 @@ EXTERNAL SOURCES:
4670
:path: "."
4771

4872
SPEC CHECKSUMS:
73+
AFNetworking: 3bd23d814e976cd148d7d44c3ab78017b744cd58
4974
GMOpenSSL: d6d119ff8f00d4e03c2cdf733fb61e98e22da9c7
75+
MSDKDns_C11: e32cd3e7115dfeffefff26e16dc354ad2ca9e025
5076
QCloudCore: 11cecc286015fe2efb2a5da52ccdfff9da40e4e7
5177
QCloudCOSXML: 69aa55501c9ff2a3fbfaf2a40558996acb4b3df9
5278
QCloudQuic: a4f2405ccaedde33c36420d4225436b80bd5bf67
5379
QCloudTrack: 6e6f92f8d83afa2d5a42c5e476d68eced20d027f
5480
TencentCloudLogProducer: 564e944491e6396c81df4c9c51470784752ff3ab
5581

56-
PODFILE CHECKSUM: 469848875513aa1180afa1e3751e2d873841a154
82+
PODFILE CHECKSUM: 02fe1eaad672a1f86ffd8f50bd97b0efb84d34a5
5783

5884
COCOAPODS: 1.15.2

QCloudCOSXMLDemo.xcodeproj/project.pbxproj

Lines changed: 160 additions & 0 deletions
Large diffs are not rendered by default.
Binary file not shown.

QCloudCOSXMLDemo.xcworkspace/xcuserdata/garenwang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

Lines changed: 0 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -88,92 +88,6 @@
8888
endingLineNumber = "1385"
8989
landmarkName = "-testMultiUpload1"
9090
landmarkType = "7">
91-
<Locations>
92-
<Location
93-
uuid = "261BE051-C4D9-49D0-AF67-C63851091044 - d0673aa8f01eb2f8"
94-
shouldBeEnabled = "Yes"
95-
ignoreCount = "0"
96-
continueAfterRunningActions = "No"
97-
symbolName = "__42-[QCloudCOSTransferTests testMultiUpload1]_block_invoke_2"
98-
moduleName = "QCloudCOSXMLDemoTests"
99-
usesParentBreakpointCondition = "Yes"
100-
urlString = "file:///Users/garenwang/Documents/code/qcloud-sdk-ios/QCloudCOSXMLDemoTests/QCloudCOSTransferTests.m"
101-
startingColumnNumber = "9223372036854775807"
102-
endingColumnNumber = "9223372036854775807"
103-
startingLineNumber = "1385"
104-
endingLineNumber = "1385">
105-
</Location>
106-
<Location
107-
uuid = "261BE051-C4D9-49D0-AF67-C63851091044 - d0673aa8f01eb2f8"
108-
shouldBeEnabled = "Yes"
109-
ignoreCount = "0"
110-
continueAfterRunningActions = "No"
111-
symbolName = "__42-[QCloudCOSTransferTests testMultiUpload1]_block_invoke_2"
112-
moduleName = "QCloudCOSXMLDemoTests"
113-
usesParentBreakpointCondition = "Yes"
114-
urlString = "file:///Users/garenwang/Documents/code/qcloud-sdk-ios/QCloudCOSXMLDemoTests/QCloudCOSTransferTests.m"
115-
startingColumnNumber = "9223372036854775807"
116-
endingColumnNumber = "9223372036854775807"
117-
startingLineNumber = "1385"
118-
endingLineNumber = "1385">
119-
</Location>
120-
<Location
121-
uuid = "261BE051-C4D9-49D0-AF67-C63851091044 - d0673aa8f01eb2f8"
122-
shouldBeEnabled = "Yes"
123-
ignoreCount = "0"
124-
continueAfterRunningActions = "No"
125-
symbolName = "__42-[QCloudCOSTransferTests testMultiUpload1]_block_invoke_2"
126-
moduleName = "QCloudCOSXMLDemoTests"
127-
usesParentBreakpointCondition = "Yes"
128-
urlString = "file:///Users/garenwang/Documents/code/qcloud-sdk-ios/QCloudCOSXMLDemoTests/QCloudCOSTransferTests.m"
129-
startingColumnNumber = "9223372036854775807"
130-
endingColumnNumber = "9223372036854775807"
131-
startingLineNumber = "1385"
132-
endingLineNumber = "1385">
133-
</Location>
134-
<Location
135-
uuid = "261BE051-C4D9-49D0-AF67-C63851091044 - d0673aa8f01eb2f8"
136-
shouldBeEnabled = "Yes"
137-
ignoreCount = "0"
138-
continueAfterRunningActions = "No"
139-
symbolName = "__42-[QCloudCOSTransferTests testMultiUpload1]_block_invoke_2"
140-
moduleName = "QCloudCOSXMLDemoTests"
141-
usesParentBreakpointCondition = "Yes"
142-
urlString = "file:///Users/garenwang/Documents/code/qcloud-sdk-ios/QCloudCOSXMLDemoTests/QCloudCOSTransferTests.m"
143-
startingColumnNumber = "9223372036854775807"
144-
endingColumnNumber = "9223372036854775807"
145-
startingLineNumber = "1385"
146-
endingLineNumber = "1385">
147-
</Location>
148-
<Location
149-
uuid = "261BE051-C4D9-49D0-AF67-C63851091044 - d0673aa8f01eb2f8"
150-
shouldBeEnabled = "Yes"
151-
ignoreCount = "0"
152-
continueAfterRunningActions = "No"
153-
symbolName = "__42-[QCloudCOSTransferTests testMultiUpload1]_block_invoke_2"
154-
moduleName = "QCloudCOSXMLDemoTests"
155-
usesParentBreakpointCondition = "Yes"
156-
urlString = "file:///Users/garenwang/Documents/code/qcloud-sdk-ios/QCloudCOSXMLDemoTests/QCloudCOSTransferTests.m"
157-
startingColumnNumber = "9223372036854775807"
158-
endingColumnNumber = "9223372036854775807"
159-
startingLineNumber = "1385"
160-
endingLineNumber = "1385">
161-
</Location>
162-
<Location
163-
uuid = "261BE051-C4D9-49D0-AF67-C63851091044 - d0673aa8f01eb2f8"
164-
shouldBeEnabled = "Yes"
165-
ignoreCount = "0"
166-
continueAfterRunningActions = "No"
167-
symbolName = "__42-[QCloudCOSTransferTests testMultiUpload1]_block_invoke_2"
168-
moduleName = "QCloudCOSXMLDemoTests"
169-
usesParentBreakpointCondition = "Yes"
170-
urlString = "file:///Users/garenwang/Documents/code/qcloud-sdk-ios/QCloudCOSXMLDemoTests/QCloudCOSTransferTests.m"
171-
startingColumnNumber = "9223372036854775807"
172-
endingColumnNumber = "9223372036854775807"
173-
startingLineNumber = "1385"
174-
endingLineNumber = "1385">
175-
</Location>
176-
</Locations>
17791
</BreakpointContent>
17892
</BreakpointProxy>
17993
<BreakpointProxy
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//
2+
// QCloudAFLoader.h
3+
// QCloudCOSXMLDemo
4+
//
5+
// Created by garenwang on 2024/12/30.
6+
// Copyright © 2024 Tencent. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
#import "QCloudCustomLoader.h"
11+
NS_ASSUME_NONNULL_BEGIN
12+
13+
@interface QCloudAFLoader : NSObject <QCloudCustomLoader>
14+
15+
@end
16+
17+
NS_ASSUME_NONNULL_END
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//
2+
// QCloudAFLoader.m
3+
// QCloudCOSXMLDemo
4+
//
5+
// Created by garenwang on 2024/12/30.
6+
// Copyright © 2024 Tencent. All rights reserved.
7+
//
8+
9+
#import "QCloudAFLoader.h"
10+
#import "QCloudAFLoaderSession.h"
11+
@implementation QCloudAFLoader
12+
-(QCloudCustomSession *)session{
13+
return [QCloudAFLoaderSession session];
14+
}
15+
16+
-(BOOL)enable:(QCloudHTTPRequest *)httpRequest{
17+
return YES;
18+
}
19+
@end
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
//
2+
// QCloudAFLoaderSession.h
3+
// QCloudCOSXMLDemo
4+
//
5+
// Created by garenwang on 2024/12/30.
6+
// Copyright © 2024 Tencent. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
#import "QCloudCore/QCloudCustomLoader.h"
11+
#import "AFNetworking/AFNetworking.h"
12+
NS_ASSUME_NONNULL_BEGIN
13+
14+
@interface QCloudAFLoaderSession : QCloudCustomSession
15+
16+
@property (nonatomic,strong)AFURLSessionManager *manager;
17+
18+
+(QCloudAFLoaderSession *)session;
19+
20+
@end
21+
22+
NS_ASSUME_NONNULL_END
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
//
2+
// QCloudAFLoaderSession.m
3+
// QCloudCOSXMLDemo
4+
//
5+
// Created by garenwang on 2024/12/30.
6+
// Copyright © 2024 Tencent. All rights reserved.
7+
//
8+
9+
#import "QCloudAFLoaderSession.h"
10+
#import "QCloudAFLoaderTask.h"
11+
@implementation QCloudAFLoaderSession
12+
13+
+(QCloudAFLoaderSession *)session{
14+
static QCloudAFLoaderSession *session = nil;
15+
static dispatch_once_t onceToken;
16+
dispatch_once(&onceToken, ^{
17+
session = [[QCloudAFLoaderSession alloc] init];
18+
19+
});
20+
return session;
21+
}
22+
23+
- (instancetype)init
24+
{
25+
self = [super init];
26+
if (self) {
27+
NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration];
28+
self.manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:configuration];
29+
self.manager.responseSerializer = [[AFCompoundResponseSerializer alloc]init];
30+
}
31+
return self;
32+
}
33+
34+
-(QCloudCustomLoaderTask *)taskWithRequset:(NSMutableURLRequest *)request
35+
fromFile:(NSURL *)fromFile{
36+
QCloudAFLoaderTask * task = [[QCloudAFLoaderTask alloc]initWithHTTPRequest:request fromFile:fromFile session:[QCloudAFLoaderSession session]];
37+
return task;
38+
}
39+
@end
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//
2+
// QCloudAFLoaderTask.h
3+
// QCloudCOSXMLDemo
4+
//
5+
// Created by garenwang on 2024/12/30.
6+
// Copyright © 2024 Tencent. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
#import "QCloudCustomLoader.h"
11+
NS_ASSUME_NONNULL_BEGIN
12+
13+
@interface QCloudAFLoaderTask : QCloudCustomLoaderTask
14+
15+
@end
16+
17+
NS_ASSUME_NONNULL_END

0 commit comments

Comments
 (0)