Xcode 11 Mac OS Catalina Application file couldn't be opened because you don't have permission to view it

After upgrading to Mac OS Catalina my already existent Xcode iOS projects are working fine.

I've created a new version of one of my projects. The development process is ok, but when I try to test it I receive the following message:


The file “zzz.app” couldn’t be opened because you don’t have permission to view it.

Domain: NSCocoaErrorDomain

Code: 257

Failure Reason: You don’t have permission.

Recovery Suggestion: To view or change permissions, select the item in the Finder and choose File > Get Info.

User Info: {

NSFilePath = "/Users/marcus/Library/Developer/Xcode/DerivedData/iMapIt-hdsrzhleripsvndtyddaezcqjjpk/Build/Products/Debug-iphonesimulator/zzz.app";

}

--

The operation couldn’t be completed. Permission denied

Domain: NSPOSIXErrorDomain

Code: 13

Failure Reason: Permission denied

--


Xcode is 11.3.1

Mac OS Catalina is 10.15.1


I've tried so many actions but I couldn't get to a solution.

Help needed, please.

Replies

I'm having similar problems. I'm in the middle of a class with hard deadlines and don't have time to deal with a buggy IDE. Tried VisualStudio, but that doesn't work well, either. Hoping Apple Engineers will chime and provide answers. Security & Privacy settings for Xcode show access to volumes. Build settings appear to be correct. Please help. The other error seen conjunctive with this problem is an intermittent permission to edit the project files.

found any solution yet?

I've created a new version of one of my projects.


Is it a modification of an existing project (what I guess) or a brand new project ?


Catalina has changed a lot access rights.

So I would advise:

- first do an option clean build folder.

if not enough:

- delete all derived data

if not enough, try to change permissions in Privacy

  1. Click on the Apple menu and select System Preferences.
  2. Select the Security & Privacy section.
  3. Click on the Privacy tab, then select the Files and Folders.


Read here: h ttps://www.howtogeek.com/443611/how-macos-catalinas-new-security-features-work/


Hope that helps.

I have the same issue and I really had too much assignment I have no idea how I can fix it, could you solve issues?
Just solved this answer thanks to this SO post: https://stackoverflow.com/a/63950990/5464805

It looks like at some point of the development my team had to exclude arm64 architectures for the app to work on simulator.
The error message is not that helpfull, but removing Excluded Architectures from Build Settings worked for me.

Hope this helps