Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running expo hello world react native app on iOS device in Xcode requires some configuration #2

Open
YUNQIUGUO opened this issue Aug 11, 2023 · 0 comments

Comments

@YUNQIUGUO
Copy link

Context

In README.md, we documented the steps for running this expo react native hello world app for iOS as follows:

6. Run the following command to launch:

In <SOURCE_ROOT>, run the following command to launch for Android

expo run:android
In <SOURCE_ROOT>, run the following command to launch for iOS

expo run:ios

But running the expo app with Xcode seems requiring some extra config with node. It may be helpful to document this:

I found that Xcode build failed at finding the node while debugging a github issue related to react native on actual iOS device,

Error message:

Error: cannot find the node binary. Try setting the NODE_BINARY variable in the  "Bundle React Native code and images" Build Phase to the absolute path to your node binary.  You can find it by executing "which node" in a terminal window.
Command PhaseScriptExecution failed with a nonzero exit code

Setting NODE_BINARY variable as suggested actually doesn't help at least in my case. looks like the easiest is to create a sym link for node: (works for me)

See: https://stackoverflow.com/questions/44492197/react-native-ios-build-cant-find-node

Also, fwiw, actually that command expo run:ios seems only would work for iOS simulator.

i.e. From the metro bundler menu:

› Press a │ open Android
› Press i │ open iOS simulator
› Press w │ open web

› Press r │ reload app
› Press m │ toggle menu

› Press ? │ show all commands

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant