Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Rename classes in XCode projects' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Rename classes in XCode projects
Authored by: samsamoa on Mar 28, '05 01:18:44PM
There is a very nice CLI tool called nibtool (which comes with developer tools) that can do just this. From the manpage:
       -C, --convert old new
              Convert all custom classes in nibfile that have prefix old  into
              new.  Can  be used to convert all classes whose name begins with
              com.apple.yellow to now be prefixed by  com.apple.cocoa  or  all
              classes that have the prefix XY to now have the prefix XZ.
So to change OldClass to NewClass in MyNib.nib, do this:
    nibtool -C OldClass NewClass MyNib.nib


[ Reply to This | # ]
Rename classes in XCode projects
Authored by: jzdziarski on Apr 01, '05 10:28:44AM

It's much better to just do something like this:

perl -p -i.bak -e 's/OldClass/NewClass/g' `find . -name "*.java"`

or whatever extension you are interested in. this will prevent you from screwing with files you don't want..and grep -r never worked for me.



[ Reply to This | # ]
Rename classes in XCode projects
Authored by: ZZamboni on Apr 07, '05 02:32:13AM

I expected a tool for this would exist, but didn't find it when I needed it. Thanks!



[ Reply to This | # ]