1

I once had a bug where the xib still have a reference to a certain variable.

The reason why the bug is so tough to find is if I search for that variable it doesn't show at all.

Say I want to know which xib still have a reference iboutlet to certain pictures. How do I do so?

user4951
  • 32,206
  • 53
  • 172
  • 282

1 Answers1

2

Yes. XIBs are human readable. Simply search for the name of an image using your text editor or grep the image name.

During the build process, they are typically converted to another, smaller representation (known as "flattening"). So you want to look specifically at the XIBs you edit, rather than the ones converted and copied to the app bundle's contents.

Community
  • 1
  • 1
justin
  • 104,054
  • 14
  • 179
  • 226
  • Say I have 20 xibs and I want to know which one contain variable ISSomeVariableName? – user4951 Sep 25 '12 at 07:21
  • @JimThio yeah, you can just open them or their parent directory in something like TextWrangler (or another text editor which will interpret it as just a text file), then perform a find/search for `ISSomeVariableName` and the results will be returned to you in the search results. You could also use `grep` in this case. Perhaps not every editor does, but TextWrangler and TextMate will both do it. – justin Sep 25 '12 at 07:29
  • @JimThio and to grep: http://stackoverflow.com/questions/3963378/text-search-though-all-xib-files-in-xcode?rq=1 – justin Sep 25 '12 at 07:35