25 April 2017

how to force-refresh macOS text auto-expansions without turning off iCloud

One of the little niceties OSX has had for a while is the automatic synchronization of text-expansion shortcuts across all iCloud-enabled Apple devices (i.e. what you find in System Preferences -> Keyboard -> Text on Mac, and General -> Keyboard -> Text Replacement on iOS). Unfortunately Apple tries a bit too hard to make it look "magic", which means that there is nothing one can do when the magic somehow refuses to work.

In my case, I ended up in a situation where the mac had lost all shortcuts. Various people on the internet recommend turning iCloud Drive on and off to get them back, but that's a very disruptive step I didn't want to take.

Luckily, this worked for me:

  1. Open a command terminal
  2. rm -rf ~/Library/Mobile\ Documents/com~apple~TextInput
  3. Log off
  4. make a change to the list of expansions on some other device (e.g. iPhone)
  5. log back on
This seems to have forced a refresh, and got all my shortcuts back.

It would be nice if Apple provided some command-line tool to perform this sort of explicit management for iCloud elements. As the saying goes, cache invalidation is one of the hardest problems in Computer Science; in order to do the right thing, any system needs all the help it can get. I should be able to say "just blow all my settings for this feature and refresh from iCloud" or "these are the good settings, overwrite whatever is in iCloud for this feature". Magic is nice, but as the citizens of Troy found out so many years ago, it's better to have backup plans for when the gods are against you.

12 March 2017

A new Freestyle ...?

A bit of serendipity. Yesterday I noticed that hey, I barely charge my Bluetooth Kinesis Freestyle2 (which I reviewed here) once or twice per year. I duly tweeted about it, and the folks at Kinesis replied saying 4 to 6 months on a single charge is expected, which is awesome.

Then I went to their twitter page to follow their account, and there I discovered that they now have a kickstarter for a new Freestyle model, supposedly built for gamers. This looks awesome, in the sense that it addresses my few issues with the old model: the ability to program and remap keys, real mechanical switches, and backlighting.

It looks like the "first edition" pledges are US-only, but the simple preorders shipping in September are worldwide, so - go support the campaign! I did :)