无法在捆绑中找到名为“Main”的故事板 [英] Could not find a storyboard named 'Main' in bundle

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

问题描述

我收到一个奇怪的错误:'尝试在真实的iOS设备上运行我的应用时,无法在捆绑NSBundle'中找到名为'Main'的故事板。

I'm getting a strange error: 'Could not find a storyboard named 'Main' in bundle NSBundle' when trying to run my app on a real iOS device.

我的目录中有文件,它在模拟器中运行正常。但是,在复制包资源部分中,文件 Main.storyboard 为红色。

I have the file in my directory, and it works fine in the simulator. However, in the Copy Bundle Resources section, the file Main.storyboard is red.

我已经尝试删除它并再次添加它,重新启动Xcode,清理构建等等但无济于事。这是我在Xcode中收到的警告:

I've tried removing it and adding it again, restarting Xcode, cleaning build, etc. with no avail. This is the warning I get in Xcode:

/Users/ajay/Documents/avx/avx/Base.lproj/Main.storyboard: Internationalization of /Users/ajay/Documents/avx/avx/Base.lproj/Main.storyboard is not available when compiling for targets before iOS 6.0


推荐答案

打开项目的info.plist并删除屏幕截图中显示的选定行

open the info.plist of your project and remove the selected row displayed in screenshot

如果您出现黑屏,请确保选择新的初始故事板作为主界面

If you get a black screen ensure your new initial storyboard is selected as your main interface

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

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