Interface Builder pollutes IBOutlets across targets with matching view controller names

Originator:rebello95
Number:rdar://42663539 Date Originated:27-Jul-2018 09:32 AM
Status:Open Resolved:
Product:iOS + SDK Product Version:9.4.1 (9F2000)
Classification:Other Bug Reproducible:Always
 
Summary:
When 2 different targets in the same Xcode project have UIViewController subclasses with the same class name, adding one of them in a storyboard file shows IBOutlets from both view controllers instead of outlets from only the selected class.

Steps to Reproduce:
- Create a new empty project with a target Target1
- Add a UIViewController subclass called `ViewController` to Target1 and add an IBOutlet
- Create a new target Target2
- Add a UIViewController subclass called `ViewController` to Target2
- Add a storyboard to Target2 with a `ViewController` class from Target2
- In the inspector, IBOutlets for *both* `ViewController` classes are available

Expected Results:
Only outlets from the `ViewController` class in its target are shown in IB

Actual Results:
Outlets from all classes named `ViewController` in different targets are shown in IB

Version:
9.4.1 (9F2000)

Notes:
100% reproducible

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!