Pods-resources.sh Permission denied in iOS Project

此生再无相见时 提交于 2019-11-27 17:23:01

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"

Try this, Works like a charm!

rm -rf Pods/ Podfile.lock
pod install

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

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

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!

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.

Saneesh

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

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

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

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!