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.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…