Closed smellman closed 1 month ago
I find the reason in build logs:
Showing Recent Issues
/Users/btm/Library/Developer/Xcode/DerivedData/ReactNativeStaticServerExample-bfykmthjwnsxjgbupqlplkyggffn/Build/Intermediates.noindex/Pods.build/Custom-iphoneos/dr-pogodin-react-native-static-server.build/Script-46EB2E00019E00.sh: line 21: cmake: command not found
I installed cmake with Homebrew but not in /usr/bin. So, my workaround is following:
--- a/dr-pogodin-react-native-static-server.podspec
+++ b/dr-pogodin-react-native-static-server.podspec
@@ -59,6 +59,8 @@ Pod::Spec.new do |s|
:script => <<-CMD
set -e
+ export PATH="/opt/homebrew/bin:$PATH"
+
if [[ ${CONFIGURATION} == "Debug" ]]
then
LIGHTTPD_CONFIG="Debug"
@smellman actually, library README mentions that on macOS cmake
and pkg-config
should be simlinked into /usr/local/bin
for Xcode scripts to be able to find them:
sudo ln -s $(which cmake) /usr/local/bin/cmake
sudo ln -s $(which pkg-config) /usr/local/bin/pkg-config
another (better option, but I haven't tried) is to add eval "$(/opt/homebrew/bin/brew shellenv)"'
into ~/.zshenv
— Homebrew adds that command, which injects its path into PATH
, to ~/.zshrc
or ~/.zprofile
, which aren't sourced into Xcode environment, but from what I read on Internet ~/.zshenv
is supposed to be sourced into all interactive and non-interactive terminals... though I haven't tried it myself yet.
P.S.: I'll keep this ticket open, to actually try this ~/.zshenv
option, and update README accordingly, if it works.
I tried ~/.zshenv
but it doesn't work because script_phase
output #!/bin/sh
.
So, I need add symbolic links into /usr/local/bin
. Thanks!
I try to install react-native-static-server with Xcode 16 but compile process fails.
Error message
Environment
How to produce
Then build ReactNativeStaticServerExample.xcworkspace in Xcode 16.
Screenshot