gpt4 book ai didi

ios - 在我的 iOS 应用程序中实现 pod 'Firebase/Firestore' 后无法运行应用程序

转载 作者:行者123 更新时间:2023-11-30 10:26:09 26 4
gpt4 key购买 nike

我正在尝试将 Firestore 添加到我的应用程序中,但出现此错误:使用未声明的标识符“SSL_get_secure_renegotiation_support”;您指的是“GRPC_SHADOW_SSL_get_secure_renegotiation_support”吗?

enter image description here

最佳答案

这里我给你带来一个临时解决方案。

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

关于ios - 在我的 iOS 应用程序中实现 pod 'Firebase/Firestore' 后无法运行应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60041602/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com