Pods-resources.sh Permission denied in iOS Project

IosPermission Deniedxcode5.0.1

Ios Problem Overview


I have got an existing project from a client and I tried to run this in my MAC using XCode 5.0

But I am facing this following error. I installed Cocoa Pods but still doesn't work. This project is running fine in other developer's machine. I badly need this running in my machine.

What I am missing? Any help is highly appreciated.

Thanks in advance.

enter image description here

Ios Solutions


Solution 1 - Ios

You need to make the script executable. Open terminal and execute this command:

chmod a+x "/Users/shovon0203/Desktop/My Work/oDesk/momenTOGO/MomenTOGO_iPhone/Pods/Pods-resources.sh"

Solution 2 - Ios

Try this, Works like a charm!

rm -rf Pods/ Podfile.lock
pod install

Solution 3 - Ios

Running pod install in the main project directory where your podfile is located should solve the problem

Solution 4 - Ios

for me deintegrating all pods then reinstalling them did the trick:

pod deintegrate
pod install

Solution 5 - Ios

You need to make the script executable. Open terminal and execute this command:

chmod a+x "your_path(where show permission denied)"

Please check if there no any space in folder name then add '' before

Solution 6 - Ios

This steps worked for me after failing many times.

STEP 1: Navigate to the location of the folder containing Pods-resources.sh

STEP 2: Open the terminal type cd and then drag the folder containing Pods-resources.sh to terminal and hit enter.

STEP 3: the run this command>> chmod a+x Pods-resources.sh

STEP 4: restart xcode and open your xxx.xworkspace

STEP 5: enjoy

Solution 7 - Ios

Just remove the folder Pods-[Your_Project_Name] completely and do fresh pod install

Solution 8 - Ios

You could try this:

pod deintegrate && pod cache clean --all && rm -rf Podfile.lock
pod install

It always works well in my projects.

Solution 9 - Ios

The above answer works. However, I had the same issue, but it was recurring. It dealt with having the same branch checked-out on multiple machines. It would work on one machine, and not the others. We use TFS as our source control (it's ok, you can judge), which does not play nicely with .sh, .py, etc. files. We had to add a .tpattributes file to every directory with a .sh or .py file in it so we could run .sh and .py files as executables.

Entries in the .tpattributes file looks like this:

Pods-MyTarget-frameworks.sh:x
Pods-MyTarget-resources.sh:x

This translates to chmod +x "Pods-MyTarget-frameworks.sh"

Works like a charm!

Solution 10 - Ios

I posted this as a comment to Kevins answer https://stackoverflow.com/a/19687227/3114383. But I thought I might as well put it as an answer because people will find it easier like this and it solved my problem. It might work for others aswell :D

I tried running the chmod command from kevins answer and it didnt work. Then i tried the command with sudo which also didnt work. Then i added a User-defined-setting to the build settings in xcode "PODS_ROOT = ${PROJECT_DIR}/Pods/". This is what fixed it for me. It seems the Permission denied error was quite misleading because the script was actually not able to find the file.

Solution 11 - Ios

I have also faced this issue. What I've done is:

  1. Create a brand new project with same name and same package name
  2. In the terminal of the project directory Pod init
  3. Open the pod file in a editor
  4. Copy and paste the old project pod files into the new one
  5. Copy all files and resources to the new project
  6. Simply do pod install

Solution 12 - Ios

I've faced same problem with Pods-project-frameworks.sh, resolved by removing first line #!/bin/sh from Pods-project-frameworks.sh file.

Solution 13 - Ios

Delete Pods folder and Podfile.lock from ios folder then try to re-run

Solution 14 - Ios

In my case try this delete pod.lockfile clean all builds

  1. pod deintegrate
  2. pod install
  3. flutter run

Solution 15 - Ios

In the build phase you have to add chmod +x in front of the commands. For example, in my case I added following command in my [CP] Copy Pod Resources phase,

> chmod +x "${PODS_ROOT}/Target Support Files/Pods-MyApp/Pods-MyApp-resources.sh"

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionTasnim Alam ShovonView Question on Stackoverflow
Solution 1 - IosKevinView Answer on Stackoverflow
Solution 2 - IosiTALIYAView Answer on Stackoverflow
Solution 3 - IosbrycejlView Answer on Stackoverflow
Solution 4 - IosMostafa ElShazlyView Answer on Stackoverflow
Solution 5 - IosAmardeep puvarView Answer on Stackoverflow
Solution 6 - IosOdworiView Answer on Stackoverflow
Solution 7 - IosMike KeskinovView Answer on Stackoverflow
Solution 8 - IosAndres PaladinesView Answer on Stackoverflow
Solution 9 - IostentmakingView Answer on Stackoverflow
Solution 10 - IosCantThinkOfAnythingView Answer on Stackoverflow
Solution 11 - IosSaneeshView Answer on Stackoverflow
Solution 12 - IosMurat UygarView Answer on Stackoverflow
Solution 13 - IoserdikanikView Answer on Stackoverflow
Solution 14 - IosRushika pawarView Answer on Stackoverflow
Solution 15 - IosSazzad Hissain KhanView Answer on Stackoverflow