NSInternalInconsistencyException 无法加载 nib ind 包
我正在为 iPad 开发一个应用程序。该应用程序具有以下详细信息:
基础 SDK:4.2 部署目标:3.2
该应用程序是一个游戏应用程序,有 10 轮。
在每一轮中,我加载 6 个控制器,并且在每一轮完成后,相同的循环再次开始。
该应用程序在 4 轮之前工作正常,但在第 4 轮结束时,它崩溃并给出以下错误:
“NSInternalInconsistencyException 无法加载 nib ind 包:”
我已经检查了所有解决方案,例如检查 nib 文件名,检查 nib 文件路径。 Nib 文件名和 nib 文件路径都正确,目标也正确,但仍然崩溃。
对此的任何帮助将不胜感激。
谢谢,
夏姆
I am developing an application for the iPad. The application has following details:
Base SDK: 4.2
Deployment Target: 3.2
The application is a game application and it has got 10 rounds.
In each round I am loading 6 controllers and after the completion of each round again the same cycle starts.
The application works fine till 4 rounds but at the end of 4th round it crashes given following error:
"NSInternalInconsistencyException Could not load nib ind bundle:"
I have checked for everything solution like checking the nib file name, checking the nib file path. Nib file name and nib file path both are correct and targets are also correct but still it crashes.
Any help for this will be appreciated.
Thanks,
Shyam
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 xcode 中右键单击 nib 文件并确保其类型为“file.xib”。
Right click your nib file in xcode and make sure its type is 'file.xib'.
我也遇到了这个问题,就我而言,原因是我的项目没有意大利语本地化,但应用程序在“it”设置下运行。
模拟器默认将英语作为区域设置,一切正常,而实际设备有意大利语设置,因此应用程序在尝试加载 RootViewController 时立即崩溃,因为它正在寻找它的意大利语版本。
在 XCode 中,我向 RootViewController 添加了意大利语本地化版本(现在我在其下看到两个条目,一个用于默认创建的英语,一个用于意大利语)。请注意,您不需要在视图中进行真正的翻译,创建它并保留为默认值就足够了。 Xcode 会复制原始视图中的所有标签和文本,您暂时保持原样即可。
您必须为项目中的每个视图控制器执行此操作。请参阅 Apple 文档,了解有关国际化和本地化的说明此处。
作为解决方法,有些人可能更喜欢在执行测试时将设备区域设置更改为英语......
I had this problem too, in my case the cause was that my project had no localization to italian but the app was running under "it" settings.
The simulator has English as regional setting by default, everything was ok on it while the actual device had italian settings, so the app crashes immediately when attempting to load the RootViewController, because it was looking for an italian version of it.
In XCode I added an italian localized version to the RootViewController (now I see two entries under it, one for english created by default and italian). Note that you don't need to do the real translations in the view, it's enough that you create it and leave as default. Xcode copies all labels and text from the original view, you just leave as is for the moment.
You'll have to do this for each view controller in your project. Refer to Apple docs, for explanations on internationalization and localization here.
As a workaround, some people might prefer to change the device regional settings to English while performing tests...