I'm trying to add Firestore to my app but it's giving me this error: Use of undeclared identifier 'SSL_get_secure_renegotiation_support'; did you mean 'GRPC_SHADOW_SSL_get_secure_renegotiation_support'?
Asked
Active
Viewed 281 times
1
-
Just click fix and see what happens – andromedainiative Feb 03 '20 at 15:15
-
Something about the workspace's build settings may be messing with the grpc search paths. – Paul Beusterien Feb 03 '20 at 16:58
2 Answers
1
here I bring you a temporary solution.
The following lines of this file must be commented:
"/Pods/BoringSSL-GRPC/src/include/openssl/ssl.h"
// #define SSL_CTX_set_tlsext_servername_callback \
// SSL_CTX_set_tlsext_servername_callback
// #define SSL_get_secure_renegotiation_support \
// SSL_get_secure_renegotiation_support
They can do it with a post processor that runs after the install pod:
public class DisableFirestoreSsl
{
[PostProcessBuild (51)]
public static void Execute (BuildTarget buildTarget, string pathToBuiltProject)
{
if (buildTarget! = BuildTarget.iOS) return;
var filePath = pathToBuiltProject + "/Pods/BoringSSL-GRPC/src/include/openssl/ssl.h";
File.SetAttributes (filePath, FileAttributes.Normal);
var fileContent = File.ReadAllText (filePath);
fileContent = DisableDirective (fileContent, "SSL_CTX_set_tlsext_servername_callback");
fileContent = DisableDirective (fileContent, "SSL_get_secure_renegotiation_support");
File.WriteAllText (filePath, fileContent);
}
private static string DisableDirective (string input, string directive)
{
return Regex.Replace (input, $ "# define {directive}. * \ n .. * {directive}", $ "// Disable {directive}");
}
}

Francisco Antonelli
- 11
- 1
0
Did "replace" work? If not, uninstalling and reinstalling your podfiles might be the best option (although it's annoying). I've come across similar errors that make no sense as to why it's an error. Uninstalling and reinstalling has worked every time for me.

Kasey
- 374
- 2
- 12