-
Notifications
You must be signed in to change notification settings - Fork 886
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
multiPartUploadProgress and multiPartUploadCompleted blocks are not called when resuming multipartUploadTasks in iOS 18 #5440
Comments
@zamzamfp Thanks for submitting the issue. We'll work on reproducing it and investigate further. |
Hi @phantumcode, any updates on this would be much appreciated. |
Hi @zamzamfp, sorry for the delay in our response. I was able to reproduce this issue. What's happening is that the Transfer Utility is attempting to assign the callbacks before it has finished (or even started) recovering and linking the old upload tasks, so they are ignored. In order to fix this, you should call You can also provide a let transferUtilityKey = //...
AWSS3TransferUtility.register(
with: configuration,
forKey: transferUtilityKey
) { _ in
guard let transferUtility = AWSS3TransferUtility.s3TransferUtility(forKey: transferUtilityKey) else {
print("Unable to register Transfer Utility")
return
}
let blocks = AWSS3TransferUtilityBlocks(
// ...
)
transferUtility.enumerateToAssign(blocks: blocks)
} As a side note, I observed the same behaviour when running on an iOS 17.5 simulator as well, so it's not an iOS 18 specific issue. I guess it really depends on how fast the device is and where in your app life cycle you're actually calling |
@ruisebas Thanks for the answer. I will try this and get back to you. |
Good to know that this works for you now :) Regarding Amplify Storage, you can manually pause and resume tasks, if that's what you're asking. See our documentation for upload tasks and download tasks. |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Describe the bug
We have implemented the suggested solution for resuming uploads from this GitHub comment, by calling
transferUtility.enumerateToAssign(blocks: blocks)
and it was working fine. There was a delay, as mentioned in this issue, but the progress and completion callbacks were being called successfully on iOS 17.5.1 using Xcode 15.4.However, since upgrading to iOS 18 (and also in iOS 17.6.1), I’ve noticed a problem. Although the upload resumes and completes as expected—seeing it in the debug logs and also confirming its upload on the S3 bucket—the progress and completion blocks are not triggered. This means that there’s no way to update the UI with upload progress or completion status. This is a big problem for us as we are uploading large files around 10GB, so we rely on being able to resume uploads in case the app was terminated.
To Reproduce
Steps to reproduce the behavior:
Observed Behavior
The upload does continue, and successfully finishes, but the multiPartUploadProgress and multiPartUploadCompleted blocks are not getting triggered.
Expected Behavior
Getting call back in multiPartUploadProgress and multiPartUploadCompleted blocks
Code Snippet
we are initiating transferUtility with a unique key
transferUtility= AWSS3TransferUtility.s3TransferUtility(forKey: )
Areas of the SDK you are using (AWSMobileClient, Cognito, Pinpoint, IoT, etc)?
S3
transferUtility
uploadUsingMultiPart
enumerateToAssign
Environment(please complete the following information):
Device Information (please complete the following information):
Relevant Console Output
Note that all the tests was done on a real device.
Where the resume is successfully triggering the logs are
When running the same code on and iOS 18.0 device and the call backs are not triggered
So everything seems to be the same and the upload does finish successfully but the progress and completion blocks are not getting triggered.
The text was updated successfully, but these errors were encountered: