File tree Expand file tree Collapse file tree 4 files changed +4
-21
lines changed
Expand file tree Collapse file tree 4 files changed +4
-21
lines changed Original file line number Diff line number Diff line change 1010
1111#import " QNFileDelegate.h"
1212
13- API_AVAILABLE_BEGIN (ios(9.1 ))
14-
1513@class PHAsset;
16- @interface QNPHAssetFile : NSObject <QNFileDelegate>
14+ API_AVAILABLE (ios( 9.1 )) @interface QNPHAssetFile : NSObject <QNFileDelegate>
1715/* *
1816 * 打开指定文件
1917 *
@@ -25,5 +23,3 @@ API_AVAILABLE_BEGIN(ios(9.1))
2523- (instancetype )init:(PHAsset *)phAsset
2624 error:(NSError *__autoreleasing *)error;
2725@end
28-
29- API_AVAILABLE_END
Original file line number Diff line number Diff line change 1010
1111#import " QNFileDelegate.h"
1212
13- API_AVAILABLE_BEGIN (ios(9 ))
14-
1513@class PHAssetResource;
16-
17- @interface QNPHAssetResource : NSObject <QNFileDelegate>
14+ API_AVAILABLE (ios(9.0 )) @interface QNPHAssetResource : NSObject <QNFileDelegate>
1815
1916/* *
2017 * 打开指定文件
@@ -28,5 +25,3 @@ API_AVAILABLE_BEGIN(ios(9))
2825 error:(NSError *__autoreleasing *)error;
2926
3027@end
31-
32- API_AVAILABLE_END
Original file line number Diff line number Diff line change @@ -80,17 +80,12 @@ - (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didFini
8080 _sessionStatistics = [[QNSessionStatistics alloc ] init ];
8181
8282 // remote_ip & port
83- #if __IPHONE_OS_VERSION_MIN_REQUIRED
83+ #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000
8484 if (@available (iOS 13.0 , *)) {
8585 _sessionStatistics.remoteIp = transactionMetrics.remoteAddress ;
8686 _sessionStatistics.port = [transactionMetrics.remotePort unsignedShortValue ];
87- } else {
88- NSString *remoteIpAddressAndPort = [transactionMetrics valueForKey: @" __remoteAddressAndPort" ];
89- NSRange indexRange = [remoteIpAddressAndPort rangeOfString: @" :" ];
90- _sessionStatistics.remoteIp = [remoteIpAddressAndPort substringToIndex: indexRange.location];
91- _sessionStatistics.port = [[remoteIpAddressAndPort substringFromIndex: indexRange.location + 1 ] intValue ];
9287 }
93- #endif
88+ #endif
9489
9590 // time
9691 _sessionStatistics.totalElapsedTime = metrics.taskInterval .duration * 1000 ;
Original file line number Diff line number Diff line change 2020
2121// request type item - 用于统计单个请求的打点信息
2222@interface QNReportRequestItem : QNReportBaseItem
23- - (id )init __attribute__((unavailable(" Use buildWith: instead." )));
2423+ (instancetype )buildWithUpType : (NSString *)up_type
2524 TargetBucket : (NSString *)target_bucket
2625 targetKey : (NSString *)target_key
5352
5453// block type item - 用于统计分片上传整体质量信息
5554@interface QNReportBlockItem : QNReportBaseItem
56- - (id )init __attribute__((unavailable(" Use buildWith: instead." )));
5755+ (instancetype )buildWithTargetRegionId : (NSString *)target_region_id
5856 currentRegionId : (NSString *)current_region_id
5957 totalElapsedTime : (int64_t )total_elapsed_time
6866
6967// quality type item - 用于统计上传结果
7068@interface QNReportQualityItem : QNReportBaseItem
71- - (id )init __attribute__((unavailable(" Use buildWith: instead." )));
7269+ (instancetype )buildWithResult : (NSString *)result
7370 totalElapsedTime : (int64_t )total_elapsed_time
7471 requestsCount : (int64_t )requests_count
You can’t perform that action at this time.
0 commit comments