von v.
von v.

Reputation: 17108

Xcode Build Issue - permission denied

I am using Xcode 10.1. Everytime I build my project I get this error:

/Users/{username}/Library/Developer/Xcode/DerivedData/{random_name}/Build/Intermediates.noindex/.... line 2: /Users/{username}/path_to_app/Pods/Target Support Files/pod_name/... Permission denied

I already tried the accepted answer here. I also tried doing the sudo chown but those did not fix the error. These are the actual steps I did, multiple times:

  1. Remove all files in the DerivedData
  2. Do the sudo chown in both paths: DerivedData and path_to_app
  3. Clean
  4. Build

What am I missing?

Upvotes: 5

Views: 13589

Answers (2)

Help
Help

Reputation: 84

Here's what worked for me.Navigate to the directory which contains the file (for which you receive "Permission Denied" error) ,Then in terminal type chmod 777 (your_file_name). What basically you are doing is giving read/write/execute permission to your file . For more info check this article - https://www.maketecheasier.com/file-permissions-what-does-chmod-777-means/

Upvotes: 0

von v.
von v.

Reputation: 17108

What worked for me is using chmod. Here's the command chmod -R 755 {my_working_folder}. For an explanation of what the numbers represent, you may read this article.

Upvotes: 12

Related Questions