macOS select TextInputSource programmly sandbox violation
I use `TSMSelectInputSource` to select a Input Source, but result in a sandbox violation. The text input source icon in the statusbar was changed , but the desired text input source was not selected. That means the system just change the icon, but if I press some keys on the keyboard, the input source is just the previous one NOT the one I use `TSMSelectInputSource` to select.
Console log of sandboxd:
Sandbox: TextInputSourceM(68220) deny(1) mach-lookup com.apple.tsm.portname (per-pid)
Violation: deny(1) mach-lookup com.apple.tsm.portname (per-pid)
Process: TextInputSourceM [68220]
Path: /Users/andy/Library/Developer/Xcode/DerivedData/MyMacKit-axbcbtdwnqsmstekvhyehnslgeme/Build/Products/Debug/TextInputSourceMaster.app/Contents/MacOS/TextInputSourceMaster
Load Address: 0x10fe80000
Identifier: com.iamadman.textinputsourcemaster
Version: 6 (1.0)
Code Type: x86_64 (Native)
Parent Process: debugserver [68222]
Responsible: /Users/andy/Library/Developer/Xcode/DerivedData/MyMacKit-axbcbtdwnqsmstekvhyehnslgeme/Build/Products/Debug/TextInputSourceMaster.app/Contents/MacOS/TextInputSourceMaster
User ID: 501
Date/Time: 2023-04-07 15:52:06.851 GMT+8
OS Version: macOS 12.5 (21G72)
Release Type: User
Report Version: 8