简体   繁体   English

NSBundle.mainBundle()返回nil

[英]NSBundle.mainBundle() returns nil

I just reinstalled my mac and Xcode. 我刚刚重新安装了Mac和Xcode。 Then [NSBundle mainBundle] always returns nil for some reason I don't know. 然后[NSBundle mainBundle]总是由于某些[NSBundle mainBundle]原因返回nil。

Thank you very much! 非常感谢你!

Here is the screenshot of my debug pane: 这是我的调试窗格的屏幕截图:

在此处输入图片说明

You have built your code in release mode. 您已经在发布模式下构建了代码。 In release mode the debugger is unreliable. 在发布模式下,调试器不可靠。 Variables can be optimized away. 可以优化变量。 Switch to debug mode and try again. 切换到调试模式,然后重试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM