Skip to content
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

Migrate Storage implementation from Objective-C to Swift #9963

Merged
merged 12 commits into from
Sep 22, 2022

Conversation

paulb777
Copy link
Member

@paulb777 paulb777 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

@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
@paulb777 paulb777 force-pushed the storage-swift-phase2 branch 2 times, most recently from 62909cf to 837e81a Compare July 25, 2022 21:47
@paulb777 paulb777 force-pushed the storage-swift-phase2 branch from 837e81a to 5cd2df1 Compare August 6, 2022 00:17
@paulb777 paulb777 force-pushed the storage-swift-phase2 branch from 7788dab to 6724e45 Compare August 17, 2022 14:15
@paulb777 paulb777 added this to the Firebase 10 milestone Aug 19, 2022
@paulb777 paulb777 force-pushed the storage-swift-phase2 branch from 898d59d to aaa6e91 Compare August 26, 2022 03:54
@paulb777 paulb777 force-pushed the storage-swift-phase2 branch 2 times, most recently from 0d7a4da to 6529005 Compare September 7, 2022 21:34
@paulb777 paulb777 force-pushed the storage-swift-phase2 branch from 6529005 to 4ffaa2b Compare September 14, 2022 14:33
.github/workflows/storage.yml Show resolved Hide resolved
FirebaseStorage.podspec Show resolved Hide resolved
FirebaseStorage/Tests/Unit/StorageTests.swift Show resolved Hide resolved
@paulb777 paulb777 requested a review from ncooke3 September 16, 2022 19:30
.github/workflows/storage.yml Show resolved Hide resolved
FirebaseCore/Extension/FIRLogger.h Show resolved Hide resolved
FirebaseCore/Sources/FIRLogger.m Show resolved Hide resolved
FirebaseStorage/Sources/Internal/StorageDeleteTask.swift Outdated Show resolved Hide resolved
FirebaseStorage/Sources/StorageDownloadTask.swift Outdated Show resolved Hide resolved
FirebaseStorage/Sources/StorageMetadata.swift Outdated Show resolved Hide resolved
@paulb777 paulb777 force-pushed the storage-swift-phase2 branch from 7d06691 to 3d51280 Compare September 21, 2022 23:33
@paulb777 paulb777 merged commit 3d51280 into master Sep 22, 2022
@paulb777 paulb777 deleted the storage-swift-phase2 branch September 22, 2022 14:17
FirebaseStorage/Sources/StorageMetadata.swift Outdated Show resolved Hide resolved
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
Member Author

Choose a reason for hiding this comment

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

Good catch! Thanks. #10245

@firebase firebase locked and limited conversation to collaborators Oct 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.