While editing in the storyboard, specifically assigning a view controller to a specific class, I suddenly encountered this error when I wanted to run the project.
Ma
In my case, the problem was with a UITextField as a subview in a UITableViewCell with 'Basic' styling. Once I changed it from 'Basic' to 'Custom' It started compiling.
For me, I removed a whole UITableView
section that was playing up. It only had one cell, but obviously something was up. Removing it and restarting Xcode fixed it for me.
Just ran into this error, and it coincided with non-available iOS versions showing for the wrong Xcode (e.g., iOS 11.2 showing for Xcode 8.2.1, which is not possible for iOS Simulators).
Solution was to delete /Library/Developer/CoreSimulator
, e.g.,
rm -rf /Library/Developer/CoreSimulator
In theory you should be able to run xcrun simctl delete unavailable
but that didn't work in this case.
Note Found this issue on Xcode 8.2.1, but 9.2 was also installed.
Clearing out the DerivedData folder (in ~/Library/Developer/Xcode/DerivedData) is what fixed the issue for me.
None of the other answers worked for me. Here's what did.
Build and run.
Try Deleting each view controller and Build to find the view controller causing an issue.
In my case, I misplaced object in the storyboard.
Deleting this object worked for me.