bad interpreter: No such file or directory

In XCode I ran into an error which was the result of a (my) bad merge that caused this problem when building an app:

/bin/sh: /Users/strefethen/github/iPhoneGeo/Build/iPhoneGeo/Build/Intermediates/iPhoneGeo.build/Debug-iphonesimulator/iPhoneGeo.build/Script-22C5773E1BB449FF00E72A71.sh: (null): bad interpreter: No such file or directory

The issue was that the Shell command for the Build Phase had gotten removed:

Screen Shot 2015-09-24 at 11.17.33 AM

This caused Xcode to insert the following line at the top of the build script and thus the above error:

#!(null)

Simply restoring the Shell setting above to “/bin/sh” corrected the issue.

CC BY-NC-SA 4.0
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Published by

Steve

Husband, father, brother, software developer. CTO @WanderfulMedia