Sky
Sky

Reputation: 2442

Xcode gRPC-Core Error: 'openssl_grpc/ssl.h' file not found

I was trying to Archive my Mac app on Xcode, then below error in my Xcode:

enter image description here enter image description here

I can compile my app without a problem, just can't archive, I am thinking the issue might be I need to update my pod, when I run command in my terminal

pod outdated

it shows below info:

enter image description here

so this is just my guessing.

Here is an update:

After tried Paul's suggestions, I got a different error: enter image description here

Upvotes: 3

Views: 6162

Answers (2)

Ahmet Ensar Beşir
Ahmet Ensar Beşir

Reputation: 31

I encountered the same issue on my Flutter project on an M1 Mac, and I resolved the problem as follows.

1- Replace the gRPC dependencies with BoringSSL within the 'Runner' block in the Podfile. You should add this step right below the 'use_frameworks!' and 'use_modular_headers!' lines. You can make the edits as shown below:

pod 'gRPC-Core', :modular_headers => true

pod 'gRPC-C++', :modular_headers => true

AND POD UPDATE

2- pod update

The sample Podfile is here.

Upvotes: 3

Paul Beusterien
Paul Beusterien

Reputation: 29582

From https://github.com/grpc/grpc/issues/20500#issuecomment-543241775:

  • Archive the project in Xcode. It fails with error "openssl_grpc/xxx.h file not found".
  • In the issue navigator, find the particular error, right click, click "Reveal in Log"
  • In the build log that's showing the error, there's a parentheses with words loaded from '/Users/xxx/Library/Developer/Xcode/DerivedData/....'.
  • Copy the full path and append it with /openssl_grpc.framework for use in the next step; should look something like /Users/xxx/Library/Developer/Xcode/DerivedData/......../BoringSSL-GRPC/openssl_grpc.framework
  • Archive the project again. When Xcode shows it's building "BoringSSL-GRPC", go to terminal, cd into the directory in the above step, then run command ln -s Versions/Current/Headers Headers. This needs to be done before Xcode finishes building "BoringSSL-GRPC".
  • Expect the file-not-found error not showing up this time.

Upvotes: 2

Related Questions