捆绑包中的 NIB 名称为 MainWindow-iPad 丢失

发布于 2024-12-06 13:10:06 字数 910 浏览 2 评论 0原文

我有一个有 6 个选项卡的选项卡栏应用程序。当我调试并运行应用程序时,它会在控制台中给出以下消息而崩溃:

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/priyachaturvedi/Library/Application Support/iPhone Simulator/4.2/Applications/7C5CE523-A843-443A-9B0B-BDF2336EA7D0/Aljex Mobile-iPad.app> (loaded)' with name 'MainWindow-iPad''

我已经在以下链接中搜索到了答案

如何修复 iPhone 模拟器尝试启动不存在的笔尖的问题?

如何为本地化应用程序加载 XIB?

无法在捆绑包中加载 NIB

和许多其他内容,但对我来说没有任何作用。

任何人都知道为什么这会发生在我身上???

提前致谢 !!!

I have a Tab bar application having 6 tabs. When I debug and runthe app, it crashes by giving following message in console :

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/priyachaturvedi/Library/Application Support/iPhone Simulator/4.2/Applications/7C5CE523-A843-443A-9B0B-BDF2336EA7D0/Aljex Mobile-iPad.app> (loaded)' with name 'MainWindow-iPad''

I have already searched out the answersin the following links

How to fix iPhone Simulator trying to launch a Nib that isn't there?

How are XIBs loaded for localized apps?

and

Could not load NIB in bundle

and many other but nothing worked for me.

any one have any idea why this is happening to me???

Thanks in advance !!!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

把昨日还给我 2024-12-13 13:10:07

我也有同样的问题。我意识到,当您输入 xib 文件的名称时,它必须是“MainWindow-ipad”,并且应用程序目标文件中没有 xib 扩展名

I have the same problem too. I realise that when you enter the name of the xib file, it has to be "MainWindow-ipad" without the xib extension in your app targ

烟燃烟灭 2024-12-13 13:10:06

假设您已经检查过文件名等。所以我排除了文件名不匹配的假设。哪里可能有问题?您可能会错误地排除 MainWindow-iPad.xib 在构建(链接)期间复制到您的应用程序中。如何检查?

  1. 确保 MainWindow-iPad.xib 在您的项目中。
  2. 在项目的“产品”部分中,选择您的应用程序,然后在上下文菜单中选择“在 Finder 中显示”。在 Finder 的上下文菜单中选择显示包内容。确保您的 MainWindow-iPad.xib 在那里。如果不存在,请转到步骤 3。如果 MainWindow-iPad.xib 在包中,请仔细检查文件名,问题似乎是文件名不匹配。
  3. 如果您的项目中没有找到 MainWindow-iPad.xib,请选择它并确保检查器中目标的复选框未被取消选中。你可能错误地这样做了。选中此复选框并重建。

Suppose you already checked filenames and so on. So I exclude hypothesis of filenames mismatch. Where might be a problem? You might by mistake excluded MainWindow-iPad.xib from being copied into your app during build (linking) time. How to check that?

  1. Insure MainWindow-iPad.xib is in your project.
  2. In project in section Products select your app and in context menu choose Show in Finder. In Finder in context menu choose Show Package Contents. Ensure your MainWindow-iPad.xib is there. If it isn't there, go to step 3. If MainWindow-iPad.xib is in package, double check file names, the problem seems to be in filenames mismatch.
  3. If it isn't there find MainWindow-iPad.xib in your project, select it and ensure checkbox of your target in Inspector isn't deselected. You might did that by mistake. Check this checkbox and rebuild.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文