I am curious if there are any tools that provide partial solutions for this. It is a tricky problem because of performSelector . . . but a tool ought to at least be able to come up with candidates, making the human's job easier.
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- xcode 4 garbage collection removed?
- Xcode: Is there a way to change line spacing (UI L
- Unable to process app at this time due to a genera
- Swift - hide pickerView after value selected
Given the very verbose but descriptive method names often chosen in Objective-C programs, I find that doing a textual Find In Project is usually sufficient. I will usually just use the first part of a method name so as to avoid having to match method arguments. This will match normal method calls and use of
@selector
andNSSelectorFromString
.Of course, this won't work for very common method names or if you need the rest of the method name to disambiguate between many similar methods, but I find that to be a rare occurrence.
Using static analysis, it is impossible to detect functions/methods that are defined but not used due to dynamic nature of Objective-C. The only reasonable solution is to run a coverage using
GCov
or similar tool. Even then, you will have to make your program do everything possible in order to make sure that you do not strip out some feature that was just not used during testing.Also, this script has some interesting thoughts on this.