0

I want to find out unused function in objective-c. As due to dynamic nature of objective we cannot get this type of warning as in swift.

But Xcode provides the caller list of a function.

enter image description here

Is it possible through xcode/osx command line to print all the functions with there caller(s)?

If I further extend this question, Is it possible through xcode/osx command line to print all the functions those have zero caller(s)?

Amit Battan
  • 2,968
  • 2
  • 32
  • 68
  • Look at plugins feature https://github.com/alcatraz/Alcatraz, https://www.raywenderlich.com/94020/creating-an-xcode-plugin-part-1 – schmidt9 Oct 14 '17 at 08:05
  • Don't forget the calls from the xibs/storyboard. Duplicate of [How to find unused code in Xcode 7?](https://stackoverflow.com/questions/35233564/how-to-find-unused-code-in-xcode-7)? – Willeke Oct 14 '17 at 23:38
  • @Willeke I used this setting, but not getting warning for same in obj-c – Amit Battan Oct 17 '17 at 07:04
  • It's impossible to detect unused methods. The answer mentions Code Coverage. – Willeke Oct 17 '17 at 11:09

0 Answers0