Search code examples
file-permissionsxcodebuild

xcodebuild couldn't read dependency graph from ... .... : Permission denied


Today I experienced the following error from xcodebuild:

xcodebuild couldn't read dependency graph from ... .... : Permission denied

And further down:

Details: unable to write dependency graph: You don’t have permission to save the file “my-app.build” in the folder “my-target-iphoneos”.

I am documenting this since the cause is really obscure, see my answer.


Solution

  • If you have the Xcode Organizer window open, while attempting to build the app from the command line, it locks the build directory, resulting in the file permissions error.

    If you close the Organizer window you will be able to build from the command line again.