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

Viewed 1328

My Flutter app was integrated with Firebase and the app was building successfully with Firebase core and auth. However when I added the cloud_firestore: ^2.2.0 dependency, the build fails on iOS (still works on Android) with the following error message:

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.

When I remove the dependency, it builds successfully.

I have tried running pod install, flutter clean, changing the deployment target on Xcode and podfile, and installing/upgrading openssl.

It is the same issue as this: Not found 'openssl/x509.h' when install cloud_firesore flutter?

1 Answers
Related