Install wubi_pinyin w/ RIME

I. Install RIME for macOS (a.k.a. Squirrel)

brew cask install squirrel

Then reboot Mac.

II. Download RIME schema installation script

git clone https://github.com/rime/plum.git
cd plum
bash rime-install wubi pinyin-simp

III. Create custom configuration file

vim ~/Library/Rime/default.custom.yaml

Add content below:

patch:
  schema_list:
    - schema: wubi_pinyin
    - schema: luna_pinyin_simp

Then create a squirrel.custom.yaml in the same direction:

patch:
  style:
    color_scheme: mojave_dark
    horizontal: true

IV. Import personal database (if you have that before)

cp -r wubi86.userdb luna_pinyin.userdb ~/Library/Rime/

V. Set Squirrel as default input method

System Preferences - Keyboard - Input Sources

Switch to Squirrel, then Deploy.