Skip to content

Commit 8b1efab

Browse files
var-constwilhuff
authored andcommitted
gRPC: replace Objective-C implementation with the new C++ implementation (#2068)
* Revert "Revert "gRPC: replace Objective-C implementation with the new C++ implementation (#1968)" (#2030)" This reverts commit ea567dc. * gRPC: fix bugs found during testing (#2039) All in `GrpcStream`: * make sure there are no pending completions when "finish" operation is enqueued; * always finish gRPC calls; * when connectivity changes, reset not just the calls, but the underlying channel as well. * Revert "Partially revert "Update CHANGELOG for Firestore v0.14.0 (#2025)" (#2031)" This reverts commit b2437b8. * Update changelog for v0.15.0. * gRPC: add gRPC wrapper classes to CMake build (#2015) * add a C++ equivalent of `FIRFirestoreVersionString`. This eliminates the only Objective-C dependency of `grpc_connection.mm` and allows making it a pure C++ file; * open-source `binary_to_array.py` script and use it in the build to embed `roots.pem` certificate file from gRPC into the Firestore binary. The embedded char array is then used to load certificate at runtime. * Revert local change -- do not enable sanitizers by default
1 parent 12bdfc8 commit 8b1efab

Some content is hidden

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

61 files changed

+5644
-3295
lines changed

CMakeLists.txt

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ set(
5959
CACHE PATH "Where to store downloaded files"
6060
)
6161

62+
set(
63+
FIREBASE_EXTERNAL_SOURCE_DIR
64+
${FIREBASE_BINARY_DIR}/external/src
65+
CACHE PATH "Root directory of source code of the external dependencies"
66+
)
67+
6268
download_external_sources()
6369

6470

@@ -103,8 +109,6 @@ set(gRPC_BUILD_TESTS OFF CACHE BOOL "Disable gRPC tests")
103109
add_external_subdirectory(grpc)
104110

105111
# Fix up targets included by gRPC's build
106-
set(external_src_dir ${FIREBASE_BINARY_DIR}/external/src)
107-
108112
if(OPENSSL_FOUND)
109113
# gRPC's CMakeLists.txt does not account for finding OpenSSL in a directory
110114
# that's not in the default search path.
@@ -127,14 +131,14 @@ else()
127131
target_include_directories(
128132
crypto
129133
INTERFACE
130-
$<BUILD_INTERFACE:${external_src_dir}/grpc/third_party/boringssl/include>
134+
$<BUILD_INTERFACE:${FIREBASE_EXTERNAL_SOURCE_DIR}/grpc/third_party/boringssl/include>
131135
)
132136

133137
add_alias(OpenSSL::SSL ssl)
134138
target_include_directories(
135139
ssl
136140
INTERFACE
137-
$<BUILD_INTERFACE:${external_src_dir}/grpc/third_party/boringssl/include>
141+
$<BUILD_INTERFACE:${FIREBASE_EXTERNAL_SOURCE_DIR}/grpc/third_party/boringssl/include>
138142
)
139143
endif()
140144

@@ -156,7 +160,7 @@ endif()
156160
if(NOT ZLIB_FOUND)
157161
target_include_directories(
158162
zlibstatic
159-
INTERFACE $<BUILD_INTERFACE:${external_src_dir}/grpc/third_party/zlib>
163+
INTERFACE $<BUILD_INTERFACE:${FIREBASE_EXTERNAL_SOURCE_DIR}/grpc/third_party/zlib>
160164
)
161165
endif()
162166

@@ -186,7 +190,7 @@ target_compile_definitions(
186190

187191
target_include_directories(
188192
protobuf-nanopb
189-
INTERFACE $<BUILD_INTERFACE:${external_src_dir}/nanopb>
193+
INTERFACE $<BUILD_INTERFACE:${FIREBASE_EXTERNAL_SOURCE_DIR}/nanopb>
190194
)
191195

192196

FirebaseFirestore.podspec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,20 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling,
4040

4141
# Exclude alternate implementations for other platforms
4242
'Firestore/core/src/firebase/firestore/remote/connectivity_monitor_noop.cc',
43+
'Firestore/core/src/firebase/firestore/remote/grpc_root_certificate_finder_generated.cc',
4344
'Firestore/core/src/firebase/firestore/util/filesystem_win.cc',
4445
'Firestore/core/src/firebase/firestore/util/hard_assert_stdio.cc',
4546
'Firestore/core/src/firebase/firestore/util/log_stdio.cc',
4647
'Firestore/core/src/firebase/firestore/util/secure_random_openssl.cc'
4748
]
4849
s.public_header_files = 'Firestore/Source/Public/*.h'
4950

51+
# TODO(varconst): remove once https://github.com/grpc/grpc/pull/16962 makes it
52+
# into a release.
53+
s.resource_bundles = { 'gRPCCertificates' => ['Firestore/etc/roots.pem'] }
54+
5055
s.dependency 'FirebaseAuthInterop', '~> 1.0'
5156
s.dependency 'FirebaseCore', '~> 5.1'
52-
s.dependency 'gRPC-ProtoRPC', '~> 1.0'
5357
s.dependency 'gRPC-C++', '~> 0.0.3'
5458
s.dependency 'leveldb-library', '~> 1.20'
5559
s.dependency 'Protobuf', '~> 3.1'

Firestore/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
# Unreleased
22

3+
# v0.15.0
34
- [changed] Changed how the SDK handles locally-updated documents while syncing
45
those updates with Cloud Firestore servers. This can lead to slight behavior
56
changes and may affect the `SnapshotMetadata.hasPendingWrites` metadata flag.
67
- [changed] Eliminated superfluous update events for locally cached documents
78
that are known to lag behind the server version. Instead, the SDK buffers
89
these events until the client has caught up with the server.
10+
- [changed] Moved from Objective-C gRPC framework to gRPC C++. If you're
11+
manually tracking dependencies, the `gRPC`, `gRPC-ProtoRPC`, and
12+
`gRPC-RxLibrary` frameworks have been replaced with `gRPC-C++`. While we
13+
don't anticipate any issues, please [report any issues with network
14+
behavior](https://github.com/firebase/firebase-ios-sdk/issues/new) you
15+
experience. (#1968)
916

1017
# v0.14.0
1118
- [fixed] Fixed compilation in C99 and C++11 modes without GNU extensions.

Firestore/Example/Firestore.xcodeproj/project.pbxproj

Lines changed: 38 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@
8282
5492E07A202154D600B64F25 /* FIRTypeTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E071202154D600B64F25 /* FIRTypeTests.mm */; };
8383
5492E07F202154EC00B64F25 /* FSTTransactionTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E07B202154EB00B64F25 /* FSTTransactionTests.mm */; };
8484
5492E080202154EC00B64F25 /* FSTSmokeTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E07C202154EB00B64F25 /* FSTSmokeTests.mm */; };
85-
5492E081202154EC00B64F25 /* FSTStreamTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E07D202154EB00B64F25 /* FSTStreamTests.mm */; };
8685
5492E082202154EC00B64F25 /* FSTDatastoreTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E07E202154EC00B64F25 /* FSTDatastoreTests.mm */; };
8786
5492E09D2021552D00B64F25 /* FSTLocalStoreTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E0832021552A00B64F25 /* FSTLocalStoreTests.mm */; };
8887
5492E09F2021552D00B64F25 /* FSTLevelDBMigrationsTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E0862021552A00B64F25 /* FSTLevelDBMigrationsTests.mm */; };
@@ -363,7 +362,6 @@
363362
5492E071202154D600B64F25 /* FIRTypeTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FIRTypeTests.mm; sourceTree = "<group>"; };
364363
5492E07B202154EB00B64F25 /* FSTTransactionTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FSTTransactionTests.mm; sourceTree = "<group>"; };
365364
5492E07C202154EB00B64F25 /* FSTSmokeTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FSTSmokeTests.mm; sourceTree = "<group>"; };
366-
5492E07D202154EB00B64F25 /* FSTStreamTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FSTStreamTests.mm; sourceTree = "<group>"; };
367365
5492E07E202154EC00B64F25 /* FSTDatastoreTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FSTDatastoreTests.mm; sourceTree = "<group>"; };
368366
5492E0832021552A00B64F25 /* FSTLocalStoreTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FSTLocalStoreTests.mm; sourceTree = "<group>"; };
369367
5492E0852021552A00B64F25 /* FSTRemoteDocumentCacheTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSTRemoteDocumentCacheTests.h; sourceTree = "<group>"; };
@@ -1245,7 +1243,6 @@
12451243
DE03B3621F215E1600A30B9C /* CAcert.pem */,
12461244
5492E07E202154EC00B64F25 /* FSTDatastoreTests.mm */,
12471245
5492E07C202154EB00B64F25 /* FSTSmokeTests.mm */,
1248-
5492E07D202154EB00B64F25 /* FSTStreamTests.mm */,
12491246
5492E07B202154EB00B64F25 /* FSTTransactionTests.mm */,
12501247
);
12511248
path = Integration;
@@ -1281,6 +1278,7 @@
12811278
54C9EDEE2040E16300A969CD /* Frameworks */,
12821279
54C9EDEF2040E16300A969CD /* Resources */,
12831280
EA424838F4A5DD7B337F57AB /* [CP] Embed Pods Frameworks */,
1281+
DE5C36328822481F6EB6EF16 /* [CP] Copy Pods Resources */,
12841282
);
12851283
buildRules = (
12861284
);
@@ -1321,6 +1319,7 @@
13211319
6003F587195388D20070C39A /* Frameworks */,
13221320
6003F588195388D20070C39A /* Resources */,
13231321
1EE692C7509A98D7EB03CA51 /* [CP] Embed Pods Frameworks */,
1322+
1E7DAED3207D01F1744EA227 /* [CP] Copy Pods Resources */,
13241323
);
13251324
buildRules = (
13261325
);
@@ -1521,6 +1520,24 @@
15211520
/* End PBXResourcesBuildPhase section */
15221521

15231522
/* Begin PBXShellScriptBuildPhase section */
1523+
1E7DAED3207D01F1744EA227 /* [CP] Copy Pods Resources */ = {
1524+
isa = PBXShellScriptBuildPhase;
1525+
buildActionMask = 2147483647;
1526+
files = (
1527+
);
1528+
inputPaths = (
1529+
"${SRCROOT}/Pods/Target Support Files/Pods-Firestore_Example_iOS/Pods-Firestore_Example_iOS-resources.sh",
1530+
"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseFirestore/gRPCCertificates.bundle",
1531+
);
1532+
name = "[CP] Copy Pods Resources";
1533+
outputPaths = (
1534+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/gRPCCertificates.bundle",
1535+
);
1536+
runOnlyForDeploymentPostprocessing = 0;
1537+
shellPath = /bin/sh;
1538+
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Firestore_Example_iOS/Pods-Firestore_Example_iOS-resources.sh\"\n";
1539+
showEnvVarsInLog = 0;
1540+
};
15241541
1EE692C7509A98D7EB03CA51 /* [CP] Embed Pods Frameworks */ = {
15251542
isa = PBXShellScriptBuildPhase;
15261543
buildActionMask = 2147483647;
@@ -1532,11 +1549,8 @@
15321549
"${BUILT_PRODUCTS_DIR}/GTMSessionFetcher/GTMSessionFetcher.framework",
15331550
"${BUILT_PRODUCTS_DIR}/GoogleUtilities/GoogleUtilities.framework",
15341551
"${BUILT_PRODUCTS_DIR}/Protobuf-iOS8.0/Protobuf.framework",
1535-
"${BUILT_PRODUCTS_DIR}/gRPC/GRPCClient.framework",
15361552
"${BUILT_PRODUCTS_DIR}/gRPC-C++/grpcpp.framework",
15371553
"${BUILT_PRODUCTS_DIR}/gRPC-Core/grpc.framework",
1538-
"${BUILT_PRODUCTS_DIR}/gRPC-ProtoRPC/ProtoRPC.framework",
1539-
"${BUILT_PRODUCTS_DIR}/gRPC-RxLibrary/RxLibrary.framework",
15401554
"${BUILT_PRODUCTS_DIR}/leveldb-library/leveldb.framework",
15411555
"${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework",
15421556
);
@@ -1546,11 +1560,8 @@
15461560
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GTMSessionFetcher.framework",
15471561
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleUtilities.framework",
15481562
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Protobuf.framework",
1549-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GRPCClient.framework",
15501563
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/grpcpp.framework",
15511564
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/grpc.framework",
1552-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ProtoRPC.framework",
1553-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxLibrary.framework",
15541565
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/leveldb.framework",
15551566
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.framework",
15561567
);
@@ -1768,6 +1779,24 @@
17681779
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
17691780
showEnvVarsInLog = 0;
17701781
};
1782+
DE5C36328822481F6EB6EF16 /* [CP] Copy Pods Resources */ = {
1783+
isa = PBXShellScriptBuildPhase;
1784+
buildActionMask = 2147483647;
1785+
files = (
1786+
);
1787+
inputPaths = (
1788+
"${SRCROOT}/Pods/Target Support Files/Pods-Firestore_Example_iOS-Firestore_SwiftTests_iOS/Pods-Firestore_Example_iOS-Firestore_SwiftTests_iOS-resources.sh",
1789+
"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseFirestore/gRPCCertificates.bundle",
1790+
);
1791+
name = "[CP] Copy Pods Resources";
1792+
outputPaths = (
1793+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/gRPCCertificates.bundle",
1794+
);
1795+
runOnlyForDeploymentPostprocessing = 0;
1796+
shellPath = /bin/sh;
1797+
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Firestore_Example_iOS-Firestore_SwiftTests_iOS/Pods-Firestore_Example_iOS-Firestore_SwiftTests_iOS-resources.sh\"\n";
1798+
showEnvVarsInLog = 0;
1799+
};
17711800
EA424838F4A5DD7B337F57AB /* [CP] Embed Pods Frameworks */ = {
17721801
isa = PBXShellScriptBuildPhase;
17731802
buildActionMask = 2147483647;
@@ -1779,11 +1808,8 @@
17791808
"${BUILT_PRODUCTS_DIR}/GTMSessionFetcher/GTMSessionFetcher.framework",
17801809
"${BUILT_PRODUCTS_DIR}/GoogleUtilities/GoogleUtilities.framework",
17811810
"${BUILT_PRODUCTS_DIR}/Protobuf-iOS8.0/Protobuf.framework",
1782-
"${BUILT_PRODUCTS_DIR}/gRPC/GRPCClient.framework",
17831811
"${BUILT_PRODUCTS_DIR}/gRPC-C++/grpcpp.framework",
17841812
"${BUILT_PRODUCTS_DIR}/gRPC-Core/grpc.framework",
1785-
"${BUILT_PRODUCTS_DIR}/gRPC-ProtoRPC/ProtoRPC.framework",
1786-
"${BUILT_PRODUCTS_DIR}/gRPC-RxLibrary/RxLibrary.framework",
17871813
"${BUILT_PRODUCTS_DIR}/leveldb-library/leveldb.framework",
17881814
"${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework",
17891815
);
@@ -1793,11 +1819,8 @@
17931819
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GTMSessionFetcher.framework",
17941820
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleUtilities.framework",
17951821
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Protobuf.framework",
1796-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GRPCClient.framework",
17971822
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/grpcpp.framework",
17981823
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/grpc.framework",
1799-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ProtoRPC.framework",
1800-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxLibrary.framework",
18011824
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/leveldb.framework",
18021825
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.framework",
18031826
);
@@ -2018,7 +2041,6 @@
20182041
5492E0422021440500B64F25 /* FSTHelpers.mm in Sources */,
20192042
5491BC731FB44593008B3588 /* FSTIntegrationTestCase.mm in Sources */,
20202043
5492E080202154EC00B64F25 /* FSTSmokeTests.mm in Sources */,
2021-
5492E081202154EC00B64F25 /* FSTStreamTests.mm in Sources */,
20222044
5492E07F202154EC00B64F25 /* FSTTransactionTests.mm in Sources */,
20232045
5492E0442021457E00B64F25 /* XCTestCase+Await.mm in Sources */,
20242046
B67BF44A216EB43000CA9097 /* create_noop_connectivity_monitor.cc in Sources */,
@@ -2231,14 +2253,6 @@
22312253
"-iquote",
22322254
"\"${PODS_CONFIGURATION_BUILD_DIR}/Protobuf/Protobuf.framework/Headers\"",
22332255
"-iquote",
2234-
"\"${PODS_CONFIGURATION_BUILD_DIR}/gRPC-Core/grpc.framework/Headers\"",
2235-
"-iquote",
2236-
"\"${PODS_CONFIGURATION_BUILD_DIR}/gRPC-ProtoRPC/ProtoRPC.framework/Headers\"",
2237-
"-iquote",
2238-
"\"${PODS_CONFIGURATION_BUILD_DIR}/gRPC-RxLibrary/RxLibrary.framework/Headers\"",
2239-
"-iquote",
2240-
"\"${PODS_CONFIGURATION_BUILD_DIR}/gRPC/GRPCClient.framework/Headers\"",
2241-
"-iquote",
22422256
"\"${PODS_CONFIGURATION_BUILD_DIR}/leveldb-library/leveldb.framework/Headers\"",
22432257
"-iquote",
22442258
"\"${PODS_CONFIGURATION_BUILD_DIR}/nanopb/nanopb.framework/Headers\"",
@@ -2315,14 +2329,6 @@
23152329
"-iquote",
23162330
"\"${PODS_CONFIGURATION_BUILD_DIR}/Protobuf/Protobuf.framework/Headers\"",
23172331
"-iquote",
2318-
"\"${PODS_CONFIGURATION_BUILD_DIR}/gRPC-Core/grpc.framework/Headers\"",
2319-
"-iquote",
2320-
"\"${PODS_CONFIGURATION_BUILD_DIR}/gRPC-ProtoRPC/ProtoRPC.framework/Headers\"",
2321-
"-iquote",
2322-
"\"${PODS_CONFIGURATION_BUILD_DIR}/gRPC-RxLibrary/RxLibrary.framework/Headers\"",
2323-
"-iquote",
2324-
"\"${PODS_CONFIGURATION_BUILD_DIR}/gRPC/GRPCClient.framework/Headers\"",
2325-
"-iquote",
23262332
"\"${PODS_CONFIGURATION_BUILD_DIR}/leveldb-library/leveldb.framework/Headers\"",
23272333
"-iquote",
23282334
"\"${PODS_CONFIGURATION_BUILD_DIR}/nanopb/nanopb.framework/Headers\"",
@@ -2524,14 +2530,6 @@
25242530
"-iquote",
25252531
"\"${PODS_CONFIGURATION_BUILD_DIR}/Protobuf/Protobuf.framework/Headers\"",
25262532
"-iquote",
2527-
"\"${PODS_CONFIGURATION_BUILD_DIR}/gRPC-Core/grpc.framework/Headers\"",
2528-
"-iquote",
2529-
"\"${PODS_CONFIGURATION_BUILD_DIR}/gRPC-ProtoRPC/ProtoRPC.framework/Headers\"",
2530-
"-iquote",
2531-
"\"${PODS_CONFIGURATION_BUILD_DIR}/gRPC-RxLibrary/RxLibrary.framework/Headers\"",
2532-
"-iquote",
2533-
"\"${PODS_CONFIGURATION_BUILD_DIR}/gRPC/GRPCClient.framework/Headers\"",
2534-
"-iquote",
25352533
"\"${PODS_CONFIGURATION_BUILD_DIR}/leveldb-library/leveldb.framework/Headers\"",
25362534
"-iquote",
25372535
"\"${PODS_CONFIGURATION_BUILD_DIR}/nanopb/nanopb.framework/Headers\"",
@@ -2609,14 +2607,6 @@
26092607
"-iquote",
26102608
"\"${PODS_CONFIGURATION_BUILD_DIR}/Protobuf/Protobuf.framework/Headers\"",
26112609
"-iquote",
2612-
"\"${PODS_CONFIGURATION_BUILD_DIR}/gRPC-Core/grpc.framework/Headers\"",
2613-
"-iquote",
2614-
"\"${PODS_CONFIGURATION_BUILD_DIR}/gRPC-ProtoRPC/ProtoRPC.framework/Headers\"",
2615-
"-iquote",
2616-
"\"${PODS_CONFIGURATION_BUILD_DIR}/gRPC-RxLibrary/RxLibrary.framework/Headers\"",
2617-
"-iquote",
2618-
"\"${PODS_CONFIGURATION_BUILD_DIR}/gRPC/GRPCClient.framework/Headers\"",
2619-
"-iquote",
26202610
"\"${PODS_CONFIGURATION_BUILD_DIR}/leveldb-library/leveldb.framework/Headers\"",
26212611
"-iquote",
26222612
"\"${PODS_CONFIGURATION_BUILD_DIR}/nanopb/nanopb.framework/Headers\"",

Firestore/Example/Firestore.xcodeproj/xcshareddata/xcschemes/Firestore_Tests_iOS.xcscheme

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
enableASanStackUseAfterReturn = "YES"
30+
enableThreadSanitizer = "YES"
2931
shouldUseLaunchSchemeArgsEnv = "YES">
3032
<Testables>
3133
<TestableReference

Firestore/Example/Tests/Integration/FSTDatastoreTests.mm

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
#import <FirebaseFirestore/FirebaseFirestore.h>
1818

1919
#import <FirebaseFirestore/FIRTimestamp.h>
20-
#import <GRPCClient/GRPCCall+ChannelCredentials.h>
21-
#import <GRPCClient/GRPCCall+Tests.h>
2220
#import <XCTest/XCTest.h>
2321

2422
#import "Firestore/Source/API/FIRDocumentReference+Internal.h"
@@ -52,6 +50,7 @@
5250
using firebase::firestore::model::DocumentKeySet;
5351
using firebase::firestore::model::Precondition;
5452
using firebase::firestore::model::TargetId;
53+
using firebase::firestore::remote::GrpcConnection;
5554

5655
NS_ASSUME_NONNULL_BEGIN
5756

@@ -162,7 +161,7 @@ - (void)setUp {
162161
NSString *projectID = [FSTIntegrationTestCase projectID];
163162
FIRFirestoreSettings *settings = [FSTIntegrationTestCase settings];
164163
if (!settings.sslEnabled) {
165-
[GRPCCall useInsecureConnectionsForHost:settings.host];
164+
GrpcConnection::UseInsecureChannel(util::MakeString(settings.host));
166165
}
167166

168167
DatabaseId database_id(util::MakeString(projectID), DatabaseId::kDefault);
@@ -222,6 +221,9 @@ - (void)testStreamingWrite {
222221
mutations:@[ mutation ]];
223222
[_testWorkerQueue dispatchAsync:^{
224223
[_remoteStore addBatchToWritePipeline:batch];
224+
// The added batch won't be written immediately because write stream wasn't yet open --
225+
// trigger its opening.
226+
[_remoteStore fillWritePipeline];
225227
}];
226228

227229
[self awaitExpectations];

0 commit comments

Comments
 (0)