Subclassing UICollectionViewController subclass in test targets causes compilation failure
Originator: | me | ||
Number: | rdar://42326672 | Date Originated: | 2018/07/18 |
Status: | Dupe of 19245651 | Resolved: | |
Product: | Developer Tools | Product Version: | Xcode 9.3 ... Xcode 10.0 |
Classification: | Reproducible: | Always |
There seems to be a problem when importing subclasses from Swift UICollectionViewController subclasses in Objective-C. When importing the automatically generated Swift header from an Objective-C test case, Xcode will report that the main app target imported from this header could not be found. An example project can be found here: https://github.com/alexaubry/radar-app-module-not-found Steps to Reproduce: 1. Define a Swift UICollectionViewController subclass in the main app target (A) 2. Define a Swift subclass of the subclass A in the test target (B) 3. Import the Swift interface of the main app in Objective-C test target and define a property that uses the B subclass. 4. Launch the unit tests Expected Results: The Objective-C code in the test compiles. Actual Results: The Objective-C code in the test does not compile, saying the main app module does not exist. Version/Build: Reproduced on Xcode 9.3, 9.4 and 10.0 beta using Swift 4.1 and Swift 4.2.
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!