Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Creating iOS 12 Shortcuts with JavaScript and Shortcuts JS (medium.com/joshfarrant)
20 points by joshfarrant on Nov 16, 2018 | hide | past | favorite | 6 comments


Hey HN!

I’m very excited to release something I’ve been working on for the last month-or-so, Shortcuts JS.

Since Shortcuts was released with iOS 12 earlier this year I’ve been really interested in the idea of building Shortcuts with code, rather than with the Shortcuts app. After a bit of hacking around I figured out a way to do it, and so started building Shortcuts JS.

Hopefully this is something that others find as useful as I do!

Happy to answer any questions!


Is there a way to search for shortcuts that are publicly shared via iCloud? There have been a few articles with lists of public shortcuts, but there's no equivalent of a directory or search engine for discovery of shortcuts or workflow automation ideas. A similar issue exists with iOS application-specific URLs for deep-linking on device.

We also need a guide for application developers who are exposing interfaces via URLs or Shortcuts, if only to recommend interface patterns that have proven valuable in many workflows.


Check out https://sharecuts.app It’s still invite only for uploading your own shortcuts, but there are many tagged examples for you to browse.


There's no official Shortcuts directory as far as I know. Others have tried to build their own directories, but they are very much opt-in solutions, rather than single global solutions.


How is this different from the Scriptable app ? That uses JS to interact with siri.


Scriptable allows you to run JS inside a Shortcut and interact with some of the devices APIs from within that JS.

Shortcuts JS allows you to build Shortcuts using JavaScript, which you can then Airdrop (or otherwise share) to your iOS device. That .shortcut file is then automatically imported into the Shortcuts app and the Shortcut you built with JS is then on the device exactly as if you’d have built it through the app. No JS ever runs on your phone using Shortcuts JS.

Shortcuts JS and Scriptable are solving different problems and don’t have any crossover at all.

Hope that helps clear it up!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: