7

The file couldn't be opened because you don't have permission to view it

Today I turned on my computer and discovered that all my projects show this error for each file in a project. Some of my projects have third-party libs, some don't. I checked all answers in this question, but none of that helped. Also I tried to reinstall Xcode following this article, it also didn't have an effect.

Of course I tried to reboot my mac and I changed permissions as Xcode asked but it didn't help. As I discovered it is a very common error that can occur for very different reasons. Yesterday everything worked fine, I didn't update macOS or Xcode, but it started getting these errors after turning on the computer.

System: macOS Catalina 10.15.1

Xcode: 11.2.1 (after reinstall, before that Xcode had lower version)

enter image description here

E. Dn
  • 940
  • 1
  • 9
  • 21

1 Answers1

7

I too had the same file permission issue to my existing project after updating to Catalina.

Resolved it by granting xcode the Full Disk Access. Got to

System Preferences --> Security & Privacy --> Privacy --> Full Disk Access --> Add Xcode & also in Files & Folders --> Add Xcode

Tushar
  • 462
  • 5
  • 12
  • 1
    did not fix the issue on OSX10.15.4/Xcode11.4.1 even after completely rebooting the computer after making the changes above. – Joseph Persico Apr 16 '20 at 08:25