From 832d3de07c22d5402fd4baabb79978ff8c25cd73 Mon Sep 17 00:00:00 2001 From: toknsiT Date: Thu, 13 Jun 2024 14:32:17 +0800 Subject: [PATCH 1/4] =?UTF-8?q?fix:=20=E6=96=B0=E5=AF=86=E9=92=A5=E4=B8=8D?= =?UTF-8?q?=E4=BC=A0=E7=BB=99cosApi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/cos.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/cos.dart b/lib/cos.dart index 07efd42..c9ae00d 100644 --- a/lib/cos.dart +++ b/lib/cos.dart @@ -97,7 +97,8 @@ class Cos { /// 包括SessionCredential或ScopeLimitCredential Future forceInvalidationCredential() async { flutterCosApi.forceInvalidationScopeCredentials(); - return await _cosApi.forceInvalidationCredential(); + await _cosApi.forceInvalidationCredential(); + _initialized = false; } Future setCloseBeacon(bool isCloseBeacon) async { From e2a1f8b4517dde90f7671cc947fbd9581317e62f Mon Sep 17 00:00:00 2001 From: toknsiT Date: Thu, 8 Aug 2024 18:17:57 +0800 Subject: [PATCH 2/4] fix: expires not found error --- ios/Classes/CosPlugin.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ios/Classes/CosPlugin.m b/ios/Classes/CosPlugin.m index 1efbd06..3f7f921 100644 --- a/ios/Classes/CosPlugin.m +++ b/ios/Classes/CosPlugin.m @@ -443,9 +443,10 @@ - (void)getPresignedUrlServiceKey:(nonnull NSString *)serviceKey bucket:(nonnull getPresignedURLRequest.object = cosPath; getPresignedURLRequest.HTTPMethod = @"GET"; - if(signValidTime){ - getPresignedURLRequest.expires = [NSDate dateWithTimeIntervalSinceNow:[signValidTime intValue]]; - } + // 2024-08-08 腾讯突然 expires not found error了 + // if(signValidTime){ + // getPresignedURLRequest.expires = [NSDate dateWithTimeIntervalSinceNow:[signValidTime intValue]]; + // } if(signHost){ // 获取预签名函数,默认签入Header Host;您也可以选择不签入Header Host,但可能导致请求失败或安全漏洞 From a5928c2a45a1ceaa0fdd6627559a1082b706a5ad Mon Sep 17 00:00:00 2001 From: toknsiT Date: Fri, 9 Aug 2024 09:35:44 +0800 Subject: [PATCH 3/4] =?UTF-8?q?rollback:=202024-08-08=20=E8=85=BE=E8=AE=AF?= =?UTF-8?q?=E7=AA=81=E7=84=B6=20expires=20not=20found=20error=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Classes/CosPlugin.m | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ios/Classes/CosPlugin.m b/ios/Classes/CosPlugin.m index 3f7f921..1efbd06 100644 --- a/ios/Classes/CosPlugin.m +++ b/ios/Classes/CosPlugin.m @@ -443,10 +443,9 @@ - (void)getPresignedUrlServiceKey:(nonnull NSString *)serviceKey bucket:(nonnull getPresignedURLRequest.object = cosPath; getPresignedURLRequest.HTTPMethod = @"GET"; - // 2024-08-08 腾讯突然 expires not found error了 - // if(signValidTime){ - // getPresignedURLRequest.expires = [NSDate dateWithTimeIntervalSinceNow:[signValidTime intValue]]; - // } + if(signValidTime){ + getPresignedURLRequest.expires = [NSDate dateWithTimeIntervalSinceNow:[signValidTime intValue]]; + } if(signHost){ // 获取预签名函数,默认签入Header Host;您也可以选择不签入Header Host,但可能导致请求失败或安全漏洞 From 1e4b488f2a9115cb42bfd07711ef51ffaa46a5a8 Mon Sep 17 00:00:00 2001 From: toknsiT Date: Fri, 9 Aug 2024 09:37:09 +0800 Subject: [PATCH 4/4] =?UTF-8?q?fix:=20ios=20sdk=206.4.1=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/TencentCloud/cos-sdk-flutter-plugin/issues/16 --- ios/tencentcloud_cos_sdk_plugin.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/tencentcloud_cos_sdk_plugin.podspec b/ios/tencentcloud_cos_sdk_plugin.podspec index 9197c6f..488d81c 100644 --- a/ios/tencentcloud_cos_sdk_plugin.podspec +++ b/ios/tencentcloud_cos_sdk_plugin.podspec @@ -17,7 +17,7 @@ Tencent COS Flutter Plugin SDK. s.source_files = 'Classes/**/*' s.public_header_files = 'Classes/**/*.h' s.dependency 'Flutter' - s.dependency 'QCloudCOSXML','>= 6.4.0' + s.dependency 'QCloudCOSXML','= 6.4.0' s.platform = :ios, '9.0' s.static_framework = true