Xcode: How to set current working directory to a relative path for an executable?

前端 未结 2 1360
离开以前
离开以前 2021-02-09 02:34

I have a command-line executable in Xcode.

I am using Xcode 5.1. In the \"Scheme Editor\" for the project under \"Options\" there is an option for \"Working Directory\".

2条回答
  •  醉话见心
    2021-02-09 03:19

    You can use Xcode build setting variables such as PROJECT_DIR, e.g. setting your working directory to $PROJECT_DIR/.. will make it equal to the parent directory of your project directory.

提交回复
热议问题