Skip to content

Migrate Storage implementation from Objective-C to Swift#9963

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

Merged
merged 12 commits into from
Sep 22, 2022

Conversation

paulb777
Copy link
Member

@paulb777paulb777 commented Jun 29, 2022

storage-swift-phase2 is a long-lived branch for migrating the Storage implementation from Objective-C to Swift.

Almost all of the changes are a straight port from Objective C to Swift. One exception is the Authorizer code implements a new GTMSessionFetcher protocol to avoid complexity around using NSInvocation from Swift required with the old protocol.

Key commits:

@google-oss-bot
Copy link

google-oss-bot commented Jun 29, 2022

Coverage Report 1

Affected Products

  • FirebaseStorage-iOS-FirebaseStorage.framework

    Overall coverage changed from ? (6e0fda7) to 0.00% (c69584f) by ?.

    21 individual files with coverage change

    FilenameBase (6e0fda7)Merge (c69584f)Diff
    AsyncAwait.swift?0.00%?
    Result.swift?0.00%?
    Storage.swift?0.00%?
    StorageComponent.swift?0.00%?
    StorageDeleteTask.swift?0.00%?
    StorageDownloadTask.swift?0.00%?
    StorageError.swift?0.00%?
    StorageGetDownloadURLTask.swift?0.00%?
    StorageGetMetadataTask.swift?0.00%?
    StorageListResult.swift?0.00%?
    StorageListTask.swift?0.00%?
    StorageMetadata.swift?0.00%?
    StorageObservableTask.swift?0.00%?
    StoragePath.swift?0.00%?
    StorageReference.swift?0.00%?
    StorageTask.swift?0.00%?
    StorageTaskSnapshot.swift?0.00%?
    StorageTokenAuthorizer.swift?0.00%?
    StorageUpdateMetadataTask.swift?0.00%?
    StorageUploadTask.swift?0.00%?
    StorageUtils.swift?0.00%?

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/bnci4701PV.html
@paulb777paulb777 merged commit 3d51280 into masterSep 22, 2022
@paulb777paulb777 deleted the storage-swift-phase2 branch September 22, 2022 14:17
open func listAll(completion: @escaping ((_: StorageListResult?, _: Error?) -> Void)) {
impl.listAll { listResult, error in
if error != nil {
open func listAll(completion: @escaping ((_: StorageListResult?, _: NSError?) -> Void)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the NSError here intentional?

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Thanks. #10245

@paulb777paulb777 mentioned this pull request Sep 22, 2022
@firebasefirebase locked and limited conversation to collaborators Oct 23, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.
close