diff --git a/Squirrel.xcodeproj/project.pbxproj b/Squirrel.xcodeproj/project.pbxproj index 9e678f3df..67f9c2446 100644 --- a/Squirrel.xcodeproj/project.pbxproj +++ b/Squirrel.xcodeproj/project.pbxproj @@ -619,7 +619,6 @@ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", ); MACOSX_DEPLOYMENT_TARGET = 13.0; - OTHER_CODE_SIGN_FLAGS = "--deep"; OTHER_CPLUSPLUSFLAGS = ( "-DLEOPARD", "-DHAVE_CONFIG_H", @@ -672,7 +671,6 @@ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", ); MACOSX_DEPLOYMENT_TARGET = 13.0; - OTHER_CODE_SIGN_FLAGS = "--deep"; OTHER_CPLUSPLUSFLAGS = ( "-DLEOPARD", "-DHAVE_CONFIG_H", diff --git a/resources/Squirrel.entitlements b/resources/Squirrel.entitlements index 2b474cdbb..a69efddb0 100644 --- a/resources/Squirrel.entitlements +++ b/resources/Squirrel.entitlements @@ -2,6 +2,8 @@ + com.apple.security.temporary-exception.shared-preference.read-write + com.apple.security.temporary-exception.files.absolute-path.read-write /Library/Input Methods/Squirrel.app diff --git a/sources/InputSource.swift b/sources/InputSource.swift index f77e02d43..2f4b9cd21 100644 --- a/sources/InputSource.swift +++ b/sources/InputSource.swift @@ -10,8 +10,7 @@ import InputMethodKit final class SquirrelInstaller { enum InputMode: String, CaseIterable { - static let primary = Self.main - case main = "im.rime.inputmethod.Squirrel" + static let primary = Self.hant case hans = "im.rime.inputmethod.Squirrel.Hans" case hant = "im.rime.inputmethod.Squirrel.Hant" } @@ -77,8 +76,10 @@ final class SquirrelInstaller { let selectable = getBool(for: inputSource, key: kTISPropertyInputSourceIsSelectCapable), let selected = getBool(for: inputSource, key: kTISPropertyInputSourceIsSelected), enabled && selectable && !selected { - let error = TISSelectInputSource(inputSource) - print("Selection \(error == noErr ? "succeeds" : "fails") for input source: \(mode.rawValue)") + let error = TISSelectInputSource(inputSource) + print("Selection \(error == noErr ? "succeeds" : "fails") for input source: \(mode.rawValue)") + } else { + print("Failed to select \(mode.rawValue)") } } }