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个地方:
-
检查
info.plist
中的Main storyboard file base name
项是否与文件Main.storyboard
名称相同image.png -
检查TARGETS → Build Phases → Copy Bundle Resources 中,是否有
Main.storyboard
,如果没有就手动添加image.png