Main // Dynamically get connection name from info.plist file.

This commit is contained in:
ShikiSuen 2022-09-05 14:38:53 +08:00
parent 3ca12542c2
commit fd1aee42d2
1 changed files with 5 additions and 1 deletions

View File

@ -11,7 +11,11 @@
import Cocoa
import InputMethodKit
let kConnectionName = "org.atelierInmu.inputmethod.vChewing_Connection"
guard let kConnectionName = Bundle.main.infoDictionary?["InputMethodConnectionName"] as? String
else {
NSLog("Fatal error: Failed from retrieving connection name from info.plist file.")
exit(-1)
}
switch max(CommandLine.arguments.count - 1, 0) {
case 0: break