Xcode error when building app: line 7: /resources-

2019-03-20 17:03发布

问题:

When I try to build cordova application in Xcode I get the following error:

/Users/User/PhpstormProjects/project/project-app/platforms/ios/Pods/Target Support Files/Pods-Project/Pods-Project-resources.sh: line 7: /resources-to-copy-Project.txt: Permission denied

Also I noticed that following file resources-to-copy-Project.txt cannot be found anywhere on my laptop and because of that I tried running pod install with different versions of cocoapods.

I already tried adding permissions to folders with chmod a+x.

回答1:

Manual solution is to access a project's Build Phases panel, and changing

"${SRCROOT}/Pods/Pods-resources.sh"

into

PODS_ROOT=Pods "${SRCROOT}/Pods/Pods-resources.sh"

Otherwise, Pods-resources.sh fails to copy files.

https://github.com/CocoaPods/CocoaPods/issues/594