如何解决:Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Could not find a storyboard named '***' in bundle NSBundle

该异常的原因是因为,在项目的Info.plist文件内指定了故事版的名字为Main.storyboard。但是,在实际运行时却无法找到对应的文件。

解决方案

  • 检查项目配置的INFOPLIST_FILE配置项,并找到该项对应的Info.plist文件。(同一个项目,可以根据编译的不同,使用不同的Info.plist文件。)
    如何解决:Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Could not find a storyboard named '***' in bundle NSBundle_第1张图片
    Snip20160527_9.png
  • 检查对应Info.plistUIMainStoryboardFile的值
    如何解决:Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Could not find a storyboard named '***' in bundle NSBundle_第2张图片
    Snip20160527_10.png
  • 检查在Build Phase中,是否已经将该故事版添加到Copy Bundle Resources
    如何解决:Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Could not find a storyboard named '***' in bundle NSBundle_第3张图片
    Snip20160527_13.png

你可能感兴趣的:(如何解决:Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Could not find a storyboard named '***' in bundle NSBundle)