macos – 当mac app崩溃时,CrashReporter对话框不会显示

我有一个Mac应用程序商店应用程序,它崩溃时默默地消失.它不会显示CrashReporter对话框,以便用户有机会向Apple报告崩溃.

我在多台机器上看到了相同的行为.有没有任何已知的原因可能发生这种情况?

根据TN2123

In addition, if the program that crashed is running as a logged in GUI
user, CrashReporter will present the user with a dialog asking them
whether they want to submit a bug report to Apple

“以登录GUI用户身份运行”是什么意思?窗户是否必须可见?

更新:

我正在阅读manpage for ReportCrash,并发现以下内容:

For application crashes (but not background process crashes)
ReportCrash will display a dialog notifying the user that the
application unexpectedly quit and offering to reopen the application
or send the report to Apple. For developers, the behavior of this
dialog can be adjusted using
/Developer/Applications/Utilities/CrashReporterPrefs.app which is
installed as part of the developer tools.

我运行了CrashReporterPrefs并将我的CrashReporter模式更改为Developer.当我运行应用程序并触发崩溃时,显示了CrashReporter对话框!

所以我想现在的问题是:“应用程序”崩溃和“后台进程”崩溃之间有什么区别?

最佳答案 如果您的应用使用LSUIElement或LSBackgroundOnly,则它是一个“后台进程”,用于确定是否显示崩溃报告器. (其他“后台进程”包括UNIX-land守护进程,例如Apache Web服务器,以及从SSH或telnet连接启动的进程.)

点赞