The following build commands failed: PhaseScriptExecution Run\ Script build/ios-deploy.build/Release/ios-deploy.build
For those looking for a straight forward solution, I was able to resolve this on my machine following the instructions in this thread.
My environment:
OS: macOS High Sierra 10.13.5
Xcode Version: Version 9.4.1 (9F2000)
Disable "SIP"
- Click the symbol in the Menu bar.
- Click Restart…
- Hold down Command-R to reboot into Recovery Mode.
- Click Utilities.
- Select Terminal.
- Enter
csrutil disable
. - Enter
reboot
.
Attempt install with "SIP" disabled
- After reboot, remove XPCServices file
sudo rm /System/Library/PrivateFrameworks/MobileDevice.framework/XPCServices
- Attempt install again with this command
sudo npm install -g ios-deploy --unsafe-perm --allow-root
- Install should successfully complete.
Re-enable "SIP"
- Click the symbol in the Menu bar.
- Click Restart…
- Hold down Command-R to reboot into Recovery Mode.
- Click Utilities.
- Select Terminal.
- Enter
csrutil enable
. (important that you set it toenable
here...) - Enter
reboot
.