dahiya_boy
dahiya_boy

Reputation: 9503

Xcode file permission issue

I updated my MacOS to Catalina, after that I am getting error reading issue in one project only. Check below image

enter image description here

When I try to open the file in my xcode, I got below error.

enter image description here

If I opened the same file from finder, then it opens the same file in xcode successfully. And issue is shifted to other file. I tried 7-8 times and it continuously coming from one file to another.


Already tried

  1. Open backup project and still getting same issue.
  2. Tried with changing the folder directory, like copied project to desktop, but still getting issue
  3. Cleaned and build the project,
  4. Restart my mac.

Note: I am getting issue in one project and rest of my projects are working file.

Is there any one time solution for this issue?

Upvotes: 0

Views: 4342

Answers (3)

RGood
RGood

Reputation: 121

This error message can occur (somewhat misleadingly) if Xcode does not have permissions to access your Documents folder, and your project references a file that is not located within the same folder path as the project file.

The error message is misleading because the issue is not "you" (a user) lacking permission to view the file. The issue is that Xcode doesn't have permission to access the location of the file.

To resolve, go to System Preferences, Security & Privacy, Files and Folders, and enable Xcode to access the Documents folder. (Current as of MacOS 10.15.4 and Xcode 11.4.1)

Upvotes: 2

Syed Meesum Ali
Syed Meesum Ali

Reputation: 41

Try changing the permission if not already done. Enter the following in your terminal:

sudo chmod -R 777 /Users/macmini1/Desktop/Classes

It will ask for your password and then you will good to go.

Upvotes: 0

rchowley
rchowley

Reputation: 23

You can change the permission from the Finder, right click on that file, goto info and then on bottom under sharing and permission change the privilege to read and write against your username. This might solve your issue.

Check here

Upvotes: 0

Related Questions