Key Commands must all have a Title, Key and Selector

trever picture trever · Aug 3, 2016 · Viewed 11.6k times · Source

I am receiving and error when trying to build, Xcode 8.0 Beta 4, and when I'm building it says "error: Illegal Configuration: Key Commands must all have a Title, Key, and Selector. Select each row in the table to check its configuration."

It isn't on a TableView or anything, its a UIView with a Stack View inside it and some buttons, thats about it.

And this is on a Storyboard file I'm getting the error

I can't figure out what that might be?

Answer

Hayden Holligan picture Hayden Holligan · Aug 3, 2016

Open your storyboard file as source code (right click -> open as -> source code). There should be a line, <keyCommands> <keyCommand/> </keyCommands>. Removing this should solve your problem.

This line can be caused by accidentally clicking the + button in the key commands section of the view controller's attributes inspector, although it may be caused by other factors. The extra line can cause weird things to happen in XCode, such as errors and crashes.