NSInternalInconsistencyException Could not load nib ind bundle

試著忘記壹切 提交于 2019-12-05 06:06:44

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

Manuel

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

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