Hum, I just ran into this issue this morning with downloaded code and that fixed it for me. I'm at a bit of a loss as to why it's not working for you. Try deleting your game completely and rebuilding it after running this command if you haven't already.
Tried cleaning all build files and rebuilding.
I also ran that command on the build and build/Debug folders as that's what's showing up in the error but no joy.
@matt, I did try all the above without any luck so far. It is interesting that doing a 'build' command, followed by a 'run' command from Xcode it will succeed.
Need to get some time to look at what happens in the run step in Xcode to see if I can isolate what is changing. Part of me wonders if it is a timing thing, like perhaps if the launch to the sim was a little delayed would it work in one step?
Possibly, though when I build with Xcode there is always a zero size pdex.bin. I assume this is because the Xcode project only builds the pdex.dylib needed for the simulator?
The zero-byte pdex.bin also happens when make is doing parallel builds, because there's a bug in our C_API/buildsupport/common.mk file: The pdc target should depend on device as well as simulator so that it finishes compiling pdex.bin before running pdc.
Same here, removing quarantine attributes did not help.
As @dave said, I think it's just an issue related to the simulator trying to load the pdx bundle (that is passed as argument in the Xcode Run scheme configuration) while is someway not ready to be loaded.
Of course by hitting run twice simulator finds the pdx ready and starts without complaints.
As dumb workaround, I usually use this shortcut combo:
cmd+b (just build, no run)
then immediately
cmd+r (run)
This way simulator finds the pdx for sure and starts the game, without annoying error message.
It's not ideal, but it's someway better.
I'm not a cmake/make expert, but I really think that fixing build phases dependencies as @dave suggested will fix the issue.