29 auto dialogType = QCFType<CFStringRef>(CFPreferencesCopyAppValue(
30 CFSTR(
"DialogType"), CFSTR(
"com.apple.CrashReporter")));
32 auto stringCompare = [](CFStringRef str1, CFStringRef str2) ->
bool {
33 return CFStringCompare(str1, str2, kCFCompareCaseInsensitive) == kCFCompareEqualTo;
36 if (!dialogType || stringCompare(dialogType, CFSTR(
"basic"))) {
40 auto *runningApp = NSRunningApplication.currentApplication;
41 return runningApp && runningApp.activationPolicy == NSApplicationActivationPolicyRegular;
42 }
else if (stringCompare(dialogType, CFSTR(
"developer"))
43 || stringCompare(dialogType, CFSTR(
"crashreport"))) {