the working directory options does not exist in scheme on Xcode 15

128 views Asked by At

When I runned the app on Xcode 15 sees my older project directory address but I don't working this directory. how can I change the working directory.

I searched for this errors but. I think the solutions for the before versions of Xcode 15. In Xcode 15 does not have current working directory options.

the error and scheme option images

1

There are 1 answers

0
Sweeper On

The scheme settings are stored in the file at YourApp.xcodeproj/xcshareddata/xcschemes/YourApp.xcscheme. This is an XML file, so you can directly edit the scheme information there.

Go to the <LaunchAction> tag, which corresponds to the "Run" tab on Xcode's "Edit Scheme" dialog. It should have the attributes useCustomWorkingDirectory and customWorkingDirectory. Set the former to "YES" and the latter to a directory you like:

<LaunchAction
    ...
    useCustomWorkingDirectory = "YES"
    customWorkingDirectory = "some/path/you/want"
    ...
>

Or, you can set useCustomWorkingDirectory to "NO" and remove customWorkingDirectory. This sets the working directory to the product output directory, i.e. wherever Xcode generates the output executable.