Instantly share code, notes, and snippets.

What would you like to do?
SEE: A very simple shell script to read .xcodeproj files and check if there are issues with the CODE_SIGN_IDENTITY. Having multiple entries can cause build errors (especially when Archiving or command line building). Link to StackOverflow question answering some questions about when and why t…
# /bin/bash
#Usage: $ ./ path/to/xcode/project/file/theproject.xcodeproj
#More info:
for LINE in `cat "$PROJECT_FILE" | grep -n CODE_SIGN_IDENTITY | grep -o -E '^([0-9]*)'`
if [ $TEMP -eq $LINE ] ; then
echo "There is a Code Signing Identity (CODE_SIGN_IDENTITY) issue in $PROJECT_FILE at line $PREVIOUS_LINE."
exit 1
exit 0

This comment has been minimized.

Dan2552 commented Mar 11, 2013

Thanks so much! I was at the point of considering revoking everything and redoing it all.


This comment has been minimized.

almazini commented Mar 1, 2015

permission denied :(


This comment has been minimized.

lolptdr commented Apr 22, 2015

you may have to run the script as "sh path/to/xcode/project/file/theproject.xcodeproj" or "sh ./ path/to/xcode/project/file/theproject.xcodeproj"


This comment has been minimized.

chrisvxd commented Apr 24, 2015

@almazini make it executable first: chmod +x, then invoke it: ./


This comment has been minimized.


rjstelling commented May 3, 2016

Hi, I promoted this to a "real" repo:

If you've made useful changes please submit a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment