Skip to content

Commit 237f17d

Browse files
authored
Make all Storage APIs available via Swift (#9443)
1 parent 15b0286 commit 237f17d

File tree

91 files changed

+2681
-1205
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+2681
-1205
lines changed

.github/workflows/storage.yml

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -85,40 +85,41 @@ jobs:
8585
- name: Setup project and Build for Catalyst
8686
run: scripts/test_catalyst.sh FirebaseStorageObjC test FirebaseStorageObjC-Unit-unit
8787

88-
quickstart:
89-
# Don't run on private repo unless it is a PR.
90-
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
91-
env:
92-
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
93-
signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
94-
runs-on: macos-11
95-
steps:
96-
- uses: actions/checkout@v2
97-
- name: Setup quickstart
98-
run: scripts/setup_quickstart.sh storage
99-
- name: Install Secret GoogleService-Info.plist
100-
run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \
101-
quickstart-ios/storage/GoogleService-Info.plist "$plist_secret"
102-
- name: Test objc quickstart
103-
run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Storage true)
104-
- name: Test swift quickstart
105-
run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Storage true swift)
88+
# TODO: Restore Quickstart when ported for Firebase 9.
89+
# quickstart:
90+
# # Don't run on private repo unless it is a PR.
91+
# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
92+
# env:
93+
# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
94+
# signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
95+
# runs-on: macos-11
96+
# steps:
97+
# - uses: actions/checkout@v2
98+
# - name: Setup quickstart
99+
# run: scripts/setup_quickstart.sh storage
100+
# - name: Install Secret GoogleService-Info.plist
101+
# run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \
102+
# quickstart-ios/storage/GoogleService-Info.plist "$plist_secret"
103+
# - name: Test objc quickstart
104+
# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Storage true)
105+
# - name: Test swift quickstart
106+
# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Storage true swift)
106107

107108
pod-lib-lint:
108109
# Don't run on private repo unless it is a PR.
109110
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
110111
runs-on: macos-11
111-
112112
strategy:
113113
matrix:
114114
target: [ios, tvos, macos, watchos]
115+
podspec: [Storage, StorageObjC]
115116
steps:
116117
- uses: actions/checkout@v2
117118
- name: Setup Bundler
118119
run: scripts/setup_bundler.sh
119120
- name: Build and test
120121
run: |
121-
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec --test-specs=unit --platforms=${{ matrix.target }}
122+
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb Firebase${{ matrix.podspec }}.podspec --test-specs=unit --platforms=${{ matrix.target }}
122123
123124
storage-cron-only:
124125
# Don't run on private repo.

CocoapodsIntegrationTest/TestEnvironments/Cocoapods_multiprojects_frameworks/Podfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ target 'CocoapodsIntegrationTest' do
2727
pod 'FirebaseMessagingInterop', :path => '../'
2828
pod 'FirebasePerformance', :path => '../'
2929
pod 'FirebaseStorage', :path => '../'
30+
pod 'FirebaseStorageObjC', :path => '../'
3031
end
3132

3233
# Using the new speed-enhancing features available with CocoaPods 1.7+

Example/watchOSSample/Podfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@ target 'SampleWatchAppWatchKitExtension' do
88
platform :watchos, '7.0'
99

1010
pod 'FirebaseCore', :path => '../../'
11+
pod 'FirebaseCoreInternal', :path => '../../'
1112
pod 'FirebaseMessaging', :path => '../../'
1213
pod 'FirebaseCoreDiagnostics', :path => '../../'
1314
pod 'FirebaseInstallations', :path => '../../'
1415
pod 'FirebaseStorage', :path => '../../'
1516
pod 'FirebaseRemoteConfig', :path => '../../'
1617
pod 'FirebaseABTesting', :path => '../../'
1718
pod 'FirebaseDatabase', :path => '../../'
19+
pod 'FirebaseAppCheckInterop', :path => '../../'
20+
pod 'FirebaseAuthInterop', :path => '../../'
1821

1922
pod 'Firebase/Messaging', :path => '../../'
2023
pod 'Firebase/Storage', :path => '../../'

FirebaseAppCheckInterop.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'FirebaseAppCheckInterop'
3-
s.version = '8.12.0'
3+
s.version = '8.13.0'
44
s.summary = 'Interfaces that allow other Firebase SDKs to use AppCheck functionality.'
55

66
s.description = <<-DESC

FirebaseAuthInterop.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'FirebaseAuthInterop'
3-
s.version = '8.12.0'
3+
s.version = '8.13.0'
44
s.summary = 'Interfaces that allow other Firebase SDKs to use Auth functionality.'
55

66
s.description = <<-DESC

FirebaseCombineSwift/Tests/Unit/FirebaseApp+Tests.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ extension FirebaseApp {
3939

4040
static func appForStorageUnitTestsWithName(name: String) -> FirebaseApp {
4141
let app = FirebaseApp(instanceWithName: name, options: appOptions())
42-
let registrants = NSMutableSet(object: FIRStorageComponent.self)
43-
app.container = FirebaseComponentContainer(app: app, registrants: registrants)
4442
return app
4543
}
4644
}

FirebaseCombineSwift/Tests/Unit/FirebaseCombine-unit-Bridging-Header.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
#import "SharedTestUtilities/FIRComponentTestUtilities.h"
1616
#import "SharedTestUtilities/FIROptionsMock.h"
1717

18-
// Firebase Storage
19-
#import "FirebaseStorage/Sources/FIRStorageComponent.h"
20-
2118
// Firebase Core
2219
#import "FirebaseCore/Internal/FirebaseCoreInternal.h"
2320

FirebaseCore/Sources/FIRApp.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,10 @@ + (void)registerSwiftComponents {
836836
SEL componentsToRegisterSEL = @selector(componentsToRegister);
837837
// Dictionary of class names that conform to `FIRLibrary` and their user agents. These should only
838838
// be SDKs that are written in Swift but still visible to ObjC.
839-
NSDictionary<NSString *, NSString *> *swiftLibs = @{@"FIRFunctionsComponent" : @"fire-fun"};
839+
NSDictionary<NSString *, NSString *> *swiftLibs = @{
840+
@"FIRFunctionsComponent" : @"fire-fun",
841+
@"FIRStorageComponent" : @"fire-str",
842+
};
840843
for (NSString *className in swiftLibs.allKeys) {
841844
Class klass = NSClassFromString(className);
842845
if (klass && [klass respondsToSelector:componentsToRegisterSEL]) {

FirebaseCoreInternal.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'FirebaseCoreInternal'
3-
s.version = '8.12.0'
3+
s.version = '8.13.0'
44
s.summary = 'APIs only for Firebase internal usage'
55

66
s.description = <<-DESC

FirebaseMessagingInterop.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'FirebaseMessagingInterop'
3-
s.version = '8.12.0'
3+
s.version = '8.13.0'
44
s.summary = 'Interfaces that allow other Firebase SDKs to use Messaging functionality.'
55

66
s.description = <<-DESC

0 commit comments

Comments
 (0)