Storyboards with unknown classes should be build warnings
| Originator: | wjlafrance | ||
| Number: | rdar://20499266 | Date Originated: | 2015-04-10 |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | 6.3 GM 6D570 |
| Classification: | UI/Usability | Reproducible: | Always |
Summary: When a Storyboard contains an object with a custom class set but the "Module" set to "None", as can happen when migrating a storyboard from another project, a build warning will not be issued, nor will a warning indicator appear in the inspector. The only indication is a notice in the log which can get lost among other debugging statements. Steps to Reproduce: 1. Copy a Storyboard from one Xcode project to another. Alternatively, open a storyboard file and remove the "customModule" and "customModuleProvider" attributes. (See commented XML in Main.storyboard of attached project.) 2. Build and run the project. Expected Results: When inspecting the object with the unknown class or module, the Storyboard inspector should show an error indication. When building the project, a compilation warning should appear for an invalid Storyboard. Actual Results: The only indication in the Storyboard inspector is that the module appears as "None" in the same muted typeface as used for valid modules. See attached screenshots "ModuleNotSet.png" and "ModuleProperlySet.png". The project compiles without any errors or warnings, and upon running, you'll see this text in the debugger: 2015-04-10 11:40:45.864 StoryboardModuleNotSetRadar[26921:2598115] Unknown class ViewController in Interface Builder file. In a larger project, this might get lost among other debug output. Version: Xcode 6.3 GM 6D570 Notes: If you explicitly select your current module from the drop-down menu (see SelectingModule.png, attached), and then clear the field, it will default to the current project's module. This is how the screenshot "ModuleProperlySet.png" was achieved. Since Xcode is able to determine the default module, this would be a nice suggested quick-fix. Configuration: Attachments: 'StoryboardModuleNotSetRadar.zip', 'ModuleNotSet.png' and 'ModuleProperlySet.png' were successfully uploaded.
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!