NSInternalInconsistencyException Could not load nib ind bundle

余生长醉 提交于 2020-01-23 06:27:26

问题


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


回答1:


Right click your nib file in xcode and make sure its type is 'file.xib'.




回答2:


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...



来源:https://stackoverflow.com/questions/5401105/nsinternalinconsistencyexception-could-not-load-nib-ind-bundle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!