Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#Changelog
## 8.9.2 (2025-08-20)
- 优化进度处理,处理用户进度处理耗时较长问题

## 8.9.1 (2025-08-20)
- 修复回调问题
- 优化回调问题

## 8.9.0 (2025-06-12)
- 分片上传默认使用 V2 接口
Expand Down
2 changes: 1 addition & 1 deletion Qiniu.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'Qiniu'
s.version = '8.9.1'
s.version = '8.9.2'
s.summary = 'Qiniu Resource Storage SDK for iOS and Mac'
s.homepage = 'https://github.com/qiniu/objc-sdk'
s.social_media_url = 'http://weibo.com/qiniutek'
Expand Down
57 changes: 57 additions & 0 deletions QiniuSDK.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1365,6 +1365,7 @@
DF2CDDFB19DAC05500CE01FB /* Sources */,
DF2CDDFC19DAC05500CE01FB /* Frameworks */,
DF2CDDFD19DAC05500CE01FB /* Headers */,
B940B9ABDE4E592EBAA1F9E0 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand All @@ -1384,6 +1385,7 @@
DF2CDE0719DAC05500CE01FB /* Frameworks */,
DF2CDE0819DAC05500CE01FB /* Resources */,
45BDB3C72C045E8F00F184D7 /* Embed Libraries */,
76584E53BEB48A9FB97225EE /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -1421,6 +1423,7 @@
DF2CDE2019DAC08400CE01FB /* Sources */,
DF2CDE2119DAC08400CE01FB /* Frameworks */,
DF2CDE2219DAC08400CE01FB /* Resources */,
18F63637D3DB5A4B72E2ABEE /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -1518,6 +1521,24 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
18F63637D3DB5A4B72E2ABEE /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-QiniuSDK_iOSTests/Pods-QiniuSDK_iOSTests-resources.sh",
"${PODS_CONFIGURATION_BUILD_DIR}/HappyDNS-iOS/HappyDNS.privacy.bundle",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/HappyDNS.privacy.bundle",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-QiniuSDK_iOSTests/Pods-QiniuSDK_iOSTests-resources.sh\"\n";
showEnvVarsInLog = 0;
};
31259E4A24E63BBB00CF7531 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -1571,6 +1592,24 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
76584E53BEB48A9FB97225EE /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-QiniuSDK_MacTests/Pods-QiniuSDK_MacTests-resources.sh",
"${PODS_CONFIGURATION_BUILD_DIR}/HappyDNS-macOS/HappyDNS.privacy.bundle",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/HappyDNS.privacy.bundle",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-QiniuSDK_MacTests/Pods-QiniuSDK_MacTests-resources.sh\"\n";
showEnvVarsInLog = 0;
};
9635BFBB21C34ACD5AEDC9EB /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand All @@ -1589,6 +1628,24 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
B940B9ABDE4E592EBAA1F9E0 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-QiniuSDK_Mac/Pods-QiniuSDK_Mac-resources.sh",
"${PODS_CONFIGURATION_BUILD_DIR}/HappyDNS-macOS/HappyDNS.privacy.bundle",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/HappyDNS.privacy.bundle",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-QiniuSDK_Mac/Pods-QiniuSDK_Mac-resources.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand Down
13 changes: 11 additions & 2 deletions QiniuSDK/Storage/QNBaseUpload.m
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,18 @@ - (void)complete:(QNResponseInfo *)info
[self.metrics addMetrics:self.currentRegionRequestMetrics];
}
if (self.completionHandler) {
self.completionHandler(info, _key, _metrics, response);
kQNWeakSelf;
QNAsyncRunInMain(^{
kQNStrongSelf;

if (self) {
self.completionHandler(info, self.key, self.metrics, response);
self.strongSelf = nil;
}
});
} else {
self.strongSelf = nil;
}
self.strongSelf = nil;
}

//MARK:-- region
Expand Down
12 changes: 9 additions & 3 deletions QiniuSDK/Storage/QNUpProgress.m
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ - (void)notify:(NSString *)key uploadBytes:(long long)uploadBytes totalBytes:(lo
kQNWeakSelf;
QNAsyncRunInMain(^{
kQNStrongSelf;
self.byteProgress(key, uploadBytes, totalBytes);

if (self && self.byteProgress) {
self.byteProgress(key, uploadBytes, totalBytes);
}
});
return;
}
Expand All @@ -83,8 +86,11 @@ - (void)notify:(NSString *)key uploadBytes:(long long)uploadBytes totalBytes:(lo
kQNWeakSelf;
QNAsyncRunInMain(^{
kQNStrongSelf;
double notifyPercent = (double) uploadBytes / (double) totalBytes;
self.progress(key, notifyPercent);

if (self && self.progress) {
double notifyPercent = (double) uploadBytes / (double) totalBytes;
self.progress(key, notifyPercent);
}
});
}
}
Expand Down
9 changes: 4 additions & 5 deletions QiniuSDK/Storage/QNUploadManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -445,11 +445,10 @@ + (void)complete:(NSString *)token

[QNUploadManager reportQuality:key source:source responseInfo:responseInfo taskMetrics:taskMetrics token:token];

QNAsyncRunInMain(^{
if (completionHandler) {
completionHandler(responseInfo, key, response);
}
});

if (completionHandler) {
completionHandler(responseInfo, key, response);
}
}


Expand Down
2 changes: 1 addition & 1 deletion QiniuSDK/Utils/QNVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
/**
* sdk 版本
*/
static NSString *const kQiniuVersion = @"8.9.1";
static NSString *const kQiniuVersion = @"8.9.2";
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
通过 CocoaPods

```ruby
pod "Qiniu", "~> 8.9.1"
pod "Qiniu", "~> 8.9.2"
```

通过 Swift Package Manager (Xcode 11+)
Expand All @@ -26,7 +26,7 @@ File -> Swift Packages -> Add Package Dependency,输入库链接,选择相
库对接:
let package = Package(
dependencies: [
.package(url: "https://github.com/qiniu/objc-sdk", from: "8.9.1")
.package(url: "https://github.com/qiniu/objc-sdk", from: "8.9.2")
],
// ...
)
Expand Down
Loading