ran in to this issue recently and i solved it by changing the value of the executable from "None" to "AppName.app" on xcode.
You should change:
Edit scheme -> Run AppName.app -> Info tab -> Executable -> None
to:
Edit scheme -> Run AppName.app -> Info tab -> Executable -> AppName.app