Skip to content

Commit

Permalink
# 5.7.3
Browse files Browse the repository at this point in the history
- 修弹出访问钥匙串的提示
  • Loading branch information
karisli committed May 11, 2020
1 parent d97495c commit 8452f3a
Show file tree
Hide file tree
Showing 19 changed files with 113 additions and 32 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# 5.7.3
- 修弹出访问钥匙串的提示

# 5.7.2
偶现crash的问题\ - 修复了生成预签名链接接口在临时密钥时没有返回token参数的问题\ - 修复分片个数大于10000上传失败的问题\ - 修复分片上传时在等complete的response的时候点击了取消,再次续传会404的问题\ - 增加同步接口
- 偶现crash的问题
- 修复了生成预签名链接接口在临时密钥时没有返回token参数的问题
- 修复分片个数大于10000上传失败的问题
- 修复分片上传时在等complete的response的时候点击了取消,再次续传会404的问题
- 增加同步接口

# 5.7.1
- 读取剪贴板卡死
Expand Down
8 changes: 4 additions & 4 deletions QCloudCOSXML.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = "QCloudCOSXML"

s.version = "5.7.2"
s.version = "5.7.3"

s.summary = "QCloudCOSXML 腾讯云iOS-SDK组件"

Expand All @@ -17,15 +17,15 @@ s.version = "5.7.2"
s.default_subspec = 'Default'
s.subspec 'Default' do |default|
default.source_files = 'QCloudCOSXML/Classes/**/*','Models/request.model','QCloudCOSXML/Classes/QCloudCOSXML/*'
default.dependency "QCloudCore",'5.7.2'
default.dependency "QCloudCore",'5.7.3'
end
s.subspec 'Slim' do |slim|
slim.source_files = 'QCloudCOSXML/Classes/**/*','Models/request.model','QCloudCOSXML/Classes/QCloudCOSXML/*'
slim.dependency "QCloudCore/WithoutMTA",'5.7.2'
slim.dependency "QCloudCore/WithoutMTA",'5.7.3'
end
s.subspec 'Transfer' do |transfer|
transfer.source_files = 'QCloudCOSXML/Classes/*','QCloudCOSXML/Classes/Transfer/**/*','QCloudCOSXML/Classes/Base/*'
transfer.dependency "QCloudCore/WithoutMTA",'5.7.2'
transfer.dependency "QCloudCore/WithoutMTA",'5.7.3'
end

end
4 changes: 2 additions & 2 deletions QCloudCOSXML/Classes/Base/QCloudCOSXMLService.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
NS_ASSUME_NONNULL_BEGIN
@interface QCloudCOSXMLService : QCloudService
#pragma hidden super selectors
- (int) performRequest:(QCloudBizHTTPRequest *)httpRequst isHaveBody:(BOOL)body NS_UNAVAILABLE;
- (int) performRequest:(QCloudBizHTTPRequest *)httpRequst isHaveBody:(BOOL)body withFinishBlock:(QCloudRequestFinishBlock)block NS_UNAVAILABLE;
- (int) performRequest:(QCloudBizHTTPRequest *)httpRequst NS_UNAVAILABLE;
- (int) performRequest:(QCloudBizHTTPRequest *)httpRequst withFinishBlock:(QCloudRequestFinishBlock)block NS_UNAVAILABLE;

#pragma Factory
/**
Expand Down
16 changes: 8 additions & 8 deletions QCloudCOSXML/Classes/Base/QCloudService+Quality.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,23 @@ + (void)load {
+ (void) changeImplementation {
Class class = [self class];

Method originMethod = class_getInstanceMethod(class, @selector(performRequest:isHaveBody:));
Method replacedMethod = class_getInstanceMethod(class, @selector(__quality_performRequest:isHaveBody:));
Method originMethod = class_getInstanceMethod(class, @selector(performRequest:));
Method replacedMethod = class_getInstanceMethod(class, @selector(__quality_performRequest:));
method_exchangeImplementations(originMethod, replacedMethod);

originMethod = class_getInstanceMethod(class, @selector(performRequest:isHaveBody:withFinishBlock:));
replacedMethod = class_getInstanceMethod(class, @selector(__quality_performRequest:isHaveBody:withFinishBlock:));
originMethod = class_getInstanceMethod(class, @selector(performRequest:withFinishBlock:));
replacedMethod = class_getInstanceMethod(class, @selector(__quality_performRequest:withFinishBlock:));
method_exchangeImplementations(originMethod, replacedMethod);
}

- (int) __quality_performRequest:(QCloudBizHTTPRequest*)httpRequst isHaveBody:(BOOL)body {
int result = [self __quality_performRequest:httpRequst isHaveBody:body];
- (int) __quality_performRequest:(QCloudBizHTTPRequest*)httpRequst{
int result = [self __quality_performRequest:httpRequst];
[QualityDataUploader trackRequestSentWithType:object_getClass(httpRequst)];
return result;
}

- (int) __quality_performRequest:(QCloudBizHTTPRequest*)httpRequst isHaveBody:(BOOL)body withFinishBlock:(QCloudRequestFinishBlock)block {
int result = [self __quality_performRequest:httpRequst isHaveBody:body withFinishBlock:block];
- (int) __quality_performRequest:(QCloudBizHTTPRequest*)httpRequst withFinishBlock:(QCloudRequestFinishBlock)block {
int result = [self __quality_performRequest:httpRequst withFinishBlock:block];
[QualityDataUploader trackRequestSentWithType:object_getClass(httpRequst)];
return result;
}
Expand Down
1 change: 1 addition & 0 deletions QCloudCOSXML/Classes/Base/QualityDataUploader.m
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ +(BOOL)isErrorInsterested:(NSError *)error {
+(void)internalUploadEvent:(NSString *)eventKey withParamter:(NSDictionary *)paramter {
Class cls = NSClassFromString(@"TACMTA");
if (cls) {
QCloudLogInfo(@"MTA Event:[%@] paramer:%@",eventKey,paramter);
[self invokeClassMethod:cls sel:NSSelectorFromString(@"trackCustomKeyValueEvent:props:appkey:isRealTime:")
withObjects:@[eventKey, paramter, AppKey, @(NO)]];
}
Expand Down
2 changes: 1 addition & 1 deletion QCloudCOSXML/Classes/QCloudCOSXMLVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#ifndef QCloudCOSXMLModuleVersion_h
#define QCloudCOSXMLModuleVersion_h
#define QCloudCOSXMLModuleVersionNumber 507002
#define QCloudCOSXMLModuleVersionNumber 507003

//dependency

Expand Down
2 changes: 1 addition & 1 deletion QCloudCOSXML/Classes/QCloudCOSXMLVersion.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#import "QCloudCOSXMLVersion.h"
NSString * const QCloudCOSXMLModuleVersion = @"5.7.2";
NSString * const QCloudCOSXMLModuleVersion = @"5.7.3";
NSString * const QCloudCOSXMLModuleName = @"QCloudCOSXML";
@interface QCloudQCloudCOSXMLLoad : NSObject
@end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ NS_ASSUME_NONNULL_BEGIN


#pragma hidden super selectors
- (int) performRequest:(QCloudBizHTTPRequest *)httpRequst isHaveBody:(BOOL)body NS_UNAVAILABLE;
- (int) performRequest:(QCloudBizHTTPRequest *)httpRequst isHaveBody:(BOOL)body withFinishBlock:(QCloudRequestFinishBlock)block NS_UNAVAILABLE;
- (int) performRequest:(QCloudBizHTTPRequest *)httpRequst NS_UNAVAILABLE;
- (int) performRequest:(QCloudBizHTTPRequest *)httpRequst withFinishBlock:(QCloudRequestFinishBlock)block NS_UNAVAILABLE;

#pragma Factory
+ (QCloudCOSTransferMangerService*) defaultCOSTransferManager;
Expand Down
2 changes: 1 addition & 1 deletion QCloudCore.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Pod::Spec.new do |s|
s.name = "QCloudCore"

s.version = "5.7.2"
s.version = "5.7.3"

s.summary = "QCloudCore--腾讯云iOS-SDK Foundation"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

@interface QCloudOperationQueue : NSObject
@property (nonatomic, assign) int maxConcurrentCount;
@property (nonatomic, assign) int customConcurrentCount;
- (void) addOpreation:(QCloudRequestOperation*)operation;
- (void) cancel:(QCloudRequestOperation*)operation;
- (void) cancelByRequestID:(int64_t)requestID;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ - (void) addOpreation:(QCloudRequestOperation *)operation
- (void) tryStartAnyOperation
{
[_dataLock lock];
int concurrentCount = self.customConcurrentCount?self.customConcurrentCount:self.maxConcurrentCount;
void(^ExeOperation)(QCloudRequestOperation* operation) = ^(QCloudRequestOperation* operation) {
[self->_operationArray removeObject:operation];
operation.delagte = self;
QCloudLogVerbose(@"[%@][%lld]请求从队列中取出,开始执行", [operation.request class], [operation.request requestID]);
[self->_runningOperationArray addObject:operation];
[operation execute];

};
if (_operationArray.count !=0 ) {
NSMutableArray* highPerfomanceRequest = [NSMutableArray new];
Expand All @@ -92,8 +92,8 @@ - (void) tryStartAnyOperation
for (QCloudRequestOperation* op in highPerfomanceRequest) {
ExeOperation(op);
}
QCloudLogDebug(@"Current max concurrent count is %i",self.maxConcurrentCount);
if (_runningOperationArray.count < self.maxConcurrentCount) {
QCloudLogDebug(@"Current max concurrent count is %i",concurrentCount);
if (_runningOperationArray.count < concurrentCount) {
if (normalPerformanceRequest.count) {
if (normalPerformanceRequest.count) {
QCloudRequestOperation* operation = normalPerformanceRequest.firstObject;
Expand Down Expand Up @@ -186,14 +186,15 @@ - (void)onHandleNetworkSituationChange:(NSNotification*)notification {


- (void)onHandleNetworkUploadSpeedUpadte:(NSNotification*)notification {
int concurrentCount = self.customConcurrentCount?self.customConcurrentCount:self.maxConcurrentCount;
NSArray* speedLevelsArray = [notification.object copy];
int64_t uploadSpeedIn30S = 0;
for (QCloudNetProfileLevel* level in speedLevelsArray) {
if (level.interval == 30) {
uploadSpeedIn30S = level.uploadSpped;
}
}
int64_t currentUploadSpeedPerOperation = uploadSpeedIn30S / self.maxConcurrentCount;
int64_t currentUploadSpeedPerOperation = uploadSpeedIn30S / concurrentCount;
//若每个任务速度大于250KB/s
static const int64_t increaseConcurrentCountThreashold = 250 * 1024;
// QCloudLogDebug(@"Current network speed per operation = %lu KB/S, uploadSpeedIn30S = %llu KB/s, max concurrent count = %lu",currentUploadSpeedPerOperation/(1024),uploadSpeedIn30S/1024,self.maxConcurrentCount);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//
// QCloudHTTPTaskDelayManager.h
// CLSLogger
//
// Created by wjielai on 2020/4/29.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface QCloudHTTPTaskDelayManager : NSObject

- (instancetype) initWithStart:(NSInteger) startBackoff max:(NSInteger) maxBackoff;

- (void) reset;

- (void) increase;

- (NSInteger) getDelay;

@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
//
// QCloudHTTPTaskDelayManager.m
// CLSLogger
//
// Created by wjielai on 2020/4/29.
//

#import "QCloudHTTPTaskDelayManager.h"

@implementation QCloudHTTPTaskDelayManager {
NSInteger initDelay;
NSInteger maxDelay;
NSInteger currentDelay;
}

- (instancetype)initWithStart:(NSInteger)startBackoff max:(NSInteger)maxBackoff {
self = [super init];
if (self) {
initDelay = startBackoff;
maxDelay = maxBackoff;
currentDelay = 0;
}
return self;
}

- (void)reset {
@synchronized (self) {
currentDelay = 0;
}
}

- (void)increase {
@synchronized (self) {
NSInteger cd = currentDelay;
currentDelay = MIN(MAX(cd * 2, initDelay), maxDelay);
}
}

- (NSInteger)getDelay {
@synchronized (self) {
return currentDelay;
}
}

@end
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// QCloudHTTPSessionManager.h
// QCloudHTTPSessionManager.ha
// QCloudTernimalLab_CommonLogic
//
// Created by tencent on 16/3/30.
Expand All @@ -8,6 +8,8 @@

#import <Foundation/Foundation.h>
#import "QCloudNetworkingAPI.h"

@class QCloudOperationQueue;
@class QCloudThreadSafeMutableDictionary;
typedef void (^QCloudURLSessionDidFinishEventsForBackgroundURLSessionBlock)(void);

Expand All @@ -19,5 +21,5 @@ typedef void (^QCloudURLSessionDidFinishEventsForBackgroundURLSessionBlock)(void
FOUNDATION_EXTERN QCloudThreadSafeMutableDictionary* cloudBackGroundSessionManagersCache;
+ (QCloudHTTPSessionManager*)sessionManagerWithBackgroundIdentifier:(NSString *)backgroundIdentifier;
+ (QCloudHTTPSessionManager*) shareClient;

@property (nonatomic, assign) int customConcurrentCount;
@end
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ - (QCloudHTTPSessionManager *)initWithBackgroundSessionWithBackgroundIdentifier:
}
return self;
}

-(void)setCustomConcurrentCount:(int)customConcurrentCount{
_customConcurrentCount = customConcurrentCount;
_operationQueue.customConcurrentCount = customConcurrentCount;
}
- (void) setMaxConcurrencyTask:(int32_t)maxConcurrencyTask
{
if (_maxConcurrencyTask != maxConcurrencyTask) {
Expand Down Expand Up @@ -312,7 +315,6 @@ - (void) URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCom
} else {
if ([taskData.retryHandler.delegate respondsToSelector:@selector(shouldRetry:error:)]) {
BOOL isRetry = [taskData.retryHandler.delegate shouldRetry:taskData error:error];

if (!isRetry) {
EndRetryFunc();
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ NS_ASSUME_NONNULL_BEGIN
当前服务所运行的HTTP Session Manager。一般情况下,所有服务都运行在统一的全局单例上面。
*/
@property (nonatomic, strong,readonly) QCloudHTTPSessionManager* sessionManager;
@property (nonatomic, assign,readonly) BOOL isHaveBody;
/**
通过服务配置信息初始化服务
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ - (instancetype) init
}
_beginDate = [NSDate date];
_recordArray = [NSMutableArray new];
_deviceUUID = [QCloudFCUUID uuidForDevice];
_traceIdentifier = [[NSUUID UUID] UUIDString];
return self;
}
Expand Down
2 changes: 1 addition & 1 deletion QCloudCore/Classes/QCloudCoreVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#ifndef QCloudCoreModuleVersion_h
#define QCloudCoreModuleVersion_h
#define QCloudCoreModuleVersionNumber 507002
#define QCloudCoreModuleVersionNumber 507003

//dependency

Expand Down
2 changes: 1 addition & 1 deletion QCloudCore/Classes/QCloudCoreVersion.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#import "QCloudCoreVersion.h"
NSString * const QCloudCoreModuleVersion = @"5.7.2";
NSString * const QCloudCoreModuleVersion = @"5.7.3";
NSString * const QCloudCoreModuleName = @"QCloudCore";
@interface QCloudQCloudCoreLoad : NSObject
@end
Expand Down

0 comments on commit 8452f3a

Please sign in to comment.