reason: 'Could not find a storyboard named 'Main' in bundle NSBundle...

报错信息:Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Could not find a storyboard named 'Main' in bundle NSBundle </Users/ypf/Library/Developer/Xcode/DerivedData/SmartTestOC-cbmzyyhgbzjpzzadluucaxwfzsuk/Build/Products/Debug/SmartTestOC.app> (loaded)'

解决办法:

在xcode中检查2个地方:
  1. 检查info.plist中的Main storyboard file base name项是否与文件Main.storyboard名称相同

    reason: 'Could not find a storyboard named 'Main' in bundle NSBundle...
    image.png
  2. 检查TARGETS → Build Phases → Copy Bundle Resources 中,是否有Main.storyboard,如果没有就手动添加

    reason: 'Could not find a storyboard named 'Main' in bundle NSBundle...
    image.png