I want to import Apple text replacements from a text file. I want to import a large amount of shortcuts to the system so I am wondering if that is possible.
Best Answer
Select all the shortcuts you wish to export and drag them to a location in Finder. This will create a ‘Text Substitutions.plist’.
Move this file to another account/computer, then drag it back on top of the list to import the file.
Full details are provided by Apple in their support document on the matter:
In direct answer to the question title, the actual location used for storing substitutions is within the UserDictionary.db somewhere within ~/Library/Dictionaries/CoreDataUbiquitySupport/. This is not something you should modify manually. Also - since this data is iCloud backed - some versions and point in time it used an older storage method and API (iCloud Core Data) and now it's using a more modern key value store (CloudKit).
Keyboard shortcuts do sync between OS X and iOS. However, in my experience this has always been quite slow, with the Mac taking a long time to recognize keyboard shortcuts I added on the phone.
Turning the synchronization off would require disabling the syncing of documents and preferences, which would also disable quite a lot of things that should be synced, so this is not really an option.
It seems that shortcuts are stored in several locations on an iPhone. Some of these can be deleted (which is what happens when you delete a shortcut), but some of them can't. These not-really-deleted shortcuts then sync again to iCloud, causing your problems. There is an Apple Forum post detailing how to delete the shortcuts, that you might wanna try (on your own risk, though.)
Now, for some fixes:
You could change your shortcuts. E.g. having a prefix like ;; in front of your shortcuts would make sure you only expand what you really want to. Also, it's not that much effort for typing. Similarly, I use l@g for expanding my email-address, which doesn't make any problems since I never type l@ anywhere else. This could be called a workaround, but as it seems it's the only option that should work reliably.
Using TextExpander you should be able to configure the sync more easily. However, I don't have any experience with it, and I'd recommend the first solution.
Best Answer
Full details are provided by Apple in their support document on the matter:
In direct answer to the question title, the actual location used for storing substitutions is within the UserDictionary.db somewhere within
~/Library/Dictionaries/CoreDataUbiquitySupport/
. This is not something you should modify manually. Also - since this data is iCloud backed - some versions and point in time it used an older storage method and API (iCloud Core Data) and now it's using a more modern key value store (CloudKit).