Trying to launch from XCode to device results in "Project file not found"

I need to debug our iOS builds. However, trying to launch from XCode to device results in “Project file not found”

Unreal 5.1.1, XCode 14.3, macOS Ventura

I get a splash screen, things start loading, but then:

[UE] Project file not found: ../../../mygamename/mygamename.uproject

Welp, looks like I wasn’t Reading The Fine Manual. I had not explicitly Cooked and Packaged in Editor before running from XCode ( could have sworn I was working on projects which had recent builds done via Jenkins, but maybe that isn’t quite the same?? )

i just came with same problem, could you please tell me more about how to “explicitly Cooked and Packaged in Editor before running from XCode”?
And, my .uproject file is in ProjectX/XGame.uproject, but in logs, it’s XGame/XGame.uproject, i changed buildingSettings > Product Name in XGame.xcworkspace, but it didn’t work, how can i change this config?

I mean I opened up the project in Unreal Editor on Mac and packaged the game there first.

As for the project location, that shouldn’t really matter much - I can move projects around, change the folder names pretty much at will - everything should be relative to the folder. Perhaps regenerating solution might be a necessary step though.