News for hackers. Stuff that matters.
Re:Ask HN: Any way to program Siri Shortcuts in iOS 12 besid... by theli0nheart on Wednesday September 19, 2018 @01:03PM (#18025696)
I just did some sleuthing and it looks like you can create a shortcut using XML. :)

You can reverse engineer the format by creating an iCloud link to a shortcut. There's a JSON payload that that the shortcut permalink page requests. That payload contains a link to a binary plist which can be translated into XML (`plistutil -i shortcut.plist`).

Here's one I just generated that expands shortened URLs: https://gist.github.com/dlo/1217af3b86f363faf578aa23408c19ef

After you write your shortcut, encode it in binary plist format (using plistutil), and then upload that blob to a URL. Use the following scheme to import it into Shortcuts.app:

    workflow://import-workflow/?name=URL20%Expander&url=encodedUrl
Hope this helps!
Re:Ask HN: Any way to program Siri Shortcuts in iOS 12 besid... by yangl1996 on Wednesday September 19, 2018 @09:49PM (#18029147)
Thanks, that's really cool!