Xcode 7无法找到名为的故事板 [英] Xcode 7 Could not find a storyboard named

查看:262
本文介绍了Xcode 7无法找到名为的故事板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将Xcode更新为7版后,无法构建我的应用程序。每次我在模拟器的其他版本和设备中构建时,都会出现此错误。干净的项目之后,我可以在设备上运行,但是如果我想再次运行,则会返回错误。

After update Xcode to 7 version, can't build my application. This error is every time when I build in simulator's other versions, and device. After clean project I can run on device, but if I want run again, the error is back.

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Could not find a storyboard named 'Main' in bundle NSBundle </private/var/mobile/Containers/Bundle/Application/43A262C3-81D4-4CF3-B727-AE670906234E/someexample.app> (loaded)'
    *** First throw call stack:
    (0x1852b422c 0x196f280e4 0x18a2f26b0 0x189fbdd48 0x189fbcee0 0x189fbb578 0x18daf53c8 0x18526bfc8 0x18526b0d0 0x1852696f4 0x185194f74 0x189d9c224 0x189d96d94 0x10016854c 0x1975d2a08)
    libc++abi.dylib: terminating with uncaught exception of type NSException

我尝试从目标主界面中删除并在AppDelegate中进行硬编码

I try to delete from targets "Main Interface" and hardcoding like this in AppDelegate

UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"Main" bundle: nil];
ViewController *yourController = (ViewController *)[mainStoryboard instantiateViewControllerWithIdentifier:@"StartVC"];
self.window.rootViewController = yourController;

我还有另一个错误,例如找不到故事板ID StartVC

and I have another error like can't find storyboard ID StartVC

你也有这个问题吗?

UPD:

尝试创建新的故事板并输入主界面并获得相同的错误

Try to create new storyboard and put in Main interface and get same error

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

UPD 2

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/devBot/Library/Developer/CoreSimulator/Devices/5018D9C0-9609-4368-A72C-488C67EBEFB5/data/Containers/Bundle/Application/9E485D40-7ED4-4996-942B-81A7C9E4DCA9/someapp.app> (loaded)' with name 'StartVC' and directory 'Main.storyboardc''

UPD 3

在Xcode 6.4中一切正常!我认为这是Xcode 7中的错误

In Xcode 6.4 all works fine! I think this is bug in Xcode 7

推荐答案

使用故事板引用在Xcode 7中遇到此问题。
可能是一个解决方案:

Got this problem with Xcode 7 using storyboard references. Probably a solution :


  • 修复文件检查器中每个故事板的本地化相同(基础,英语.. )。这可能是捆绑包的问题。

这篇关于Xcode 7无法找到名为的故事板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆