The problem is that when running the project in XCode it cannot fetch the js bundle which is why it is important to start the metro server with
npx expo run:ios or npx expo run:android
then you can can compile and run the app in XCode
then XCode can fetch the js bundle from the metro server running on your hardware