Xcode 6.3:无法在捆绑中加载NIB [英] Xcode 6.3: Could not load NIB in bundle

查看:147
本文介绍了Xcode 6.3:无法在捆绑中加载NIB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Xcode 6.3(iOS 8.3 SDK)编译时,一些nib文件名最终会带有额外的 ~ipad ~iphone 在某些情况下。例如, ViewController~ipad.xib 变为 ViewController~ipad~ipad.nib 。这导致崩溃,因为应用程序不希望编译的nib文件具有双后缀。

When compiled using Xcode 6.3 (iOS 8.3 SDK), some nib filenames end up with an extra ~ipad or ~iphone in certain circumstances. For example, ViewController~ipad.xib becomes ViewController~ipad~ipad.nib. This is causing a crash because the app doesn't expect the compiled nib files to have the double suffix.

推荐答案

要解决此问题,请在Interface Builder中的任何受影响的文档中取消选中使用大小类。

这似乎是<$ c版本中的错误Xcode 6.3(以及iOS 8.3 SDK)附带$ c> ibtool 。它发生在以下情况:

This appears to be a bug in the version of ibtool included with Xcode 6.3 (and the iOS 8.3 SDK). It's happening in the following circumstances:


  • 你有一个特定于设备的输入文件 *〜(iphone | ipad) .xib 启用了大小类。

  • 您的部署目标是比iOS 8.0更早的版本。

  • You have a device-specific input file *~(iphone|ipad).xib with size classes enabled.
  • Your deployment target is anything older than iOS 8.0.

我能够在命令行上重现问题:

I was able to reproduce the problem on the command line:

xcrun --sdk iphonesimulator8.3 ibtool --minimum-deployment-target 7.0 --compile ViewController~ipad.nib ViewController~ipad.xib

如果您看到相同的行为,请复制此雷达这似乎是在最新的Xcode 6.4测试版中修复的。

If you're seeing the same behavior, please duplicate this radar. This appears to be fixed in the latest Xcode 6.4 beta.

这篇关于Xcode 6.3:无法在捆绑中加载NIB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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