Storage async await#8289
Merged
Merged
Conversation
Collaborator
Coverage ReportAffected SDKsNo changes between base commit (d550a72) and head commit (2bffe65). Test Logs
|
4007610 to
ffdbc7b
Compare
ncooke3
reviewed
Jul 1, 2021
ncooke3
left a comment
Member
There was a problem hiding this comment.
This is looking really neat! 😎
ryanwilson
reviewed
Jul 12, 2021
96d60a6 to
8235e4d
Compare
Member
Author
|
API change is now approved. The PR is ready for final review and merge. |
ncooke3
reviewed
Jul 23, 2021
paulb777
commented
Jul 23, 2021
8235e4d to
f8acfda
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Storage Integration Tests are converted to async/await and four new APIs are added to cover cases that don't get an automatic Xcode conversion.
If you want to experiment, the test infra is green here.
Xcode 13+ automatically converts Objective C APIs that return void and take a completion block parameter to an additional async API.
Googlers can see the API proposal at go/firebase-storage-async-await1. An excerpt follows:
The automatic API conversions for Storage are shown in Column G of this spreadsheet designed by @peterfriese. Note that the APIs that return a StorageDownloadTask or StorageUploadTask are not converted.
For Storage, Xcode automatically converts the following APIs to async versions as shown here:
The following APIs have completion parameters but do not get an automatic async API generated because they do not have a Void return value:
I implemented the following four APIs (full implementation here) to fill in the gap by providing APIs to do the implementation without the task handle return value:
The functions are renamed to avoid collisions with the existing API.