Hyston blog
About • RSS

Shortcuts in ios 13.1

2019-09-30 03:09

Shortcuts is nothing but a frustration to use as programmer tool. I spent two hours writing simple script:

I can write this logic in c# in two minutes. Ten or fifteen, if include creating new project, adding references for reading files and parsing json, reading stackoverflow and making coffee. May be I should have used Scriptable for this, but I was slightly affraid to write a lot of code using just two hurting fingers. And shortcuts integration with scriptable is too slow, it takes at least a couple seconds to call script and get value back. Another issue with shortcuts for me: it just never has what I really need currently. I got clever idea to set down time when i get home until 20, when i put my son to sleep. Guess what? Downtime cannot be controlled by shortcuts.
Another example: overcast have action: Smart skip to next chapter. I wanted to check current time, dumb skip to next chapter, check current time again. If difference is more than 5 minutes, go back. Sounds simple, but, as I guess, callbacks to overcast are cached within one run and every time I call get current running time, I got same result regardless moved I to next chapter or not. Today I have tried to use NFC tags: same issue, sometimes they are working, sometimes iphone shows exception. As I understood, this is 13.1 error, but still this unreliability is annoying. It's like using linux.
Conclusion: never use shortcuts for something conditional, something that use numeric variables. Best way is just quickly tweak some system settings, one or two steps, like skipping next chapter on overcast, turning do not disturb or start timer. For these problems Shortcuts are perfect. upd: at least, in one thing I was wrong: if scriptable return too slow, add Script.complete(); at the end. This makes it way faster!


Next entry → ← Prev entry