Xcode 5 has a build setting called "Unused Functions." I have read elsewhere that "The compiler can never tell if an Objective-C method is truly unused, because it may be called dynamically, either via performSelector:, via subclassing, or many other ways." Given that unused parameters does in fact show parameters that are not being used I was surprised that unused functions does not have the implied behaviors.
Can someone explain what is the meaning/impact of this setting?
Xcode has a number of settings you can enable to warn you about things like unused functions, parameters, and values. You can also easily enable strict warnings by setting your Other Warning Flags to -Wall -Wextra -Weverything . Another option for detecting unused code is by using Code Coverage.
The Xcode build system manages the tools that transform your code and resource files into a finished app. When you tell Xcode to build your project, the build system analyzes your files and uses your project settings to assemble the set of tasks to perform.
A build configuration file is a plain-text file you use to specify the build settings for a specific target or your entire project. Build configuration files make it easier to manage build settings yourself, and to change build settings automatically for different architectures and platforms.
Choose the project in the Project Navigator on the left. Select the Configurations target from the Targets section and click the Build Settings tab at the top. The Build Settings tab shows the build settings for the Configurations target. It's possible to expand this list with build settings that you define.
It applies to functions, rather than to methods.
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