ios - fatal error : 'openssl/x509.h' file not found in Flutter iOS build after integrating firestore

标签 ios xcode firebase flutter google-cloud-firestore

我的 Flutter 应用已与 Firebase 集成,并且该应用已使用 Firebase 核心和身份验证成功构建。但是,当我添加 cloud_firestore: ^2.2.0 依赖项时,构建在 iOS 上失败(仍然适用于 Android)并显示以下错误消息:

In file included from /Users/charismak/AndroidStudioProjects/foodstack/ios/Pods/gRPC-Core/src/core/ext/filters/client_channel/xds/xds_channel_secure.cc:34:
    In file included from /Users/charismak/AndroidStudioProjects/foodstack/ios/Pods/gRPC-Core/src/core/lib/security/credentials/credentials.h:35:
    In file included from /Users/charismak/AndroidStudioProjects/foodstack/ios/Pods/gRPC-Core/src/core/lib/security/security_connector/security_connector.h:33:
    /Users/charismak/AndroidStudioProjects/foodstack/ios/Pods/gRPC-Core/src/core/tsi/ssl_transport_security.h:28:10: fatal error: 'openssl/x509.h' file not found
    #include <openssl/x509.h>
             ^~~~~~~~~~~~~~~~
    1 error generated.

当我删除依赖项时,它会成功构建。

我已经尝试运行 pod installflutter clean、更改 Xcode 和 podfile 上的部署目标,以及安装/升级 openssl。

这是同一个问题:Not found 'openssl/x509.h' when install cloud_firesore flutter?

最佳答案

我通过在 /ios 内的终端中运行以下命令解决了这个问题:

rm -rf Pods Podfile.lock

pod cache clean --all

pod install 

(安装可能需要一些时间才能完成)

来源:https://github.com/FirebaseExtended/flutterfire/issues/3203#issuecomment-743789416

关于ios - fatal error : 'openssl/x509.h' file not found in Flutter iOS build after integrating firestore,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67822031/

相关文章:

ios - iOS Web 服务接收空数据

iphone - 如何删除或清除 iphone 中的 Tabbar 图像?

objective-c - 如何使用 Objective C 查找和替换文件中的文本?

swift - 使用 Finder 打开下载目录,必要时提示用户许可

iOS - 设置平移的最小/最大限制

objective-c - 使用贝塞尔路径

xcode - Swift- 设置可见菜单 Controller

swift - 从 firebase 加载到 tableview 的问题

c# - 如何在 Windows 上接收来自 Firebase 云消息传递的推送通知

ios - 如何使用swift和ios使firebase sdk中的旧消息过期