报错信息: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

相关文章:

  • 2021-12-10
  • 2022-12-23
  • 2022-12-23
  • 2021-04-25
  • 2022-02-13
  • 2021-09-24
  • 2022-12-23
  • 2021-09-15
猜你喜欢
  • 2021-08-26
  • 2022-01-21
  • 2022-12-23
  • 2021-04-23
  • 2021-12-26
  • 2022-02-20
相关资源
相似解决方案