开发者

Error : Failed to load NSMainNibFile MainWindow

When I run my application, it logs out the following error:

Failed to load NSMainNibFile MainWindow.

What could 开发者_JAVA百科cause this?


Look in your main() function, usually in main.m. There should be a call to UIApplicationMain(). The last two arguments are the principal class and the application delegate class. These are often both nil, in which case the UIApplication will be the principal class and the delegate comes from the nib file specified by the NSMainNibFile key in the app's Info.plist file.

If you're getting the error above, it most likely means that the application can't find that file. Look at your app's Info.plist (or equivalently, the Main Interface setting under the Summary tab in the target's settings) and see what's specified for the main nib file. Make sure that there's a .xib file with that same base name (example: MainWindow.xib) in the project. Remember: the iOS filesystem is case-sensitive, so the file should be named exactly as it's specified in the Info.plist.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜