-1

I have a set of generated Objective-C classes with properties based on some input file. What I would like to achieve is that I see a warning if one of those properties is never referenced in my code, so I can get rid of the corresponding part in the input files.

Is there a clang attribute or similar that can achieve this?

Alfonso
  • 8,386
  • 1
  • 43
  • 63
  • There are two similar questions on SO, but the answer appears to be "no, but here is what you can do": http://stackoverflow.com/questions/1456966/how-to-detect-unused-methods-and-import-in-objective-c http://stackoverflow.com/questions/8347212/how-to-identify-unused-method-in-xcode – ThomasW Mar 25 '15 at 07:21
  • Thanks for the references, all my search turned up was how to silence unused warnings. They questions and answers are a few years old, I'll keep the question open for a bit, maybe something new came up. If not, I'll close it. – Alfonso Mar 25 '15 at 07:28
  • The answer below adds something that the other questions don't have, so I think it would be best to avoid deleting the question. – ThomasW Mar 26 '15 at 02:29

1 Answers1

2

Try the free version of FauxPas software. Is a code analyzer very good in addition to xcode and instruments. It will show you unused methods, unused imports, unused localized strings, and many other things. (I have nothing to do with this software)

ThomasW
  • 16,981
  • 4
  • 79
  • 106
Christian
  • 382
  • 2
  • 11