Jump to content
Vito Cheng

Mandarin Input Method

Recommended Posts

Vito Cheng

I have installed Niresh Catalina, but I can’t type mandarin on Safari, Apple TV app etc.

Share this post


Link to post
Share on other sites
DonellPatel

Figured this out!

 

If you look at the Console app when tying to type in a non-English input method (regardless of whether it's first party or third party), or invoke the Emoji picker (ctrl+cmd+space), you'll see sandboxing errors like this:

Quote

Sandbox: Notes (223) 

deny(1) mach-lookup com.apple.inputmethod.SCIM_Connection

deny(1) mach-lookup com.apple.CharacterPaletteIM_Connection

deny(1) mach-lookup com.sogou.inputmethod.sogou_Connection

 

To fix this, open Terminal and paste in the following command to mount your system volume as read-write.

Quote

sudo mount -uw /

 

Then you need to relaunch Finder. Press command+option+esc (or Apple Logo > Force Quit), find Finder in the list, and force restart it. Or run this in Terminal:

Quote

killall Finder

 

In Finder, click Go > Go to Folder (shift+command+G), then go to "/System/Library/Sandbox/Profiles".

 

Find the file named application.sb, then copy and paste it to your desktop. Open it in a text editor such as TextEdit, or Sublime Text. (BBEdit has compatibility problems on Niresh and isn't recommended.)

 

Scroll down, or search for the line:

Quote

(device-conforms-to "IOCDMedia"))))

 

Press return to make a new line after "(device-conforms-to "IOCDMedia"))))", and paste in the following text snippet. If you're manually typing this, make sure to turn off Smart Quotes, and check if the number of brackets match exactly what's shown here.

Quote

(allow mach-lookup
      (global-name-regex "com.*_Connection"))

 

Then, application.sb should look like this:

Quote

 ......

          (device-conforms-to "IODVDMedia")
           (device-conforms-to "IOCDMedia"))))
(allow mach-lookup
      (global-name-regex "com.*_Connection"))
(when (entitlement "com.apple.security.network.client")
      (allow network-outbound (remote ip))
......

 

Save the file (command+S).

 

Drag to copy the modified application.sb file from your Desktop into /System/Library/Sandbox/Profiles. Finder will ask if you want to replace the file, choose replace.

 

If you've correctly edited application.sb, input methods and the emoji picker should work correctly for any new sandboxed apps that were never launched before. However, you'll discover that you still can't use input methods in apps you've already launched before. To fix this, keep following along.

 

In Finder, click Go > Go to Folder (shift+command+G), then go to "~/Library/Containers". (There's a tilde '~' at the front. Don't miss it!)

 

Find the folder for the app in question. For example, Notes corresponds to "com.apple.Notes" here.

 

Quit the Notes app first. Then drag the "com.apple.Notes" folder to Trash, and Empty Trash. (You need to empty trash.)

 

This will force the system to rebuild the sandbox container for the app to take account the changes we made to application.sb.

 

Launch Notes again, then input methods and emoji picker should work correctly now! Repeat this for all other existing apps you had trouble getting input methods to work, and voila, everything works great!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...