If I use Xcode's "Find/Replace in workspace" it seems to skip any text contained in the UIViews in XIB files.
Anyway to do this in Xcode or do I need to use another tool?
Thanks!
XCode will successfully Refactor IBOutlet names even if they are connected up in the nib. So to answer you:
Before choosing Find/Replace on the text, first see if Xcode will Refactor it instead. It won't refactor certain things (such as enums and #defines). If it will Refactor your target text then choose that and it should be okay.
You can use find and sed from the command line
find . -name '*.xib' -type f -exec sed -i "" 's/OldText/NewText/g' {} \
For instance, I just had to find and replace all class prefixed from SC to MCSC and I used:
find . -name '*.xib' -type f -exec sed -i "" 's/[[:<:]]SC/MCSC/g' {} \
The [[:<:]] indicates a word boundary on OS X (see https://stackoverflow.com/a/5734237/456366).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With