Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Rename an ios project

I was renaming a project from GrowthKit to Mave, and updating the prefix.

This got me 95% of the way there, there were a few things to clean up manually (not really sure why because the things I fixed manually matched these rules). Luckily the previous project name wasn't "View" or something that would conflict with any builtin types or setting names

rm -rf Pods
brew install rename 
shopt -s globstar     # requires bash 4.0+, makes ** recursive

rename s/GrowthKit/Mave/ **
rename s/GRK/MAVE/ **

find -E . -regex '.*\.(h|m|storyboard|xib|pbxproj|xcworkspacedata)$' -exec perl -pi -e 's/GRK/MAVE/g;' {} +
find -E . -regex '.*\.(h|m|storyboard|xib|pbxproj|xcworkspacedata)$' -exec perl -pi -e 's/GrowthKit/Mave/g;' {} +
find . -name Podfile -exec perl -pi -e 's/GRK/MAVE/g;' {} +
find . -name Podfile -exec perl -pi -e 's/GrowthKit/Mave/g;' {} +

pod install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.