aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore
diff options
context:
space:
mode:
authorGravatar rsgowman <rgowman@google.com>2018-06-18 09:56:21 -0400
committerGravatar GitHub <noreply@github.com>2018-06-18 09:56:21 -0400
commit39e12ed16ce15d4c402fe079fc9f35869b669a6d (patch)
tree361fadc488af95755bf5229debec6fe2ee382fe9 /Firestore
parentf92829fa7554031df1947c50d5f8fcd67365ea98 (diff)
parent9e5c36b022b999b36f9a97d7eb44359f7fb2ac59 (diff)
Merge pull request #1416 from firebase/wilhuff/protobuf_cpp
Fixups to rsgowman/protobuf_cpp
Diffstat (limited to 'Firestore')
-rw-r--r--Firestore/Example/Firestore.xcodeproj/project.pbxproj96
-rw-r--r--Firestore/Example/ProtobufCpp.podspec12
-rw-r--r--Firestore/Source/Remote/FSTDatastore.mm4
3 files changed, 11 insertions, 101 deletions
diff --git a/Firestore/Example/Firestore.xcodeproj/project.pbxproj b/Firestore/Example/Firestore.xcodeproj/project.pbxproj
index a6fb85d..f05d26b 100644
--- a/Firestore/Example/Firestore.xcodeproj/project.pbxproj
+++ b/Firestore/Example/Firestore.xcodeproj/project.pbxproj
@@ -1177,7 +1177,6 @@
54C9EDEE2040E16300A969CD /* Frameworks */,
54C9EDEF2040E16300A969CD /* Resources */,
EA424838F4A5DD7B337F57AB /* [CP] Embed Pods Frameworks */,
- 4610379B4CEF81E5E5525792 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@@ -1198,7 +1197,6 @@
6003F587195388D20070C39A /* Frameworks */,
6003F588195388D20070C39A /* Resources */,
1EE692C7509A98D7EB03CA51 /* [CP] Embed Pods Frameworks */,
- 761F9C177D75EA79C6C89187 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@@ -1218,7 +1216,6 @@
6003F5AB195388D20070C39A /* Frameworks */,
6003F5AC195388D20070C39A /* Resources */,
329C25E418360CEF62F6CB2B /* [CP] Embed Pods Frameworks */,
- A25540FE24FB06DA9D9FA8CA /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@@ -1239,7 +1236,6 @@
6EDD3B4520BF247500C33877 /* Frameworks */,
6EDD3B4A20BF247500C33877 /* Resources */,
6EDD3B5720BF247500C33877 /* [CP] Embed Pods Frameworks */,
- E3B8CDD068DA992B3A113704 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@@ -1260,7 +1256,6 @@
DE03B2D31F2149D600A30B9C /* Frameworks */,
DE03B2D81F2149D600A30B9C /* Resources */,
B7923D95031DB0DA112AAE9B /* [CP] Embed Pods Frameworks */,
- E7A967D34B382BF27EF0E619 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@@ -1281,7 +1276,6 @@
DE0761E11F2FE611003233AF /* Frameworks */,
DE0761E21F2FE611003233AF /* Resources */,
04404E0DCBB886A40E3C7175 /* [CP] Embed Pods Frameworks */,
- A73495183E594AE55AFE86B6 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@@ -1513,21 +1507,6 @@
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Firestore_Tests_iOS/Pods-Firestore_Tests_iOS-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
- 4610379B4CEF81E5E5525792 /* [CP] Copy Pods Resources */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- );
- name = "[CP] Copy Pods Resources";
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Firestore_Example_iOS-Firestore_SwiftTests_iOS/Pods-Firestore_Example_iOS-Firestore_SwiftTests_iOS-resources.sh\"\n";
- showEnvVarsInLog = 0;
- };
5504F81EEBBEF943CA61D32C /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@@ -1582,21 +1561,6 @@
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Firestore_FuzzTests_iOS/Pods-Firestore_FuzzTests_iOS-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
- 761F9C177D75EA79C6C89187 /* [CP] Copy Pods Resources */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- );
- name = "[CP] Copy Pods Resources";
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Firestore_Example_iOS/Pods-Firestore_Example_iOS-resources.sh\"\n";
- showEnvVarsInLog = 0;
- };
83F2AB95D08093BB076EE521 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@@ -1633,36 +1597,6 @@
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";
showEnvVarsInLog = 0;
};
- A25540FE24FB06DA9D9FA8CA /* [CP] Copy Pods Resources */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- );
- name = "[CP] Copy Pods Resources";
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Firestore_Tests_iOS/Pods-Firestore_Tests_iOS-resources.sh\"\n";
- showEnvVarsInLog = 0;
- };
- A73495183E594AE55AFE86B6 /* [CP] Copy Pods Resources */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- );
- name = "[CP] Copy Pods Resources";
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Firestore_Example_iOS-SwiftBuildTest/Pods-Firestore_Example_iOS-SwiftBuildTest-resources.sh\"\n";
- showEnvVarsInLog = 0;
- };
A827A009A65B69DC1B80EAD4 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@@ -1717,36 +1651,6 @@
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";
showEnvVarsInLog = 0;
};
- E3B8CDD068DA992B3A113704 /* [CP] Copy Pods Resources */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- );
- name = "[CP] Copy Pods Resources";
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Firestore_FuzzTests_iOS/Pods-Firestore_FuzzTests_iOS-resources.sh\"\n";
- showEnvVarsInLog = 0;
- };
- E7A967D34B382BF27EF0E619 /* [CP] Copy Pods Resources */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- );
- name = "[CP] Copy Pods Resources";
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Firestore_IntegrationTests_iOS/Pods-Firestore_IntegrationTests_iOS-resources.sh\"\n";
- showEnvVarsInLog = 0;
- };
EA424838F4A5DD7B337F57AB /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
diff --git a/Firestore/Example/ProtobufCpp.podspec b/Firestore/Example/ProtobufCpp.podspec
index 8090b1e..c809c06 100644
--- a/Firestore/Example/ProtobufCpp.podspec
+++ b/Firestore/Example/ProtobufCpp.podspec
@@ -51,7 +51,10 @@ Pod::Spec.new do |s|
# Set a CPP symbol so the code knows to use framework imports.
s.pod_target_xcconfig = {
- 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1',
+ 'GCC_PREPROCESSOR_DEFINITIONS' =>
+ '$(inherited) ' +
+ 'GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1 ' +
+ 'HAVE_PTHREAD=1',
'HEADER_SEARCH_PATHS' => '"${PODS_ROOT}/ProtobufCpp/src"',
# Cocoapods flattens header imports, leading to much anguish. The
@@ -59,10 +62,13 @@ Pod::Spec.new do |s|
# - https://github.com/CocoaPods/CocoaPods/issues/1437
'USE_HEADERMAP' => 'NO',
'ALWAYS_SEARCH_USER_PATHS' => 'NO',
-
- 'OTHER_CFLAGS' => '-DHAVE_PTHREAD'
}
+ # Disable warnings that upstream does not concern itself with
+ s.compiler_flags = '$(inherited) ' +
+ '-Wno-comma ' +
+ '-Wno-shorten-64-to-32'
+
s.requires_arc = false
s.library = 'c++'
end
diff --git a/Firestore/Source/Remote/FSTDatastore.mm b/Firestore/Source/Remote/FSTDatastore.mm
index fdbeea3..33d29e9 100644
--- a/Firestore/Source/Remote/FSTDatastore.mm
+++ b/Firestore/Source/Remote/FSTDatastore.mm
@@ -240,7 +240,7 @@ typedef GRPCProtoCall * (^RPCFactory)(void);
error = [FSTDatastore firestoreErrorForError:error];
[self.workerDispatchQueue dispatchAsync:^{
if (error != nil && error.code == FIRFirestoreErrorCodeUnauthenticated) {
- _credentials->InvalidateToken();
+ self->_credentials->InvalidateToken();
}
LOG_DEBUG("RPC CommitRequest completed. Error: %s", error);
[FSTDatastore logHeadersForRPC:rpc RPCName:@"CommitRequest"];
@@ -277,7 +277,7 @@ typedef GRPCProtoCall * (^RPCFactory)(void);
if (error) {
LOG_DEBUG("RPC BatchGetDocuments completed. Error: %s", error);
if (error.code == FIRFirestoreErrorCodeUnauthenticated) {
- _credentials->InvalidateToken();
+ self->_credentials->InvalidateToken();
}
[FSTDatastore logHeadersForRPC:rpc RPCName:@"BatchGetDocuments"];
completion(nil, error);