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
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".
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.
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.
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.
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