2

I’m writing an AppleScript which interfaces with the “System Preferences > Keyboard > Text” information and I wanted to know where the actual properties are being stored.

Hennes
  • 65,142

2 Answers2

3

Search ~/Library/Dictionaries/CoreDataUbiquitySupport/ for UserDictionary.db. Use "DB Browser for SQLite" app to view the .db file. Shortcuts are in the ZUSERDICTIONARYENTRY table, ZPHRASE and ZSHORTCUT are the columns you need.

2540625
  • 393
  • My text replacements disappeared after upgrading iOS and macOS. I was able to restore them from this file in Time Machine, and your suggestion of DB Browser app helped confirm I found the right set. Thanks. – 2540625 Jan 11 '18 at 18:01
2

~/Library/Dictionaries/CoreDataUbiquitySupport/

In that folder are multiple folders containing different databases. These are not directly editable .txt files but rather .db files. Though you can copy and paste the folders from a different Mac and it will expand your own text shortcuts database.