Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error while build project Xcode says : "you don't have permission"

I have downloaded one project from the internet and, when I am trying to run it/build it the XCode, XCode says :

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

I have also put read/write permission to the project folder as well but still not working.

Why does this is happen? Please help me to resolve this issue

like image 284
jogshardik Avatar asked Dec 08 '14 09:12

jogshardik


People also ask

Could not add write permission to the file xcode?

Go to the Folder in Finder where the xcode project is and right click -> Get info. The permissions and the bottom should be set to read/write and in my case they were. The trick is to click the settings icon at the bottom and select "Apply to enclosed items".

How do I run a build in xcode?

To build and run your code, choose Product > Run, or click the Run button in your project's toolbar. Xcode analyzes your scheme's targets and builds them in the proper sequence. After a successful build, Xcode launches the associated app.


2 Answers

Go up to the folder containing the project in your Finder.

Right Click > Get Info

Go to the bottom of the Info pane, and click the little lock, type in your password when prompted.

Then, change permissions for yourself to read+write.

Click the little gear below, and apply to all enclosed items.

Close the lock once you are finished!

If this doesn't work, Change the value of "Compiler for C/C++/Objective-C" to "Default Compiler (Apple Clang)" under the Build Settings of your target.

like image 155
Michael Voznesensky Avatar answered Sep 22 '22 06:09

Michael Voznesensky


The project i have download from the internet don't have the Executable file in info.plist which should be there and its value should be this ${EXECUTABLE_NAME}. Instead of this value it consist some different value. So i have changed it ${EXECUTABLE_NAME} this value then clean->build->run successfully.

like image 27
jogshardik Avatar answered Sep 21 '22 06:09

jogshardik