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)
On your Mac, select the disk, then choose File > Get Info. Click the arrow next to Sharing & Permissions to expand that section. If the lock at the bottom right is locked , click it to unlock the permissions.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With