Kaynağa Gözat

Remove FirebaseStorageInternal (#10118)

Paul Beusterien 3 yıl önce
ebeveyn
işleme
ce3b40a56b
36 değiştirilmiş dosya ile 60 ekleme ve 925 silme
  1. 2 3
      .github/workflows/combine.yml
  2. 5 24
      .github/workflows/storage.yml
  3. 1 1
      .github/workflows/watchos-sample.yml
  4. 2 3
      .gitignore
  5. 1 1
      CONTRIBUTING.md
  6. 0 1
      CocoapodsIntegrationTest/TestEnvironments/Cocoapods_multiprojects_frameworks/Podfile
  7. 0 1
      CoreOnly/NOTICES
  8. 0 1
      CoreOnly/Tests/FirebasePodTest/Podfile
  9. 0 1
      Dangerfile
  10. 0 1
      Example/watchOSSample/Podfile
  11. 3 3
      FirebaseCombineSwift.podspec
  12. 5 6
      FirebaseStorage.podspec
  13. 0 0
      FirebaseStorage/Tests/Integration/Resources/1mb.dat
  14. 0 0
      FirebaseStorage/Tests/Integration/Resources/HomeImprovement.numbers/About.txt
  15. 24 0
      FirebaseStorage/Tests/Integration/StorageIntegration.swift
  16. 0 0
      FirebaseStorage/Tests/ObjCIntegration/Credentials.h
  17. 1 1
      FirebaseStorage/Tests/ObjCIntegration/FIRStorageIntegrationTests.m
  18. 0 69
      FirebaseStorageInternal.podspec
  19. 0 89
      FirebaseStorageInternal/Sources/FIRStorageConstants.m
  20. 0 142
      FirebaseStorageInternal/Sources/FIRStorageConstants_Private.h
  21. 0 61
      FirebaseStorageInternal/Sources/FIRStorageErrors.h
  22. 0 24
      FirebaseStorageInternal/Sources/FIRStorageLogger.h
  23. 0 22
      FirebaseStorageInternal/Sources/FIRStorageLogger.m
  24. 0 175
      FirebaseStorageInternal/Sources/Public/FirebaseStorageInternal/FIRStorageConstants.h
  25. 0 82
      FirebaseStorageInternal/Tests/Unit/FIRStorageTestHelpers.h
  26. 0 99
      FirebaseStorageInternal/Tests/Unit/FIRStorageTestHelpers.m
  27. 4 26
      Package.swift
  28. 1 1
      README.md
  29. 0 1
      ReleaseTooling/Sources/FirebaseManifest/FirebaseManifest.swift
  30. 5 4
      SymbolCollisionTest/Podfile
  31. 2 2
      scripts/build.sh
  32. 1 1
      scripts/change_headers.swift
  33. 1 1
      scripts/check_imports.swift
  34. 1 1
      scripts/health_metrics/file_patterns.json
  35. 1 1
      scripts/localize_podfile.swift
  36. 0 77
      scripts/spm_test_schemes/StorageUnit.xcscheme

+ 2 - 3
.github/workflows/combine.yml

@@ -34,7 +34,6 @@ on:
     # - 'FirebaseAuth/**'
     # - 'FirebaseFunctions/**'
     # - 'Firestore/**'
-    # - 'FirebaseStorageInternal/**'
     # - 'FirebaseStorage/**'
 
   schedule:
@@ -90,10 +89,10 @@ jobs:
       run: gem install xcpretty
     - name: Install Secret GoogleService-Info.plist
       run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/storage-db-plist.gpg \
-          FirebaseStorageInternal/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret"
+          FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret"
     - name: Install Credentials.h
       run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.h.gpg \
-          FirebaseStorageInternal/Tests/Integration/Credentials.h "$plist_secret"
+          FirebaseStorage/Tests/ObjCIntegration/Credentials.h "$plist_secret"
     - name: Install Credentials.swift
       run: |
         scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.swift.gpg \

+ 5 - 24
.github/workflows/storage.yml

@@ -36,10 +36,10 @@ jobs:
       run: gem install xcpretty
     - name: Install Secret GoogleService-Info.plist
       run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/storage-db-plist.gpg \
-          FirebaseStorageInternal/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret"
+          FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret"
     - name: Install Credentials.h
       run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.h.gpg \
-          FirebaseStorageInternal/Tests/Integration/Credentials.h "$plist_secret"
+          FirebaseStorage/Tests/ObjCIntegration/Credentials.h "$plist_secret"
     - name: Install Credentials.swift
       run: |
         scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.swift.gpg \
@@ -58,8 +58,6 @@ jobs:
         cache_key: ${{ matrix.os }}
     - name: Initialize xcodebuild
       run: scripts/setup_spm_tests.sh
-    - name: Objective-C Unit Tests
-      run: scripts/third_party/travis/retry.sh ./scripts/build.sh StorageUnit iOS spm
     - name: Swift Unit Tests
       run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseStorageUnit iOS spm
 
@@ -78,22 +76,7 @@ jobs:
     - name: Initialize xcodebuild
       run: scripts/setup_spm_tests.sh
     - name: Unit Tests
-      run: scripts/third_party/travis/retry.sh ./scripts/build.sh StorageUnit ${{ matrix.target }} spm
-
-  catalyst:
-    # Don't run on private repo unless it is a PR.
-    if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
-    runs-on: macos-12
-    steps:
-    - uses: actions/checkout@v2
-    - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
-      with:
-        cache_key: ${{ matrix.os }}
-    - uses: ruby/setup-ruby@v1
-    - name: Setup Bundler
-      run: scripts/setup_bundler.sh
-    - name: Setup project and Build for Catalyst
-      run: scripts/test_catalyst.sh FirebaseStorageInternal test FirebaseStorageInternal-Unit-unit
+      run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseStorageUnit ${{ matrix.target }} spm
 
   quickstart:
     # Don't run on private repo unless it is a PR.
@@ -124,7 +107,6 @@ jobs:
     strategy:
       matrix:
         target: [ios, tvos, macos, watchos]
-        podspec: [FirebaseStorage.podspec, FirebaseStorageInternal.podspec]
     steps:
     - uses: actions/checkout@v2
     - uses: ruby/setup-ruby@v1
@@ -132,7 +114,7 @@ jobs:
       run: scripts/setup_bundler.sh
     - name: Build and test
       run: |
-       scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} --test-specs=unit --platforms=${{ matrix.target }}
+       scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec --test-specs=unit --platforms=${{ matrix.target }}
 
   storage-cron-only:
     # Don't run on private repo.
@@ -141,7 +123,6 @@ jobs:
     strategy:
       matrix:
         target: [ios, tvos, macos, watchos]
-        podspec: [FirebaseStorage.podspec, FirebaseStorageInternal.podspec]
     needs: pod-lib-lint
     steps:
     - uses: actions/checkout@v2
@@ -149,4 +130,4 @@ jobs:
     - name: Setup Bundler
       run: scripts/setup_bundler.sh
     - name: PodLibLint Storage Cron
-      run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} --platforms=${{ matrix.target }} --use-static-frameworks --skip-tests
+      run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec --platforms=${{ matrix.target }} --use-static-frameworks --skip-tests

+ 1 - 1
.github/workflows/watchos-sample.yml

@@ -7,7 +7,7 @@ on:
     - 'FirebaseABTesting/**'
     - 'FirebaseDatabase/**'
     - 'FirebaseRemoteConfig/**'
-    - 'FirebaseStorageInternal/**'
+    - 'FirebaseStorage/**'
     # Sample
     - 'Example/watchOSSample/**'
     # Firebase Podspec

+ 2 - 3
.gitignore

@@ -11,7 +11,7 @@ FirebaseDatabase/Tests/Resources/GoogleService-Info.plist
 FirebaseRemoteConfig/Tests/Sample/GoogleService-Info.plist
 
 # FirebaseStorage integration tests GoogleService-Info.plist
-FirebaseStorageInternal/Tests/Integration/Resources/GoogleService-Info.plist
+FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist
 
 # FirebaseInstallations integration tests GoogleService-Info.plist
 FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist
@@ -24,8 +24,7 @@ FirebaseMessaging/Apps/AdvancedSample/SampleWatchWatchKitExtension/GoogleService
 FirebaseMessaging/Apps/AdvancedSample/AppClips/GoogleService-Info.plist
 
 # Credentials for Firebase Storage Integration Tests
-FirebaseStorageInternal/Tests/Integration/Credentials.h
-FirebaseStorageInternal/Tests/SwiftIntegration/Credentials.swift
+FirebaseStorage/Tests/ObjCIntegration/Credentials.h
 FirebaseStorage/Tests/Integration/Credentials.swift
 
 # FirebaseMLModelDownloader integration tests GoogleService-Info.plist

+ 1 - 1
CONTRIBUTING.md

@@ -271,7 +271,7 @@ Alternatively, the script can be work on branch names or filenames.
 ```
 
 ```console
-./scripts/style.sh FirebaseStorageInternal/Sources/FIRStorage.m
+./scripts/style.sh FirebaseStorage/Sources/Storage.swift
 ```
 
 <details>

+ 0 - 1
CocoapodsIntegrationTest/TestEnvironments/Cocoapods_multiprojects_frameworks/Podfile

@@ -28,7 +28,6 @@ target 'CocoapodsIntegrationTest' do
   pod 'FirebaseMessagingInterop', :path => '../'
   pod 'FirebasePerformance', :path => '../'
   pod 'FirebaseStorage', :path => '../'
-  pod 'FirebaseStorageInternal', :path => '../'
 end
 
 # Using the new speed-enhancing features available with CocoaPods 1.7+

+ 0 - 1
CoreOnly/NOTICES

@@ -278,7 +278,6 @@ FirebasePerformance
 FirebaseRemoteConfig
 FirebaseRemoteConfigSwift
 FirebaseStorage
-FirebaseStorageInternal
 GTMSessionFetcher
 GoogleDataTransport
 PromisesObjC

+ 0 - 1
CoreOnly/Tests/FirebasePodTest/Podfile

@@ -29,7 +29,6 @@ target 'FirebasePodTest' do
   pod 'FirebasePerformance', :path => '../../../'
   pod 'FirebaseRemoteConfig', :path => '../../../'
   pod 'FirebaseStorage', :path => '../../../'
-  pod 'FirebaseStorageInternal', :path => '../../../'
 
   # Get dependent pods from the repo also
   pod 'FirebaseAppCheckInterop', :path => '../../../'

+ 0 - 1
Dangerfile

@@ -117,7 +117,6 @@ has_license_changes = didModify(["LICENSE"])
 @has_remoteconfig_changes = hasChangesIn("FirebaseRemoteConfig")
 @has_remoteconfig_api_changes = hasChangesIn("FirebaseRemoteConfig/Sources/Public/")
 @has_storage_changes = hasChangesIn("FirebaseStorage")
-@has_storage_api_changes = hasChangesIn("FirebaseStorageInternal/Sources/Public/")
 
 @has_releasetooling_changes = hasChangesIn("ReleaseTooling/")
 

+ 0 - 1
Example/watchOSSample/Podfile

@@ -23,7 +23,6 @@ target 'SampleWatchAppWatchKitExtension' do
 
   pod 'Firebase/Messaging', :path => '../../'
   pod 'Firebase/Storage', :path => '../../'
-  pod 'FirebaseStorageInternal', :path => '../../'
   pod 'Firebase/RemoteConfig', :path => '../../'
   pod 'Firebase/ABTesting', :path => '../../'
   pod 'Firebase/Database', :path => '../../'

+ 3 - 3
FirebaseCombineSwift.podspec

@@ -97,9 +97,9 @@ for internal testing only. It should not be published.
     ]
     int_tests.requires_app_host = true
     # Resources are shared with FirebaseStorage's integration tests.
-    int_tests.resources = 'FirebaseStorageInternal/Tests/Integration/Resources/1mb.dat',
-                          'FirebaseStorageInternal/Tests/Integration/Resources/GoogleService-Info.plist',
-                          'FirebaseStorageInternal/Tests/Integration/Resources/HomeImprovement.numbers'
+    int_tests.resources = 'FirebaseStorage/Tests/Integration/Resources/1mb.dat',
+                          'FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist',
+                          'FirebaseStorage/Tests/Integration/Resources/HomeImprovement.numbers'
     int_tests.dependency 'FirebaseAuth', '~> 9.0'
   end
 end

+ 5 - 6
FirebaseStorage.podspec

@@ -51,12 +51,11 @@ Firebase Storage provides robust, secure file uploads and downloads from Firebas
       :tvos => tvos_deployment_target
     }
     objc_tests.source_files = [
-      'FirebaseStorageInternal/Tests/Integration/*.[mh]',
       'FirebaseStorage/Tests/ObjCIntegration/*.{m,mm}',
     ]
     objc_tests.requires_app_host = true
-    objc_tests.resources = 'FirebaseStorageInternal/Tests/Integration/Resources/1mb.dat',
-                          'FirebaseStorageInternal/Tests/Integration/Resources/GoogleService-Info.plist'
+    objc_tests.resources = 'FirebaseStorage/Tests/Integration/Resources/1mb.dat',
+                          'FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist'
     objc_tests.dependency 'FirebaseAuth', '~> 9.0'
     objc_tests.pod_target_xcconfig = {
       'HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}"'
@@ -82,9 +81,9 @@ Firebase Storage provides robust, secure file uploads and downloads from Firebas
     }
     int_tests.source_files = 'FirebaseStorage/Tests/Integration/*.swift'
     int_tests.requires_app_host = true
-    int_tests.resources = 'FirebaseStorageInternal/Tests/Integration/Resources/1mb.dat',
-                          'FirebaseStorageInternal/Tests/Integration/Resources/GoogleService-Info.plist',
-                          'FirebaseStorageInternal/Tests/Integration/Resources/HomeImprovement.numbers'
+    int_tests.resources = 'FirebaseStorage/Tests/Integration/Resources/1mb.dat',
+                          'FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist',
+                          'FirebaseStorage/Tests/Integration/Resources/HomeImprovement.numbers'
     int_tests.dependency 'FirebaseAuth', '~> 9.0'
   end
 end

+ 0 - 0
FirebaseStorageInternal/Tests/Integration/Resources/1mb.dat → FirebaseStorage/Tests/Integration/Resources/1mb.dat


+ 0 - 0
FirebaseStorageInternal/Tests/Integration/Resources/HomeImprovement.numbers/About.txt → FirebaseStorage/Tests/Integration/Resources/HomeImprovement.numbers/About.txt


+ 24 - 0
FirebaseStorage/Tests/Integration/StorageIntegration.swift

@@ -17,6 +17,30 @@ import FirebaseCore
 import FirebaseStorage
 import XCTest
 
+/**
+ * Firebase Storage Integration tests
+ *
+ * To run these tests, you need to define the following access rights:
+ *
+  rules_version = '2';
+  service firebase.storage {
+    match /b/{bucket}/o {
+      match /{directChild=*} {
+        allow read: if request.auth != null;
+      }
+      match /ios {
+        match /public/{allPaths=**} {
+          allow write: if request.auth != null;
+          allow read: if true;
+        }
+        match /private/{allPaths=**} {
+          allow read, write: if false;
+        }
+      }
+    }
+  }
+ */
+
 class StorageResultTests: StorageIntegrationCommon {
   func testGetMetadata() {
     let expectation = self.expectation(description: "testGetMetadata")

+ 0 - 0
FirebaseStorageInternal/Tests/Integration/Credentials.h → FirebaseStorage/Tests/ObjCIntegration/Credentials.h


+ 1 - 1
FirebaseStorageInternal/Tests/Integration/FIRStorageIntegrationTests.m → FirebaseStorage/Tests/ObjCIntegration/FIRStorageIntegrationTests.m

@@ -20,7 +20,7 @@
 
 #import "FirebaseCore/Extension/FirebaseCoreInternal.h"
 
-#import "FirebaseStorageInternal/Tests/Integration/Credentials.h"
+#import "FirebaseStorage/Tests/ObjCIntegration/Credentials.h"
 
 NSTimeInterval kFIRStorageIntegrationTestTimeout = 60;
 

+ 0 - 69
FirebaseStorageInternal.podspec

@@ -1,69 +0,0 @@
-Pod::Spec.new do |s|
-  s.name             = 'FirebaseStorageInternal'
-  s.version          = '9.6.0'
-  s.summary          = 'Firebase Storage'
-
-  s.description      = <<-DESC
-Objective-C Implementations for FirebaseStorage. This pod should not be directly imported.
-                       DESC
-
-  s.homepage         = 'https://firebase.google.com'
-  s.license          = { :type => 'Apache-2.0', :file => 'LICENSE' }
-  s.authors          = 'Google, Inc.'
-
-  s.source           = {
-    :git => 'https://github.com/firebase/firebase-ios-sdk.git',
-    :tag => 'CocoaPods-' + s.version.to_s
-  }
-  s.social_media_url = 'https://twitter.com/Firebase'
-
-  ios_deployment_target = '11.0'
-  osx_deployment_target = '10.13'
-  tvos_deployment_target = '11.0'
-  watchos_deployment_target = '6.0'
-
-  s.ios.deployment_target = ios_deployment_target
-  s.osx.deployment_target = osx_deployment_target
-  s.tvos.deployment_target = tvos_deployment_target
-  s.watchos.deployment_target = watchos_deployment_target
-
-  s.swift_version = '5.3'
-
-  s.cocoapods_version = '>= 1.4.0'
-  s.prefix_header_file = false
-
-  s.source_files = [
-    'FirebaseStorageInternal/Sources/**/*.[mh]',
-    'FirebaseAppCheck/Interop/*.h',
-    'FirebaseAuth/Interop/*.h',
-    'FirebaseCore/Sources/Private/*.h',
-    'FirebaseCore/Extension/*.h',
-  ]
-  s.public_header_files = 'FirebaseStorageInternal/Sources/Public/FirebaseStorageInternal/*.h'
-
-  s.osx.framework = 'CoreServices'
-
-  s.dependency 'FirebaseCore', '~> 9.0'
-  s.dependency 'GTMSessionFetcher/Core', '>= 1.7', '< 3.0'
-  s.pod_target_xcconfig = {
-    'GCC_C_LANGUAGE_STANDARD' => 'c99',
-    'HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}"'
-  }
-
-  s.test_spec 'unit' do |unit_tests|
-    unit_tests.scheme = { :code_coverage => true }
-    unit_tests.platforms = {
-      :ios => ios_deployment_target,
-      :osx => osx_deployment_target,
-      :tvos => tvos_deployment_target,
-      :watchos => watchos_deployment_target,
-    }
-    unit_tests.source_files = [
-      'FirebaseStorageInternal/Tests/Unit/*.[mh]',
-      'SharedTestUtilities/FIRComponentTestUtilities.*',
-      'SharedTestUtilities/FIRAuthInteropFake.*',
-      'SharedTestUtilities/AppCheckFake/*.[mh]',
-    ]
-    unit_tests.dependency 'OCMock'
-  end
-end

+ 0 - 89
FirebaseStorageInternal/Sources/FIRStorageConstants.m

@@ -1,89 +0,0 @@
-// Copyright 2017 Google
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#import "FirebaseStorageInternal/Sources/Public/FirebaseStorageInternal/FIRStorageConstants.h"
-
-#import "FirebaseStorageInternal/Sources/FIRStorageConstants_Private.h"
-
-NSString *const kGCSScheme = @"https";
-NSString *const kGCSHost = @"www.googleapis.com";
-NSString *const kGCSUploadPath = @"upload";
-NSString *const kGCSStorageVersionPath = @"storage/v1";
-NSString *const kGCSBucketPathFormat = @"b/%@";
-NSString *const kGCSObjectPathFormat = @"o/%@";
-
-NSString *const kFIRStorageScheme = @"https";
-NSString *const kFIRStorageHost = @"firebasestorage.googleapis.com";
-NSInteger const kFIRStoragePort = 443;
-NSString *const kFIRStorageVersionPath = @"v0";
-NSString *const kFIRStorageBucketPathFormat = @"b/%@";
-NSString *const kFIRStorageObjectPathFormat = @"o/%@";
-NSString *const kFIRStorageFullPathFormat = @"/v0/b/%@/o/%@";
-
-NSString *const kFIRStorageAuthTokenFormat = @"Firebase %@";
-NSString *const kFIRStorageDefaultBucketFormat = @"gs://%@";
-
-NSString *const kFIRStorageResponseErrorDomain = @"ResponseErrorDomain";
-NSString *const kFIRStorageResponseErrorCode = @"ResponseErrorCode";
-NSString *const kFIRStorageResponseBody = @"ResponseBody";
-
-NSString *const FIRStorageErrorDomain = @"FIRStorageErrorDomain";
-NSString *const FIRStorageErrorDomainInternal = @"FIRStorageErrorDomain";
-
-NSString *const kFIRStorageInvalidDataFormat = @"Invalid data returned from the server: %@";
-NSString *const kFIRStorageInvalidObserverStatus =
-    @"Invalid observer status requested, use one "
-    @"of: FIRIMPLStorageTaskStatusPause, Resume, Progress, "
-    @"Complete, or Failure";
-
-/**
- * String constants mapping GCS Object#list results to ListResult fields.
- */
-NSString *const kFIRStorageListPrefixes = @"prefixes";
-NSString *const kFIRStorageListItems = @"items";
-NSString *const kFIRStorageListItemName = @"name";
-NSString *const kFIRStorageListPageToken = @"nextPageToken";
-
-/**
- * String constants mapping GCS Object#resource mappings to metadata fields.
- */
-NSString *const kFIRStorageMetadataBucket = @"bucket";
-NSString *const kFIRStorageMetadataCacheControl = @"cacheControl";
-NSString *const kFIRStorageMetadataContentDisposition = @"contentDisposition";
-NSString *const kFIRStorageMetadataContentEncoding = @"contentEncoding";
-NSString *const kFIRStorageMetadataContentLanguage = @"contentLanguage";
-NSString *const kFIRStorageMetadataContentType = @"contentType";
-NSString *const kFIRStorageMetadataCustomMetadata = @"metadata";
-NSString *const kFIRStorageMetadataSize = @"size";
-NSString *const kFIRStorageMetadataGeneration = @"generation";
-NSString *const kFIRStorageMetadataMetageneration = @"metageneration";
-NSString *const kFIRStorageMetadataTimeCreated = @"timeCreated";
-NSString *const kFIRStorageMetadataUpdated = @"updated";
-NSString *const kFIRStorageMetadataName = @"name";
-NSString *const kFIRStorageMetadataDownloadTokens = @"downloadTokens";
-NSString *const kFIRStorageMetadataMd5Hash = @"md5Hash";
-
-// TODO: add notification support
-NSString *const kFIRIMPLStorageTaskStatusResumeNotification =
-    @"kFIRIMPLStorageTaskStatusResumeNotification";
-NSString *const kFIRIMPLStorageTaskStatusPauseNotification =
-    @"kFIRIMPLStorageTaskStatusResumeNotification";
-NSString *const kFIRIMPLStorageTaskStatusProgressNotification =
-    @"kFIRIMPLStorageTaskStatusResumeNotification";
-NSString *const kFIRIMPLStorageTaskStatusCompleteNotification =
-    @"kFIRIMPLStorageTaskStatusResumeNotification";
-NSString *const kFIRIMPLStorageTaskStatusFailureNotification =
-    @"kFIRIMPLStorageTaskStatusResumeNotification";
-
-NSString *const kFIRStorageBundleIdentifier = @"com.google.firebase.storage";

+ 0 - 142
FirebaseStorageInternal/Sources/FIRStorageConstants_Private.h

@@ -1,142 +0,0 @@
-/*
- * Copyright 2017 Google
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#import <Foundation/Foundation.h>
-
-@class FIRIMPLStorageMetadata;
-
-NS_ASSUME_NONNULL_BEGIN
-
-FOUNDATION_EXPORT NSString *const kGCSScheme;
-FOUNDATION_EXPORT NSString *const kGCSHost;
-FOUNDATION_EXPORT NSString *const kGCSUploadPath;
-FOUNDATION_EXPORT NSString *const kGCSStorageVersionPath;
-FOUNDATION_EXPORT NSString *const kGCSBucketPathFormat;
-FOUNDATION_EXPORT NSString *const kGCSObjectPathFormat;
-
-FOUNDATION_EXPORT NSString *const kFIRStorageScheme;
-FOUNDATION_EXPORT NSString *const kFIRStorageHost;
-FOUNDATION_EXPORT NSInteger const kFIRStoragePort;
-FOUNDATION_EXPORT NSString *const kFIRStorageVersionPath;
-FOUNDATION_EXPORT NSString *const kFIRStorageBucketPathFormat;
-FOUNDATION_EXPORT NSString *const kFIRStorageObjectPathFormat;
-FOUNDATION_EXPORT NSString *const kFIRStorageFullPathFormat;
-
-FOUNDATION_EXPORT NSString *const kFIRStorageAuthTokenFormat;
-FOUNDATION_EXPORT NSString *const kFIRStorageDefaultBucketFormat;
-
-FOUNDATION_EXPORT NSString *const kFIRStorageResponseErrorDomain;
-FOUNDATION_EXPORT NSString *const kFIRStorageResponseErrorCode;
-FOUNDATION_EXPORT NSString *const kFIRStorageResponseBody;
-
-FOUNDATION_EXPORT NSString *const kFIRIMPLStorageTaskStatusResumeNotification;
-FOUNDATION_EXPORT NSString *const kFIRIMPLStorageTaskStatusPauseNotification;
-FOUNDATION_EXPORT NSString *const kFIRIMPLStorageTaskStatusProgressNotification;
-FOUNDATION_EXPORT NSString *const kFIRIMPLStorageTaskStatusCompleteNotification;
-FOUNDATION_EXPORT NSString *const kFIRIMPLStorageTaskStatusFailureNotification;
-
-FOUNDATION_EXPORT NSString *const kFIRStorageListPrefixes;
-FOUNDATION_EXPORT NSString *const kFIRStorageListItems;
-FOUNDATION_EXPORT NSString *const kFIRStorageListItemName;
-FOUNDATION_EXPORT NSString *const kFIRStorageListPageToken;
-
-FOUNDATION_EXPORT NSString *const kFIRStorageMetadataBucket;
-FOUNDATION_EXPORT NSString *const kFIRStorageMetadataCacheControl;
-FOUNDATION_EXPORT NSString *const kFIRStorageMetadataContentDisposition;
-FOUNDATION_EXPORT NSString *const kFIRStorageMetadataContentEncoding;
-FOUNDATION_EXPORT NSString *const kFIRStorageMetadataContentLanguage;
-FOUNDATION_EXPORT NSString *const kFIRStorageMetadataContentType;
-FOUNDATION_EXPORT NSString *const kFIRStorageMetadataCustomMetadata;
-FOUNDATION_EXPORT NSString *const kFIRStorageMetadataSize;
-FOUNDATION_EXPORT NSString *const kFIRStorageMetadataGeneration;
-FOUNDATION_EXPORT NSString *const kFIRStorageMetadataMetageneration;
-FOUNDATION_EXPORT NSString *const kFIRStorageMetadataTimeCreated;
-FOUNDATION_EXPORT NSString *const kFIRStorageMetadataUpdated;
-FOUNDATION_EXPORT NSString *const kFIRStorageMetadataName;
-FOUNDATION_EXPORT NSString *const kFIRStorageMetadataDownloadTokens;
-FOUNDATION_EXPORT NSString *const kFIRStorageMetadataMd5Hash;
-
-FOUNDATION_EXPORT NSString *const kFIRStorageInvalidDataFormat;
-FOUNDATION_EXPORT NSString *const kFIRStorageInvalidObserverStatus;
-
-FOUNDATION_EXPORT NSString *const kFIRStorageBundleIdentifier;
-
-/**
- * Enum representing the internal state of an upload or download task.
- */
-typedef NS_ENUM(NSInteger, FIRIMPLStorageTaskState) {
-  /**
-   * Unknown task state
-   */
-  FIRIMPLStorageTaskStateUnknown,
-
-  /**
-   * Task is being queued is ready to run
-   */
-  FIRIMPLStorageTaskStateQueueing,
-
-  /**
-   * Task is resuming from a paused state
-   */
-  FIRIMPLStorageTaskStateResuming,
-
-  /**
-   * Task is currently running
-   */
-  FIRIMPLStorageTaskStateRunning,
-
-  /**
-   * Task reporting a progress event
-   */
-  FIRIMPLStorageTaskStateProgress,
-
-  /**
-   * Task is pausing
-   */
-  FIRIMPLStorageTaskStatePausing,
-
-  /**
-   * Task is completing successfully
-   */
-  FIRIMPLStorageTaskStateCompleting,
-
-  /**
-   * Task is failing unrecoverably
-   */
-  FIRIMPLStorageTaskStateFailing,
-
-  /**
-   * Task paused successfully
-   */
-  FIRIMPLStorageTaskStatePaused,
-
-  /**
-   * Task cancelled successfully
-   */
-  FIRIMPLStorageTaskStateCancelled,
-
-  /**
-   * Task completed successfully
-   */
-  FIRIMPLStorageTaskStateSuccess,
-
-  /**
-   * Task failed unrecoverably
-   */
-  FIRIMPLStorageTaskStateFailed
-};
-
-NS_ASSUME_NONNULL_END

+ 0 - 61
FirebaseStorageInternal/Sources/FIRStorageErrors.h

@@ -1,61 +0,0 @@
-/*
- * Copyright 2017 Google
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#import <Foundation/Foundation.h>
-//#import "FirebaseStorageInternal/Sources/Public/FirebaseStorageInternal/FIRStorageConstants.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-@class FIRIMPLStorageReference;
-
-/**
- * Adds wrappers for common Firebase Storage errors (including creating errors from GCS errors).
- * For more information on unwrapping GCS errors, see the GCS errors docs:
- * https://cloud.google.com/storage/docs/json_api/v1/status-codes
- * This is never publicly exposed to end developers (as they will simply see an NSError).
- */
-@interface FIRStorageErrors : NSObject
-
-/**
- * Creates a Firebase Storage error from a specific GCS error and FIRIMPLStorageReference.
- * @param error Server error to wrap and return as a Firebase Storage error.
- * @param reference FIRIMPLStorageReference which provides context about the request being made.
- * @return Returns a Firebase Storage error, or nil if no error is provided.
- */
-+ (nullable NSError *)errorWithServerError:(nullable NSError *)error
-                                 reference:(nullable FIRIMPLStorageReference *)reference;
-
-/**
- * Creates a Firebase Storage error from an invalid request.
- *
- * @param request The NSData representation of the invalid user request.
- * @return Returns the corresponding Firebase Storage error.
- */
-+ (NSError *)errorWithInvalidRequest:(NSData *)request;
-
-/**
- * Creates a Firebase Storage error with a custom error message.
- *
- * @param errorMessage A custom error message.
- * @return Returns the corresponding Firebase Storage error.
- */
-+ (NSError *)errorWithCustomMessage:(NSString *)errorMessage;
-
-@end
-
-FOUNDATION_EXPORT NSString *const FIRStorageErrorDomainInternal;
-
-NS_ASSUME_NONNULL_END

+ 0 - 24
FirebaseStorageInternal/Sources/FIRStorageLogger.h

@@ -1,24 +0,0 @@
-/*
- * Copyright 2020 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#import <Foundation/Foundation.h>
-
-#import "FirebaseCore/Extension/FirebaseCoreInternal.h"
-
-extern FIRLoggerService kFIRLoggerStorage;
-
-// FIRStorageTokenAuthorizer.m
-extern NSString *const kFIRStorageMessageCodeAppCheckError;

+ 0 - 22
FirebaseStorageInternal/Sources/FIRStorageLogger.m

@@ -1,22 +0,0 @@
-/*
- * Copyright 2020 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#import "FirebaseStorageInternal/Sources/FIRStorageLogger.h"
-
-FIRLoggerService kFIRLoggerStorage = @"[FirebaseStorage]";
-
-// FIRStorageTokenAuthorizer.m
-NSString *const kFIRStorageMessageCodeAppCheckError = @"I-STR000001";

+ 0 - 175
FirebaseStorageInternal/Sources/Public/FirebaseStorageInternal/FIRStorageConstants.h

@@ -1,175 +0,0 @@
-/*
- * Copyright 2017 Google
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#import <Foundation/Foundation.h>
-
-@class FIRIMPLStorageDownloadTask;
-@class FIRIMPLStorageMetadata;
-@class FIRIMPLStorageTaskSnapshot;
-@class FIRIMPLStorageUploadTask;
-
-NS_ASSUME_NONNULL_BEGIN
-
-// TODO: The typedefs are not portable to Swift as typealias's to make available
-// back to Objective-C. See https://stackoverflow.com/a/48069912/556617
-/**
- * NSString typedef representing a task listener handle.
- */
-typedef NSString *FIRStorageHandle;
-
-/**
- * Block typedef typically used when downloading data.
- * @param data The data returned by the download, or nil if no data available or download failed.
- * @param error The error describing failure, if one occurred.
- */
-typedef void (^FIRStorageVoidDataError)(NSData *_Nullable data, NSError *_Nullable error);
-
-/**
- * Block typedef typically used when performing "binary" async operations such as delete,
- * where the operation either succeeds without an error or fails with an error.
- * @param error The error describing failure, if one occurred.
- */
-typedef void (^FIRStorageVoidError)(NSError *_Nullable error);
-
-/**
- * Block typedef typically used when retrieving metadata.
- * @param metadata The metadata returned by the operation, if metadata exists.
- */
-typedef void (^FIRStorageVoidMetadata)(FIRIMPLStorageMetadata *_Nullable metadata);
-
-/**
- * Block typedef typically used when retrieving metadata with the possibility of an error.
- * @param metadata The metadata returned by the operation, if metadata exists.
- * @param error The error describing failure, if one occurred.
- */
-typedef void (^FIRStorageVoidMetadataError)(FIRIMPLStorageMetadata *_Nullable metadata,
-                                            NSError *_Nullable error);
-
-/**
- * Block typedef typically used to asynchronously return a storage task snapshot.
- * @param snapshot The returned task snapshot.
- */
-typedef void (^FIRStorageVoidSnapshot)(FIRIMPLStorageTaskSnapshot *snapshot);
-
-/**
- * Block typedef typically used when retrieving a download URL.
- * @param URL The download URL associated with the operation.
- * @param error The error describing failure, if one occurred.
- */
-typedef void (^FIRStorageVoidURLError)(NSURL *_Nullable URL, NSError *_Nullable error);
-
-/**
- * Enum representing the upload and download task status.
- */
-typedef NS_ENUM(NSInteger, FIRIMPLStorageTaskStatus) {
-  /**
-   * Unknown task status.
-   */
-  FIRIMPLStorageTaskStatusUnknown,
-
-  /**
-   * Task is being resumed.
-   */
-  FIRIMPLStorageTaskStatusResume,
-
-  /**
-   * Task reported a progress event.
-   */
-  FIRIMPLStorageTaskStatusProgress,
-
-  /**
-   * Task is paused.
-   */
-  FIRIMPLStorageTaskStatusPause,
-
-  /**
-   * Task has completed successfully.
-   */
-  FIRIMPLStorageTaskStatusSuccess,
-
-  /**
-   * Task has failed and is unrecoverable.
-   */
-  FIRIMPLStorageTaskStatusFailure
-};
-
-/**
- * Enum representing the errors raised by Firebase Storage.
- */
-typedef NS_ENUM(NSInteger, FIRIMPLStorageErrorCode) {
-  /** An unknown error occurred. */
-  FIRIMPLStorageErrorCodeUnknown = -13000,
-
-  /** No object exists at the desired reference. */
-  FIRIMPLStorageErrorCodeObjectNotFound = -13010,
-
-  /** No bucket is configured for Firebase Storage. */
-  FIRIMPLStorageErrorCodeBucketNotFound = -13011,
-
-  /** No project is configured for Firebase Storage. */
-  FIRIMPLStorageErrorCodeProjectNotFound = -13012,
-
-  /**
-   * Quota on your Firebase Storage bucket has been exceeded.
-   * If you're on the free tier, upgrade to a paid plan.
-   * If you're on a paid plan, reach out to Firebase support.
-   */
-  FIRIMPLStorageErrorCodeQuotaExceeded = -13013,
-
-  /** User is unauthenticated. Authenticate and try again. */
-  FIRIMPLStorageErrorCodeUnauthenticated = -13020,
-
-  /**
-   * User is not authorized to perform the desired action.
-   * Check your rules to ensure they are correct.
-   */
-  FIRIMPLStorageErrorCodeUnauthorized = -13021,
-
-  /**
-   * The maximum time limit on an operation (upload, download, delete, etc.) has been exceeded.
-   * Try uploading again.
-   */
-  FIRIMPLStorageErrorCodeRetryLimitExceeded = -13030,
-
-  /**
-   * File on the client does not match the checksum of the file received by the server.
-   * Try uploading again.
-   */
-  FIRIMPLStorageErrorCodeNonMatchingChecksum = -13031,
-
-  /**
-   * Size of the downloaded file exceeds the amount of memory allocated for the download.
-   * Increase memory cap and try downloading again.
-   */
-  FIRIMPLStorageErrorCodeDownloadSizeExceeded = -13032,
-
-  /** User cancelled the operation. */
-  FIRIMPLStorageErrorCodeCancelled = -13040,
-
-  /** An invalid argument was provided. */
-  FIRIMPLStorageErrorCodeInvalidArgument = -13050
-};
-
-/**
- * Represents the various types of metadata: Files or Folders.
- */
-typedef NS_ENUM(NSUInteger, FIRStorageMetadataType) {
-  FIRStorageMetadataTypeUnknown,
-  FIRStorageMetadataTypeFile,
-  FIRStorageMetadataTypeFolder,
-};
-
-NS_ASSUME_NONNULL_END

+ 0 - 82
FirebaseStorageInternal/Tests/Unit/FIRStorageTestHelpers.h

@@ -1,82 +0,0 @@
-/*
- * Copyright 2017 Google
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#import <Foundation/Foundation.h>
-#import <OCMock/OCMock.h>
-#import <XCTest/XCTest.h>
-
-#import "FirebaseCore/Extension/FirebaseCoreInternal.h"
-
-#import "FirebaseStorageInternal/Sources/Public/FirebaseStorageInternal/FIRStorageConstants.h"
-
-#import "FirebaseStorageInternal/Sources/FIRStorageConstants_Private.h"
-#import "FirebaseStorageInternal/Sources/FIRStorageErrors.h"
-
-#if SWIFT_PACKAGE
-@import GTMSessionFetcherCore;
-#else
-#import <GTMSessionFetcher/GTMSessionFetcher.h>
-#endif
-
-NS_ASSUME_NONNULL_BEGIN
-
-FOUNDATION_EXPORT NSString *const kGoogleHTTPErrorDomain;
-FOUNDATION_EXPORT NSString *const kHTTPVersion;
-FOUNDATION_EXPORT NSString *const kUnauthenticatedResponseString;
-FOUNDATION_EXPORT NSString *const kUnauthorizedResponseString;
-FOUNDATION_EXPORT NSString *const kNotFoundResponseString;
-FOUNDATION_EXPORT NSString *const kInvalidJSONResponseString;
-FOUNDATION_EXPORT NSString *const kFIRStorageValidURL;
-FOUNDATION_EXPORT NSString *const kFIRStorageNotFoundURL;
-FOUNDATION_EXPORT NSString *const kFIRStorageTestAuthToken;
-FOUNDATION_EXPORT NSString *const kFIRStorageAppName;
-
-/**
- * Standard timeout for all async tests.
- */
-static NSTimeInterval kExpectationTimeoutSeconds = 10;
-
-@interface FIRStorageTestHelpers : NSObject
-
-/**
- * Returns a mocked FIRApp with an injected container for interop and instance creation. No other
- * properties are set.
- */
-+ (FIRApp *)mockedApp;
-
-/**
- * Returns a valid URL for an object stored.
- */
-+ (NSURL *)objectURL;
-
-/**
- * Returns a valid URL for a bucket.
- */
-+ (NSURL *)bucketURL;
-
-/**
- * Returns a valid URL for an object not found in the current storage bucket.
- */
-+ (NSURL *)notFoundURL;
-
-/**
- * Waits for the given test case to time out by wrapping -waitForExpectation.
- */
-+ (void)waitForExpectation:(id)test;
-
-@end
-
-NS_ASSUME_NONNULL_END

+ 0 - 99
FirebaseStorageInternal/Tests/Unit/FIRStorageTestHelpers.m

@@ -1,99 +0,0 @@
-// Copyright 2017 Google
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#import "FirebaseStorageInternal/Tests/Unit/FIRStorageTestHelpers.h"
-
-#import "SharedTestUtilities/FIRComponentTestUtilities.h"
-
-NSString *const kGoogleHTTPErrorDomain = @"com.google.HTTPStatus";
-NSString *const kHTTPVersion = @"HTTP/1.1";
-NSString *const kUnauthenticatedResponseString =
-    @"<html><body><p>User not authenticated. Authentication via Authorization header required. "
-    @"Authorization Header does not match expected format of 'Authorization: Firebase "
-    @"<JWT>'.</p></body></html>";
-NSString *const kUnauthorizedResponseString =
-    @"<html><body><p>User not authorized. Authentication via Authorization header required. "
-    @"Authorization Header does not match expected format of 'Authorization: Firebase "
-    @"<JWT>'.</p></body></html>";
-NSString *const kNotFoundResponseString = @"<html><body><p>Object not found.</p></body></html>";
-NSString *const kInvalidJSONResponseString = @"This is not a JSON object";
-NSString *const kFIRStorageObjectURL =
-    @"https://firebasestorage.googleapis.com:443/v0/b/bucket/o/object";
-NSString *const kFIRStorageBucketURL = @"https://firebasestorage.googleapis.com:443/v0/b/bucket/o";
-NSString *const kFIRStorageNotFoundURL =
-    @"https://firebasestorage.googleapis.com:443/v0/b/bucket/o/i/dont/exist";
-NSString *const kFIRStorageTestAuthToken = @"1234-5678-9012-3456-7890";
-NSString *const kFIRStorageAppName = @"app";
-
-@implementation FIRStorageTestHelpers
-
-+ (FIRApp *)mockedApp {
-  id mockApp = OCMClassMock([FIRApp class]);
-  id mockOptions = OCMClassMock([FIROptions class]);
-  OCMStub([mockOptions storageBucket]).andReturn(@"bucket");
-  OCMStub([mockApp name]).andReturn(kFIRStorageAppName);
-  OCMStub([(FIRApp *)mockApp options]).andReturn(mockOptions);
-  return mockApp;
-}
-
-+ (NSURL *)objectURL {
-  return [NSURL URLWithString:kFIRStorageObjectURL];
-}
-
-+ (NSURL *)bucketURL {
-  return [NSURL URLWithString:kFIRStorageBucketURL];
-}
-
-+ (NSURL *)notFoundURL {
-  return [NSURL URLWithString:kFIRStorageNotFoundURL];
-}
-
-#pragma mark - Private methods
-
-+ (GTMSessionFetcherTestBlock)blockForData:(nullable NSData *)data
-                                       URL:(nullable NSString *)url
-                                statusCode:(NSInteger)code {
-  GTMSessionFetcherTestBlock block =
-      ^(GTMSessionFetcher *fetcher, GTMSessionFetcherTestResponse response) {
-        if (url) {
-          XCTAssertEqualObjects(url, [fetcher.request.URL absoluteString]);
-        }
-        NSHTTPURLResponse *httpResponse = [[NSHTTPURLResponse alloc] initWithURL:fetcher.request.URL
-                                                                      statusCode:code
-                                                                     HTTPVersion:kHTTPVersion
-                                                                    headerFields:nil];
-        NSError *error;
-        if (code >= 400) {
-          NSDictionary *userInfo;
-          if (data) {
-            userInfo = @{@"data" : data};
-          }
-          error = [NSError errorWithDomain:kGoogleHTTPErrorDomain code:code userInfo:userInfo];
-        }
-
-        response(httpResponse, data, error);
-      };
-  return block;
-}
-
-+ (void)waitForExpectation:(id)test {
-  [test waitForExpectationsWithTimeout:kExpectationTimeoutSeconds
-                               handler:^(NSError *_Nullable error) {
-                                 if (error) {
-                                   NSLog(@"Error: %@", error);
-                                 }
-                               }];
-}
-
-@end

+ 4 - 26
Package.swift

@@ -1078,30 +1078,6 @@ let package = Package(
 
     // MARK: - Firebase Storage
 
-    .target(
-      name: "FirebaseStorageInternal",
-      dependencies: [
-        "FirebaseCore",
-        .product(name: "GTMSessionFetcherCore", package: "GTMSessionFetcher"),
-      ],
-      path: "FirebaseStorageInternal/Sources",
-      publicHeadersPath: "Public",
-      cSettings: [
-        .headerSearchPath("../../"),
-      ],
-      linkerSettings: [
-        .linkedFramework("MobileCoreServices", .when(platforms: [.iOS])),
-        .linkedFramework("CoreServices", .when(platforms: [.macOS])),
-      ]
-    ),
-    .testTarget(
-      name: "StorageUnit",
-      dependencies: ["FirebaseStorageInternal", "OCMock", "SharedTestUtilities"],
-      path: "FirebaseStorageInternal/Tests/Unit",
-      cSettings: [
-        .headerSearchPath("../../.."),
-      ]
-    ),
     .target(
       name: "FirebaseStorage",
       dependencies: [
@@ -1123,12 +1099,14 @@ let package = Package(
       ]
     ),
     .testTarget(
-      name: "StorageObjcIntegration",
+      name: "StorageObjCIntegration",
       dependencies: ["FirebaseStorage"],
-      path: "FirebaseStorage/Tests/ObjcIntegration",
+      path: "FirebaseStorage/Tests/ObjCIntegration",
       exclude: [
         // See https://forums.swift.org/t/importing-swift-libraries-from-objective-c/56730
+        "FIRStorageIntegrationTests.m",
         "ObjCPPAPITests.mm",
+        "Credentials.h",
       ],
       cSettings: [
         .headerSearchPath("../../.."),

+ 1 - 1
README.md

@@ -195,7 +195,7 @@ integrating Performance with the dev test App.
 ### Firebase Storage
 
 To run the Storage Integration tests, follow the instructions in
-[FIRStorageIntegrationTests.m](FirebaseStorageInternal/Tests/Integration/FIRStorageIntegrationTests.m).
+[StorageIntegration.swift](FirebaseStorage/Tests/Integration/StorageIntegration.swift).
 
 #### Push Notifications
 

+ 0 - 1
ReleaseTooling/Sources/FirebaseManifest/FirebaseManifest.swift

@@ -54,7 +54,6 @@ public let shared = Manifest(
     Pod("FirebaseInAppMessagingSwift", isBeta: true, platforms: ["ios"], zip: true),
     Pod("FirebaseMessaging", zip: true),
     Pod("FirebasePerformance", platforms: ["ios", "tvos"], zip: true),
-    Pod("FirebaseStorageInternal"),
     Pod("FirebaseStorage", zip: true),
     Pod("FirebaseMLModelDownloader", isBeta: true, zip: true),
     Pod("Firebase", allowWarnings: true, zip: true),

+ 5 - 4
SymbolCollisionTest/Podfile

@@ -28,16 +28,17 @@ target 'SymbolCollisionTest' do
     pod 'FirebasePerformance', :path => '../'
     pod 'FirebaseRemoteConfig', :path => '../'
     pod 'FirebaseStorage', :path => '../'
-    pod 'FirebaseStorageInternal', :path => '../'
     pod 'GoogleUtilitiesComponents', :path => '../'
 
 #    pod 'FirebaseUI'. - requires use_frameworks!
 
     # Google Pods depending on a Firebase or GDT major version
-    pod 'GoogleMLKit'
+
+    # TODO(v10): Uncomment when MLKit updates to Firebase 10 and GTMSessionFetcher 2.x
+#    pod 'GoogleMLKit'
 
   # Other Google Pods
-#    pod 'ARCore' Conflicts with FirebasePerformance via Clearcut and google-cast-sdk
+    pod 'ARCore'
 #    pod 'Blockly'  `Blockly` does not specify a Swift version ...
     pod 'DigitsMigrationHelper'
     pod 'EarlGrey'
@@ -61,11 +62,11 @@ target 'SymbolCollisionTest' do
     pod 'GooglePlaces'
     pod 'GooglePlusUtilities'
     pod 'GoogleSignIn'
+    pod 'GTMAppAuth'
     pod 'GoogleSymbolUtilities'
     pod 'GoogleTagManager'
     pod 'GoogleToolboxForMac'
     pod 'GoogleUtilities'
-    pod 'GTMAppAuth'
 #    pod 'GTMHTTPFetcher' - conflicts with GTMSessionFetcher
     pod 'GTMSessionFetcher'
 #    pod 'GVRSDK' -- absl and protobuf duplicates

+ 2 - 2
scripts/build.sh

@@ -516,7 +516,7 @@ case "$product-$platform-$method" in
     # Add GoogleService-Info.plist to generated Test Wrapper App.
     ruby ./scripts/update_xcode_target.rb gen/FirebaseStorage/Pods/Pods.xcodeproj \
       AppHost-FirebaseStorage-Unit-Tests \
-      ../../../FirebaseStorageInternal/Tests/Integration/Resources/GoogleService-Info.plist
+      ../../../FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist
 
     if check_secrets; then
       # Integration tests are only run on iOS to minimize flake failures.
@@ -547,7 +547,7 @@ case "$product-$platform-$method" in
     # Add GoogleService-Info.plist to generated Test Wrapper App.
     ruby ./scripts/update_xcode_target.rb gen/FirebaseCombineSwift/Pods/Pods.xcodeproj \
       AppHost-FirebaseCombineSwift-Unit-Tests \
-      ../../../FirebaseStorageInternal/Tests/Integration/Resources/GoogleService-Info.plist
+      ../../../FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist
 
     if check_secrets; then
       # Integration tests are only run on iOS to minimize flake failures.

+ 1 - 1
scripts/change_headers.swift

@@ -32,7 +32,7 @@ let changeImports = ["GoogleUtilities", "FirebaseAuth", "FirebaseCore", "Firebas
 
 // Skip these directories. Imports should only be repo-relative in libraries
 // and unit tests.
-let skipDirPatterns = ["/Sample/", "/Pods/", "FirebaseStorageInternal/Tests/Integration",
+let skipDirPatterns = ["/Sample/", "/Pods/",
                        "FirebaseInAppMessaging/Tests/Integration/",
                        ".build/"]
 

+ 1 - 1
scripts/check_imports.swift

@@ -24,7 +24,7 @@ import Foundation
 
 // Skip these directories. Imports should only be repo-relative in libraries
 // and unit tests.
-let skipDirPatterns = ["/Sample/", "/Pods/", "FirebaseStorageInternal/Tests/Integration",
+let skipDirPatterns = ["/Sample/", "/Pods/",
                        "FirebaseDynamicLinks/Tests/Integration",
                        "FirebaseInAppMessaging/Tests/Integration/",
                        "SymbolCollisionTest/", "/gen/",

+ 1 - 1
scripts/health_metrics/file_patterns.json

@@ -187,7 +187,7 @@
   },
   {
     "sdk": "storage",
-    "podspecs": ["FirebaseStorage.podspec", "FirebaseStorageInternal.podspec"],
+    "podspecs": ["FirebaseStorage.podspec"],
     "filePatterns": [
       "^FirebaseStorage.*",
       "FirebaseAuth/Interop/[^/]+\\.h",

+ 1 - 1
scripts/localize_podfile.swift

@@ -38,7 +38,7 @@ let implicitPods = [
   "FirebaseCoreDiagnostics", "FirebaseRemoteConfig",
   "FirebaseCoreExtension", "FirebaseAppCheckInterop",
   "FirebaseAuthInterop", "FirebaseMessagingInterop",
-  "FirebaseStorageInternal", "FirebaseCoreInternal",
+  "FirebaseCoreInternal",
   "FirebaseSharedSwift",
 ]
 

+ 0 - 77
scripts/spm_test_schemes/StorageUnit.xcscheme

@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Scheme
-   LastUpgradeVersion = "1320"
-   version = "1.3">
-   <BuildAction
-      parallelizeBuildables = "YES"
-      buildImplicitDependencies = "YES">
-      <BuildActionEntries>
-         <BuildActionEntry
-            buildForTesting = "YES"
-            buildForRunning = "YES"
-            buildForProfiling = "NO"
-            buildForArchiving = "NO"
-            buildForAnalyzing = "NO">
-            <BuildableReference
-               BuildableIdentifier = "primary"
-               BlueprintIdentifier = "StorageUnit"
-               BuildableName = "StorageUnit"
-               BlueprintName = "StorageUnit"
-               ReferencedContainer = "container:">
-            </BuildableReference>
-         </BuildActionEntry>
-      </BuildActionEntries>
-   </BuildAction>
-   <TestAction
-      buildConfiguration = "Debug"
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      shouldUseLaunchSchemeArgsEnv = "YES">
-      <Testables>
-         <TestableReference
-            skipped = "NO">
-            <BuildableReference
-               BuildableIdentifier = "primary"
-               BlueprintIdentifier = "StorageUnit"
-               BuildableName = "StorageUnit"
-               BlueprintName = "StorageUnit"
-               ReferencedContainer = "container:">
-            </BuildableReference>
-         </TestableReference>
-      </Testables>
-   </TestAction>
-   <LaunchAction
-      buildConfiguration = "Debug"
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      launchStyle = "0"
-      useCustomWorkingDirectory = "NO"
-      ignoresPersistentStateOnLaunch = "NO"
-      debugDocumentVersioning = "YES"
-      debugServiceExtension = "internal"
-      allowLocationSimulation = "YES">
-   </LaunchAction>
-   <ProfileAction
-      buildConfiguration = "Release"
-      shouldUseLaunchSchemeArgsEnv = "YES"
-      savedToolIdentifier = ""
-      useCustomWorkingDirectory = "NO"
-      debugDocumentVersioning = "YES">
-      <MacroExpansion>
-         <BuildableReference
-            BuildableIdentifier = "primary"
-            BlueprintIdentifier = "StorageUnit"
-            BuildableName = "StorageUnit"
-            BlueprintName = "StorageUnit"
-            ReferencedContainer = "container:">
-         </BuildableReference>
-      </MacroExpansion>
-   </ProfileAction>
-   <AnalyzeAction
-      buildConfiguration = "Debug">
-   </AnalyzeAction>
-   <ArchiveAction
-      buildConfiguration = "Release"
-      revealArchiveInOrganizer = "YES">
-   </ArchiveAction>
-</Scheme>