iOS Build Environment Help Center

Cocoapods installation fails on BoringSSL

append delete FakeMelon

Windows version: 11
Builder version: 3.62
iOS SDK version: 17.4
Link to build log: https://pastebin.com/syygJvZ2
Frameworks: UserNotifications.framework
Capabilities: app.entitlements
3rd party SDKs: Firebase, Admob, Facebook, Singular

Hi! trying to use the cocoapods dameon to install pods, but the first one (BoringSSL) fails on what seems like an unrecognized symbol on the find command:

---

find . -type f \( -path '*.h' -or -path '*.cc' -or -path '*.c' \) -print0 | xargs -0 -L1 sed -E -i'.grpc_back' 's;#include <boringssl_prefix_symbols.h>;#include <openssl_grpc/boringssl_prefix_symbols.h>;g'

xargs: unrecognized option: L

---

Also, I would like to ask, if I have a post build script that modifies the PBX Project (aka adds frameworks and capabilities), do I still need to do these things again with the tool?
Thanks!

Reply RSS

Replies

append delete #1. Pierre-Marie Baty

Hello

I see the problem but it won't be straightforward to fix. The reason is that the version of /usr/bin/xargs used in macOS (and the range of options it accepts) is not exactly in line with the implementation of xargs used in the CocoaPods VM. The culprit is the VM's operating system whose implementation of xargs is not POSIX-compliant (because the -L flag *is* specified by POSIX).

I need to recompile a xargs binary in the CocoaPods VM that will be more POSIX-compliant and accept this option. This will be in the next version.

append delete #2. FakeMelon

Hi, thank you for your quick answer.
Is there a way I can stay updated about when you upload the next version, and maybe an estimation?
Also, might there be a way to skip the installation of this specific dependency? maybe by installing it locally? And if so, how could I skip only that, and let it continue automatically installing all the rest?

append delete #3. Pierre-Marie Baty

Well it was much faster than I tought. The package sort of installed right away without needing any modifications !

Please download this updated cocoapods script: https://www.pmbaty.com/iosbuildenv/cocoapods.cmd.zip

Put it in Toolchain\cocoapods in place of the previous one (keep a backup by security) and let me know if this updated version fixes the problem. At first start it will download a new filesystem for the CocoaPods VM - this is expected.

append delete #4. FakeMelon

It seems to give the same error still for some reason, I made sure I switched the files and I even tried the file it self without the tool like this:
"{Path}\iOS Project Builder for Unity\Toolchain\cocoapods\cocoapods.cmd" pod install
What I can add is I don't think it downloaded a new filesystem for the CocoaPods VM as you said should have happened.

append delete #5. Pierre-Marie Baty

It definitely has to (because of the changed MD5 value in the script file), unless another instance of cocoapods-daemon.exe was still running. I suspect that was the case. Either kill it, or restart your computer. Let me know please.

append delete #6. FakeMelon

Hi, thank you, it worked!
I face a new issue, again relating to BoringSSL, not sure if it's something with the project or the tool, this is the log:
https://pastebin.com/xJP2NN8k

Also, is there an option to save the downloaded pods after the daemon downloaded them for the first build? because I assume I don't really need to download them everytime (unless there are version changes of course).

append delete #7. Pierre-Marie Baty

Hello and sorry for the delay of my reply.

For your first question see my answer here: https://www.pmbaty.com/iosbuildenv/help/thread.php?path=Problem%20solving/&file=missing-header-files&page=1#i1ltxz9l23g

About your second question, that's unfortunately the way CocoaPods works. And since Unity recreates your project directory each time you export a Xcode project, the Pods folder is deleted and CocoaPods has to do it all over again. I believe the same is true on macOS.

My advice is to allocate time to gather the precompiled frameworks your project needs, then build the necessary compiler and linker flags to use them, and inject them in your build. And no longer use CocoaPods. This will save you a lot of time in the long run, at the expense of some initial search.

Reply

(Leave this as-is, it’s a trap!)

There is no need to “register”, just enter the same name + password of your choice every time.

Pro tip: Use markup to add links, quotes and more.

Moderators: Pierre-Marie Baty