Xcode says “You don't have permission” when trying to run

I found many questions on here asking for the same thing. I have tried all of them but I am still getting this error. I created everything from scratch again and was running well until I deleted the data from "DerivedData" folder and now this permissions alert error came back.


I have been trying following things for a week now:

  1. I have tried copying this project to a new folder. Didn't work.
  2. I changed every permission to my folder structure to be read & write to every user.
  3. Product -> Clean.
  4. Renaming the app.
  5. Compiler for C, C++, Objective-C is "Default compiler Apple LLVM 8.0)
  6. Build Settings > Architectures -> to Standard Architectures
  7. Replaced Info.plist from a newly created project.

Xcode version 8.1.

I see that one of the similar questions were tagged as a duplicate. But I am really stuck here for a week. I have tried everything from this answer in the StackOverflow.

And a lot of others that I found online.

I would really appreciate any help on this. I couldn't finish my project because of just this permission issue.

Thank you in advance!

Replies

I forgot to mention that I did 'clean build folder' as well, multiple times. I have a backup as well. Tried with a new project from scratch. When I do a git checkout master, it brings all the files in a folder, then I go run it, it gives me the same error.

I know, I was desperate. But what else would I do? Why does Xcode keeps saying I don't have permission on my own Macbook. So I thought the issue might be real with the permission.

It doesn't look like it is because even though I have full administrator read + write access to my Mac, I still can't run the project.


I have started a project from scratch, git checkout.

I also copied all the .js files over to a new project and then copied the "ios" folder from it. Still the same issue.

I did above steps at least 3 times.


Maybe it is something related to the "ios" folder copying, I am just not sure. I could upgrade to 8.2. But when I upgraded to 8.1, a few more issues had came up so I was waiting on upgrading as I am having so many issues already right before the release.

Thank you for your comment.

I have the same issue - If I run the project a second time the error goes away until I change the text again.


Did you find a fix?


I have logged an issue with apple support - but they are unble to replicate it.

I have the same issue, when I build to Iphone the message appears : "You don´t have permissions to view it" to myapp.app.


I´m using Xcode 8 and OS Sierra on a Mac mini.



Thank´s in advance


Anderson Murakami

I have the same issue, when I build to Iphone the message appears : "You don´t have permissions to view it" to myapp.app.


I´m using Xcode 8 and OS Sierra on a Mac mini.



Thank´s in advance


Anderson Murakami

Hello!


I have the same problem using xcode 7.3 or 8.2 with el capitan on macbook pro.

I am stuck for 3 days. Now I start to wonder if it is because recently updated my developer account. But I can actually build other apps without problem.


I least I am not alone. Thanks everyone!

Delete and recreate the Scheme for your Project.


1) Click on the Project Target Name at the top of the Xcode window.



2) Select "Manage Schemes" and Highlight the Scheme Name and click the Minus Sign to Delete it.



3) Click on the Project Target Name at the top of the Xcode window, Again.


4) The Plus sign at the bottom of the Aut0 Create Scheme and select your project from the list that appears.


This should fix your issue.

I have a MacOS Xcode project and this didn't help 😕😟

Try to check the "Executable file" string. Make it the same as the display name and then clear-rebuild might be help.

Hello

I have the same issue when I am trying to run the app in device or simulator and getting the same issue in Xcode 10.1


`The file “AppName” couldn’t be opened because you don’t have permission to view it You don’t have permission.`

If any one have better solution please share with us

Does anybody have an answer for this issue yet?
  • I had the same problem. Nothing helped just one thing helped. I copied folder with my project to my flash drive and deleted it from my Mac. After tried it on my flash drive, it worked. Then copied it from my flash drive to my Mac and it worked.

Add a Comment
These permission errors occurred with a project opened in Xcode 12 beta. Then when opening the project in Xcode 11, everything was fine.
I'm using a run script (Target -> Build Phase -> Run script) which strips out all architectures that are not currently needed.

/bin/sh executing the script which executes lipo.
lipo tries to remove/create files which doesn't work due to missing permission.

Because of that Xcode 12.0.1 on Catalina 10.15.6 shows
"The file "name.app" couldn't be open-end because you don't have permissions to view it."

I can't change the permissions as the files/folders doesn't exist prior the compile.
Changing the permissions afterwards doesn't work because Xcode doesn't run the script again.
On "Clean build Folder" the files/folders are removed and so on.

How do I grant access for Xcode/sh/lipo on a folder which doesn't exist?


I am facing same problem as Morfing on Xcode 12, as soon as I updated the version I started facing the issue, anyone knows how it could be solved?

I have the same issue when trying to launch an app on a simulator using debug executable. If I run non debug executable, I stop getting this issue, but have an installation problem. But even if I was able to run the non debug version it would make things very inconvenient, since I need all the debug tools. This seems like its a problem with Xcode think that Im just a user and not a developer.
My Xcode version is 12.0.1 and I have added a developer Apple ID to Xcode preferences. I also have developer certificate attached to my keychain.
For anyone still looking to a solution to this, at least for my situation, this happened because my product name was not exactly the same as my project name. Once I changed the Product Name field under Build Settings to perfectly match my project name (or target name, scheme name, not sure what it actually cares about) this error went away.