Cordova Xcode Build Failed "Permission Denied"

Xcode build failed “Permission denied” when using phone gap .sh files

I get the answer...
I have to change the file permissions..
sudo chmod 777 copy-www-build-step.sh

just move to the platforms/ios/cordova/lib and execute the above command.

Cordova and ios-deploy causes builds to fail with codesign exit code 1/ permission denied

So it turns out that the Cordova CLI is working just fine, as is the ios-deploy npm package.

The problem turns out to be within the solution itself, and has nothing to do with the tools.

I am using the Ionic framework within this particular Cordova application, and their framework installs some "after_prepare" hooks (within the hooks folder) which attempt to help prepare / clean up some extraneous files prior to the build.

One of these hooks (named "020_remove_sass_from_platform.js") was trying to help out by cleaning up unneeded SASS files prior to the build in order to reduce the size of the compiled app.

Unfortunately this hook was adjusting the folder permissions (I guess in order to ensure the delete could succeed), and this was the cause of the "www" folder's permissions changing during a "cordova prepare".

I deleted the hooks, and now the Cordova CLI builds and signs the APK as expected, and the ios-deploy package pushes it to the device, all without using XCode.

Hope this can be of some help to someone else.



Related Topics



Leave a reply



Submit