I know that functions can be called dynamically, but is there a way to determine statically which functions (and methods of ObjC objects) are not being called?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’m not sure that this is a sensible thing for someone to have attempted to make such a static analysis tool – it would be very complicated, and you would probably find that it would only find trvial examples of functions that would not be called – e.g. functions you’ve created in your classes, and you have no calls to them. All the stuff that interacts with Cocoa … well the problem is that they ‘might’ be called in different circumstances.
In any case, what you should really be interested in is runtime code coverage – as this would show you (with a decent suite of tests) what code is actually being used, which would be a smaller subset.