misc: add disableSuddenTermination in code
This commit is contained in:
parent
51ee11c149
commit
93f8150d2a
|
@ -66,6 +66,9 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
||||||
}
|
}
|
||||||
|
|
||||||
func applicationDidFinishLaunching(_ notification: Notification) {
|
func applicationDidFinishLaunching(_ notification: Notification) {
|
||||||
|
Logger.log("applicationDidFinishLaunching")
|
||||||
|
Logger.log("Appversion: \(AppVersionUtil.currentVersion) \(AppVersionUtil.currentBuild)")
|
||||||
|
ProcessInfo.processInfo.disableSuddenTermination()
|
||||||
// setup menu item first
|
// setup menu item first
|
||||||
statusItem = NSStatusBar.system.statusItem(withLength: statusItemLengthWithSpeed)
|
statusItem = NSStatusBar.system.statusItem(withLength: statusItemLengthWithSpeed)
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@
|
||||||
<true/>
|
<true/>
|
||||||
</dict>
|
</dict>
|
||||||
<key>NSHumanReadableCopyright</key>
|
<key>NSHumanReadableCopyright</key>
|
||||||
<string>Copyright © 2018年 yichengchen. All rights reserved.</string>
|
<string>Copyright © 2021年 yichengchen. All rights reserved.</string>
|
||||||
<key>NSMainStoryboardFile</key>
|
<key>NSMainStoryboardFile</key>
|
||||||
<string>Main</string>
|
<string>Main</string>
|
||||||
<key>NSPrincipalClass</key>
|
<key>NSPrincipalClass</key>
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#import "ProxyConfigHelper.h"
|
#import "ProxyConfigHelper.h"
|
||||||
int main(int argc, const char * argv[]) {
|
int main(int argc, const char * argv[]) {
|
||||||
@autoreleasepool {
|
@autoreleasepool {
|
||||||
|
[[NSProcessInfo processInfo] disableSuddenTermination];
|
||||||
[[ProxyConfigHelper new] run];
|
[[ProxyConfigHelper new] run];
|
||||||
NSLog(@"ProxyConfigHelper exit");
|
NSLog(@"ProxyConfigHelper exit");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue