Skip to content

Commit eb5272c

Browse files
committed
Merge remote-tracking branch 'origin/master' into snappy2
2 parents 0ed860a + caac2ce commit eb5272c

File tree

14 files changed

+96
-105
lines changed

14 files changed

+96
-105
lines changed

.github/workflows/functions.yml

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -82,36 +82,34 @@ jobs:
8282
- name: Unit Tests
8383
run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFunctionsUnit ${{ matrix.target }} spm
8484

85-
# TODO: Restore Quickstart when ported for Firebase 9.
86-
# quickstart:
87-
# # Don't run on private repo unless it is a PR.
88-
# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
89-
# env:
90-
# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
91-
# signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
92-
# LEGACY: true
93-
# runs-on: macos-11
85+
quickstart:
86+
# Don't run on private repo unless it is a PR.
87+
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
88+
env:
89+
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
90+
signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
91+
LEGACY: true
92+
runs-on: macos-11
9493

95-
# steps:
96-
# - uses: actions/checkout@v2
97-
# - name: Setup quickstart
98-
# run: scripts/setup_quickstart.sh functions
99-
# - name: install secret googleservice-info.plist
100-
# run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-functions.plist.gpg \
101-
# quickstart-ios/functions/GoogleService-Info.plist "$plist_secret"
102-
# - name: Setup custom URL scheme
103-
# run: sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-6p6ebi8amuklcjrto20gvpe295smm8u6/' quickstart-ios/functions/LegacyFunctionsQuickstart/FunctionsExample/Info.plist
104-
# - name: Test objc quickstart
105-
# run: ([ -z $plist_secret ] ||
106-
# scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true)
107-
# - name: Test swift quickstart
108-
# run: ([ -z $plist_secret ] ||
109-
# scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true swift)
94+
steps:
95+
- uses: actions/checkout@v2
96+
- name: Setup quickstart
97+
run: scripts/setup_quickstart.sh functions
98+
- name: install secret googleservice-info.plist
99+
run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-functions.plist.gpg \
100+
quickstart-ios/functions/GoogleService-Info.plist "$plist_secret"
101+
- name: Setup custom URL scheme
102+
run: sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-6p6ebi8amuklcjrto20gvpe295smm8u6/' quickstart-ios/functions/LegacyFunctionsQuickstart/FunctionsExample/Info.plist
103+
- name: Test objc quickstart
104+
run: ([ -z $plist_secret ] ||
105+
scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true)
106+
- name: Test swift quickstart
107+
run: ([ -z $plist_secret ] ||
108+
scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true swift)
110109

111110
functions-cron-only:
112111
# Don't run on private repo.
113-
# TODO: Uncomment below
114-
# if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
112+
if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
115113

116114
runs-on: macos-11
117115
strategy:

.github/workflows/storage.yml

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -91,26 +91,25 @@ jobs:
9191
- name: Setup project and Build for Catalyst
9292
run: scripts/test_catalyst.sh FirebaseStorageInternal test FirebaseStorageInternal-Unit-unit
9393

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

115114
pod-lib-lint:
116115
# Don't run on private repo unless it is a PR.
@@ -130,7 +129,7 @@ jobs:
130129
131130
storage-cron-only:
132131
# Don't run on private repo.
133-
# if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
132+
if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
134133
runs-on: macos-11
135134
strategy:
136135
matrix:

.github/workflows/zip.yml

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -25,31 +25,30 @@ concurrency:
2525
cancel-in-progress: true
2626

2727
jobs:
28-
# TODO: Reenable package-release once v9 merges to master.
29-
# package-release:
30-
# # Don't run on private repo.
31-
# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
32-
# runs-on: macos-11
33-
# steps:
34-
# - uses: actions/checkout@v2
35-
# - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
36-
# with:
37-
# cache_key: ${{ matrix.os }}
38-
# - name: Xcode 13.2.1
39-
# run: sudo xcode-select -s /Applications/Xcode_13.2.1.app/Contents/Developer
40-
# - name: Setup Bundler
41-
# run: ./scripts/setup_bundler.sh
42-
# - name: ZipBuildingTest
43-
# run: |
44-
# mkdir -p release_zip_dir
45-
# sh -x scripts/build_zip.sh release_zip_dir \
46-
# "${{ github.event.inputs.custom_spec_repos || 'https://github.com/firebase/SpecsStaging.git' }}"
47-
# - uses: actions/upload-artifact@v1
48-
# with:
49-
# name: Firebase-release-zip-zip
50-
# # Zip the entire output directory since the builder adds subdirectories we don't know the
51-
# # name of.
52-
# path: release_zip_dir
28+
package-release:
29+
# Don't run on private repo.
30+
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
31+
runs-on: macos-11
32+
steps:
33+
- uses: actions/checkout@v2
34+
- uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
35+
with:
36+
cache_key: ${{ matrix.os }}
37+
- name: Xcode 13.2.1
38+
run: sudo xcode-select -s /Applications/Xcode_13.2.1.app/Contents/Developer
39+
- name: Setup Bundler
40+
run: ./scripts/setup_bundler.sh
41+
- name: ZipBuildingTest
42+
run: |
43+
mkdir -p release_zip_dir
44+
sh -x scripts/build_zip.sh release_zip_dir \
45+
"${{ github.event.inputs.custom_spec_repos || 'https://github.com/firebase/SpecsStaging.git' }}"
46+
- uses: actions/upload-artifact@v1
47+
with:
48+
name: Firebase-release-zip-zip
49+
# Zip the entire output directory since the builder adds subdirectories we don't know the
50+
# name of.
51+
path: release_zip_dir
5352

5453
build:
5554
# Don't run on private repo unless it is a PR.

Crashlytics/Protogen/nanopb/crashlytics.nanopb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const pb_field_t google_crashlytics_FilesPayload_File_fields[3] = {
5454
#if !defined(PB_FIELD_32BIT)
5555
/* If you get an error here, it means that you need to define PB_FIELD_32BIT
5656
* compile-time option. You can do that in pb.h or on compiler command line.
57-
*
57+
*
5858
* The reason you need to do this is that some of your messages contain tag
5959
* numbers or field sizes that are larger than what can fit in 8 or 16 bit
6060
* field descriptors.
@@ -65,7 +65,7 @@ PB_STATIC_ASSERT((pb_membersize(google_crashlytics_Report, apple_payload) < 6553
6565
#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
6666
/* If you get an error here, it means that you need to define PB_FIELD_16BIT
6767
* compile-time option. You can do that in pb.h or on compiler command line.
68-
*
68+
*
6969
* The reason you need to do this is that some of your messages contain tag
7070
* numbers or field sizes that are larger than what can fit in the default
7171
* 8 bit descriptors.

FirebaseCore/Extension/FIRAppInternal.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
* The internal interface to `FirebaseApp`. This is meant for first-party integrators, who need to
2525
* receive `FirebaseApp` notifications, log info about the success or failure of their
2626
* configuration, and access other internal functionality of `FirebaseApp`.
27-
*
28-
* TODO(b/28296561): Restructure this header.
2927
*/
3028
NS_ASSUME_NONNULL_BEGIN
3129

FirebaseDatabase/Sources/Api/FIRDatabase.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ + (FIRDatabase *)databaseForApp:(FIRApp *)app URL:(NSString *)url {
9797
}
9898

9999
+ (NSString *)buildVersion {
100-
// TODO: Restore git hash when build moves back to git
101100
return [NSString stringWithFormat:@"%@_%s", FIRFirebaseVersion(), __DATE__];
102101
}
103102

FirebaseDynamicLinks/Sources/FIRDynamicLinks.m

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -557,9 +557,6 @@ - (void)handlePendingDynamicLinkRetrievalFailureWithErrorCode:(NSInteger)errorCo
557557
errorDescription:(NSString *)errorDescription
558558
underlyingError:(nullable NSError *)underlyingError {
559559
self.retrievingPendingDynamicLink = NO;
560-
561-
// TODO (b/38035270) inform caller why we failed, for App developer it is hard to debug
562-
// stuff like this without having source code access
563560
}
564561

565562
#pragma mark - FIRDLRetrievalProcessDelegate
@@ -585,7 +582,6 @@ - (void)retrievalProcess:(id<FIRDLRetrievalProcessProtocol>)retrievalProcess
585582

586583
static NSString *kSelfDiagnoseOutputHeader =
587584
@"---- Firebase Dynamic Links diagnostic output start ----\n";
588-
// TODO (b/38397557) Add link to the "Debug FDL" documentation when docs is published
589585
static NSString *kSelfDiagnoseOutputFooter =
590586
@"---- Firebase Dynamic Links diagnostic output end ----\n";
591587

Firestore/Swift/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
# v8.13.0
66
- [added] Added support for explicit typing to `DocumentReference.getDocument(as:)`
77
and `DocumentSnapshot.data(as:)` to simplify mapping documents (#9101).
8+
- [changed] `DocumentSnapshot.data(as:)` will decode the document to the type
9+
provided. If you expect that a document might *not exist*, use an optional
10+
type (e.g. `Book?.self`) to account for this. See
11+
[the documentation](https://firebase.google.com/docs/firestore/query-data/get-data#custom_objects)
12+
and this [blog post](https://peterfriese.dev/posts/firestore-codable-the-comprehensive-guide/#mapping-simple-types-using-codable)
13+
for an in-depth discussion.
814

915
# 8.12.1
1016
- [added] Added async wrapper for `CollectionReference.addDocument()` and

SwiftDashboard.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ tasks for additional Swift improvements.
1010
| | An | ApC | ApD | Aut | Cor | Crs | DB | DL | Fst | Fn | IAM | Ins | Msg | MLM | Prf | RC | Str |
1111
| :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
1212
| **Swift Library** ||||| n/a |||||||||||||
13-
| **API Tests** ||||||| 3 || 2 || 2 ||| 2 ||||
14-
| **async/await** ||||||| 3 |||||||||||
15-
| **Swift Errors** |||| 4 ||||||||||||| 5 |
13+
| **Single Module** ||||||||||||||||||
14+
| **API Tests** ||||||||| 2 || 2 ||| 2 ||||
15+
| **async/await** ||||||||||||||||||
16+
| **Swift Errors** |||| 4 || 7 ||||||||||| 5 |
1617
| **Codable** | n/a | n/a | n/a | n/a | n/a | n/a || n/a ||| n/a | n/a | n/a | n/a | n/a || n/a |
1718
| **SwiftUI Lifecycle** || n/a | n/a || n/a | n/a | n/a || n/a | n/a | n/a | n/a || n/a || n/a | n/a |
1819
| **SwiftUI Interop** || n/a ||| n/a ||| n/a || n/a || n/a | n/a | n/a || n/a | n/a |
@@ -26,13 +27,14 @@ tasks for additional Swift improvements.
2627

2728
## Notes
2829
2. Tests exist. Coverage to be confirmed.
29-
3. Mostly done. Need to review open questions in the RTDB tab [here](https://docs.google.com/spreadsheets/d/1HS4iJBtTHA9E01VrcsiVn_GVOa7KOCcn5LNw3sWlGoU/edit#gid=75586175).
30-
4. Feature Request at [#7723](https://github.com/firebase/firebase-ios-sdk/pull/7723) and PR at [#9000](https://github.com/firebase/firebase-ios-sdk/pull/9000)
31-
5. Started at [#9007](https://github.com/firebase/firebase-ios-sdk/pull/9007) and continued with breaking changes in https://github.com/firebase/firebase-ios-sdk/tree/storage-v9.
30+
4. `NS_ERROR_ENUM` used but a larger audit is still needed for more localized errors.
31+
5. Still needs to unify Objective C and Swift errors.
3232
6. One property wrapper added in [#8614](https://github.com/firebase/firebase-ios-sdk/pull/8614). More to go.
33+
7. `record(Error)` API should be expanded to collect Swift Errors as well as NSErrors.
3334

3435
## Rows (Swift Capabilities)
35-
* **Swift Library**: A Swift implemented extension library exists. It is deployed as Firebase{Product}Swift CocoaPod and as a Swift Package Manager product.
36+
* **Swift Library**: SDK includes public APIs written in Swift, either in the main product library or a Swift-specific extension.
37+
* **Single Module**: Public API surface in a single module.
3638
* **API Tests**: Tests exist for all Swift APIs. Integration tests are preferred, but compile-only tests are acceptable.
3739
* **async/await**:API tests include tests for all auto-generated async/await APIs. Implementations are added for
3840
asynchronous APIs that don't have auto-generated counterparts like

SymbolCollisionTest/Podfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ target 'SymbolCollisionTest' do
1515
pod 'FirebaseAuth', :path => '../'
1616
pod 'FirebaseCore', :path => '../'
1717
pod 'FirebaseCoreDiagnostics', :path => '../'
18+
pod 'FirebaseCoreExtension', :path => '../'
19+
pod 'FirebaseCoreInternal', :path => '../'
1820
pod 'FirebaseCrashlytics', :path => '../'
1921
pod 'FirebaseDatabase', :path => '../'
2022
pod 'FirebaseDynamicLinks', :path => '../'
@@ -26,6 +28,7 @@ target 'SymbolCollisionTest' do
2628
pod 'FirebasePerformance', :path => '../'
2729
pod 'FirebaseRemoteConfig', :path => '../'
2830
pod 'FirebaseStorage', :path => '../'
31+
pod 'FirebaseStorageInternal', :path => '../'
2932
pod 'GoogleUtilitiesComponents', :path => '../'
3033

3134
# pod 'FirebaseUI'. - requires use_frameworks!

scripts/check_imports.swift

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,9 @@ let skipDirPatterns = ["/Sample/", "/Pods/", "FirebaseStorageInternal/Tests/Inte
3838

3939
// The following are temporary skips pending working through a first pass of the repo:
4040
[
41-
"FirebaseAppDistribution",
42-
"FirebaseCore/Extension", // TODO(v9): work through adding this back.
43-
"Firebase/CoreDiagnostics",
41+
"Firebase/CoreDiagnostics/FIRCDLibrary/Protogen/nanopb",
4442
"FirebaseDatabase/Sources/third_party/Wrap-leveldb", // Pending SwiftPM for leveldb.
4543
"Example",
46-
"FirebaseInstallations/Source/Tests/Unit/",
4744
"Firestore",
4845
"GoogleUtilitiesComponents",
4946
"FirebasePerformance/ProtoSupport/",
@@ -77,13 +74,11 @@ private func checkFile(_ file: String, logger: ErrorLogger, inRepo repoURL: URL)
7774
// Not a source file, give up and return.
7875
return
7976
}
80-
let isPublic = file.range(of: "/Public/") != nil &&
81-
// TODO: Skip legacy GDTCCTLibrary file that isn't Public and should be moved.
82-
file.range(of: "GDTCCTLibrary/Public/GDTCOREvent+GDTCCTSupport.h") == nil
77+
let isPublic = file.range(of: "/Public/") != nil
8378
let isPrivate = file.range(of: "/Sources/Private/") != nil ||
8479
// Delete when FirebaseInstallations fixes directory structure.
8580
file.range(of: "Source/Library/Private/FirebaseInstallationsInternal.h") != nil ||
86-
file.range(of: "GDTCORLibrary/Internal/GoogleDataTransportInternal.h") != nil
81+
file.range(of: "FirebaseCore/Extension") != nil
8782

8883
// Treat all files with names finishing on "Test" or "Tests" as files with tests.
8984
let isTestFile = file.contains("Test.m") || file.contains("Tests.m") ||

scripts/check_whitespace.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,18 @@ options=(
2525
' $'
2626
)
2727

28-
# TODO(https://github.com/nanopb/nanopb/pull/622) remove Protogen exceptions
29-
# likely in a nanopb release after 0.3.9.7.
30-
3128
git grep "${options[@]}" -- \
3229
':(exclude)cmake/external/snappy.patch' \
33-
':(exclude)Crashlytics/Protogen/nanopb' \
3430
':(exclude)Crashlytics/ProtoSupport' \
3531
':(exclude)Crashlytics/UnitTests/Data' \
36-
':(exclude)Firebase/CoreDiagnostics/FIRCDLibrary/Protogen/nanopb' \
3732
':(exclude)Firebase/CoreDiagnostics/ProtoSupport' \
3833
':(exclude)CoreOnly/NOTICES' \
3934
':(exclude)Firebase/Firebase/NOTICES' \
4035
':(exclude)Firebase/InAppMessaging/ProtoSupport' \
41-
':(exclude)Firebase/InAppMessaging/Analytics/Protogen/nanopb' \
4236
':(exclude)Firestore/Protos/nanopb' \
4337
':(exclude)Firestore/Protos/cpp' \
4438
':(exclude)Firestore/Protos/objc' \
4539
':(exclude)Firestore/third_party/abseil-cpp' \
46-
':(exclude)GoogleDataTransport/GDTCCTLibrary/Protogen/nanopb' \
4740
':(exclude)GoogleDataTransport/ProtoSupport' \
4841
':(exclude)ReleaseTooling/Template/NOTICES'
4942

scripts/setup_quickstart.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ if check_secrets || [[ ${SAMPLE} == "installations" ]]; then
4747
# development pod install. This is needed for the `pod install` command.
4848
export FIREBASE_POD_REPO_FOR_DEV_POD=`pwd`
4949

50-
git clone https://github.com/firebase/quickstart-ios.git
50+
#TODO: Delete the branch option after the 9.0 release.
51+
git clone --branch v9 https://github.com/firebase/quickstart-ios.git
52+
5153
$scripts_dir/localize_podfile.swift "$WORKSPACE_DIR"/Podfile "$RELEASE_TESTING"
5254
if [ "$RELEASE_TESTING" == "nightly_release_testing" ]; then
5355
set +x

scripts/setup_quickstart_framework.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ set -ex
1616

1717
REPO=`pwd`
1818
if [ ! -d "quickstart-ios" ]; then
19-
git clone https://github.com/firebase/quickstart-ios.git
19+
#TODO: Delete the branch option after the 9.0 release.
20+
git clone --branch v9 https://github.com/firebase/quickstart-ios.git
2021
fi
2122
QS_SCRIPTS="${REPO}"/quickstart-ios/scripts
2223
cd quickstart-ios/"${SAMPLE}"

0 commit comments

Comments
 (0)