我的 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 install
、flutter clean
、更改 Xcode 和 podfile 上的部署目标,以及安装/升级 openssl。
这是同一个问题:Not found 'openssl/x509.h' when install cloud_firesore flutter?
最佳答案
我通过在
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/