1

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'?

enter image description here

Mayank
  • 315
  • 2
  • 13
Singh Raman
  • 103
  • 1
  • 5

2 Answers2

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}");
        }
    }
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