Open rustyshelf opened 7 years ago
Thanks for taking the time to report the issue!
If I understand correctly this case is covered in this unit test. In there we've got:
A
with @IBOutlet
named label
A
named B
without any outletsB
classHard to tell what exactly is wrong but I suspect it may be one of these:
@IBOutlet
attribute)I'm planning to add a better error reporting which should make debugging issues like this easier in the future.
You are correct, and yes, the base class is Objective-C hence it wasn't picked up. Makes perfect sense considering the tool does Swift only. I should have figured that out, sorry! 😂
I have seen the same issue, I but all @IBOutlet are not found. I have a separate storyboard, and a UIViewController with IBOutlet referencing a view in the UIViewController and another view outside the UIViewController but linked to it and with its @IBOutlet reference in the UIViewController source
Same issue here, we link a tableView
outlet to a subclass of XLFormViewController
(https://github.com/xmartlabs/XLForm), which is a third-party objC library. It seems that many people will run into this issue even if they have a 100% swift codebase but with objC third party frameworks (I guess that makes it not 100% swift then, hmmm).
@ldiqual Yeah, we should look into that. Here's a possible approach:
ObjectiveCParser
class, with the same public interface as SwiftParser
. We could probably leverage some 3rd party library for tokenization, e.g. pegkit. It would have to operate on both .h
and .m
(and possibly .mm
) files.Runner
passing classNameToClassMap
inout variable to it.It's a big task but possibly pretty interesting to work on.
Think I am seeing the same thing. Am subclassing a UICollectionViewController
which has a collectionView
IBOutlet you set in IB. This causes a warning: IBOutlet missing: collectionView is not implemented in MySubclass.storyboard
. Obviously this IBOutlet isn't in my subclass, and seems to be no way of ignoring the error.
In Xcode 9.2 and Swift 4 there is the same issue. I got a parent and child class both have IBOutlets. My view with IBOutlets is of class from the child. Connecting in Interface Builder is no problem.
After compiling code there is this warning: IBOutlet unused in the parent class.
Suppose you have a class:
BaseCell
, and it has a childFancyCell
. You can hook IBOutlets from the childs XIB to the parent class, but the IBAnalyzer doesn't seem to find these, it will instead print out:FancyCell doesn't implement a required @IBOutlet named: starredView
.To be honest I'm not sure if this is a common use case, but I thought I'd note it here in case it helps.