Changing the default bundle identifier prefix in Xcode
February 7, 2007
I broke down and signed up to the Xcode mailing list in order to ask how you can set the default prefix for bundle identifiers, as the lazyweb proved spectactularly useless in helping me with that problem. Turns out it’s not exactly dark magic; I got a response with detailed instructions within minutes—once I managed to get the question across correctly.
Here’s what I ended up doing. This is more for my own reference than anything else (so I can just copy and paste the next time) but other people might find it useful too:
mkdir ~/Library/Application\ Support/Apple/Developer\ Tools/Target\ Templates
cp -r /Library/Application\ Support/Apple/Developer\ Tools/Target\ Templates/Cocoa ~/Library/Application\ Support/Apple/Developer\ Tools/Target\ Templates
cd ~/Library/Application\ Support/Apple/Developer\ Tools/Target\ Templates/Cocoa/
perl -pi -e 's/com.yourcompany/org.brautaset/g' *
Are there supposed to be all those crazy backward and forward slashes? ‘Cause that just looks wrong.
Plus it doesn’t work. Second line gives and error.
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-pvX] source_file target_file
cp [-R [-H | -L | -P]] [-fi | -n] [-pvX] source_file … target_directory
It could be that the formatting is a bit screwed up. I’ve tried to fix it in the above. The second line is actually broken into two lines.