Xcode error when building app: line 7: /resources-to-copy-Project.txt: Permission denied
Asked Answered
H

2

8

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.

Humblebee answered 25/7, 2017 at 18:16 Comment(2)
i have same issue too. any help? Thanks!Rugose
Well I wasn't able to solve this, so eventually I gave up.Humblebee
N
5

for anyone running into this issue in modern times, check

ENABLE_USER_SCRIPT_SANDBOXING is set to NO

YES will break the build

a sneaky thing Xcode slips into legacy projects if you ever accept its offer to update project settings

Norvall answered 12/3 at 13:41 Comment(0)
R
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

Rhaetia answered 6/2, 2018 at 1:59 Comment(1)
Please be specific, which step in Build Phase panel you meant? I don't see any such script in my project.Sunbeam

© 2022 - 2024 — McMap. All rights reserved.