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
How to Properly Add Child View Controller in iOS 8 with Swift
Programmatically Checking If a Passcode Lock Is Set
How to Search for Any Uiwebview Component Usage Inside a Current Project
Programmatically Creating Uinavigationcontroller in iOS
Programmatically Detect Dark Mode in Swiftui to Display Appropriate Image
Admob 7.3.1 and Swift 2.0 - Module Not Found
Autolayout: Uiview Within Uiview Has Incorrect Frame
The Proper Way of Doing Chain Animations
[Nsthread Ismainthread]' Always Returns Yes
iOS 10.3 Beta 3 Doesn't Persist Data of Keychainitem
Phimageresultisdegradedkey/Phimagefileurlkey Is Not Found
Cgcontextsetfillcolorwithcolor: Invalid Context 0X0
How to Get MAC Address from Cbperipheral and Cbcenter
Uisplitviewcontroller on iPad with Storyboards
Avplayerviewcontroller Using Audio-Only Avplayer
Uiapplicationlaunchoptionsremotenotificationkey Not Getting Userinfo
How to Switch to Speaker Output When Bluetooth Headsets Are Connected