Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

iOS 13 Beta does not support Shortcut imports through AirDrop #217

Open
sarimarton opened this issue Jun 28, 2019 · 16 comments
Open

iOS 13 Beta does not support Shortcut imports through AirDrop #217

sarimarton opened this issue Jun 28, 2019 · 16 comments

Comments

@sarimarton
Copy link

I guess that's it then? :(

@joshfarrant
Copy link
Owner

We'll have to wait and see what happens in the full release. I did post on r/shortcuts a few weeks ago but didn't really find a good solution. I'd be interested to know if there is a workaround at the moment.

@mtpereira
Copy link

mtpereira commented Nov 17, 2019

Hi,

Apparently someone created a Siri Shortcut to import other Shortcuts from iCloud: https://www.icloud.com/shortcuts/f9acfff2a5e94138a6574498d22c2813 (found it at: https://www.reddit.com/r/shortcuts/comments/d738kr/ios13_importing_shortcuts_as_files_is_not/f2ngi2e/ )

I haven't tried it yet, I'll let you know once I do.

@n33kos
Copy link
Contributor

n33kos commented Nov 18, 2019

It looks like if you make an iCloud link out of the shortcut, you can import it by visiting the link in safari. I have verified this works, but you also need to go to security settings and enable "Allow Untrusted Shortcuts".

I haven't checked out the contents of the shortcut mtpereira posted but I assume it's just running Get File > Get Link To File. This worked for me 👍

@mtpereira
Copy link

It’s basically that, yes. It picks a file from iCloud, gets a link to it and opens it on Safari under a workflow://shortcuts URL.

@mtpereira
Copy link

On a similar note, does anyone know how to export a Shortcut to a file on iOS 13? All I can get are iCloud links, and for that reason I can't follow the "contributing" instructions. 😞

@n33kos
Copy link
Contributor

n33kos commented Nov 18, 2019

@mtpereira Im in the exact same situation, I haven’t found a way to send the shortcut over as a file instead of an “add shortcut” page.

I happened to find an output file in this comment: #6 (comment) which helped me find out what variables the action was expecting, but I’m not sure if that is the same output as the parsing function provided. The action I added did work though so presumably it’s close. Hopefully that will get you unblocked for now.

@joshfarrant
Copy link
Owner

This still works, as far as I can tell:

https://www.icloud.com/shortcuts/b7cf16f2de72470ab165f80c23efeb5a

It essentially just saves the shortcut as a file in iCloud, allowing you to then send it to yourself. I'm sure that shortcut could be improved to actually handle the sending of the file too. Once you've got it, stick it in the /shortcuts directory of the project and run node scripts/parse.js.

@mtpereira That shortcut to import a shortcut seems to work for me, which is great news! Thanks for linking it 👍

@mtpereira
Copy link

@joshfarrant To clarify my setup, my only iOS device is an iPhone, I'm developing on a Linux workstation.

So the way that I'm trying to get the Shortcut onto my workstation is by sharing it on my iPhone via Dropbox. The file that ends-up on Dropbox is actually and HTML file, and not a .shortcut file.

When I open an URL like the one you've shared on my workstation, it redirects me to the App Store, which isn't helpful on Linux. 😛

Is there any other way to export the Shortcuts? Thank you! 🙇‍♂️

@joshfarrant
Copy link
Owner

@mtpereira Ok, makes sense. Could you try opening that iCloud link I posted on your iPhone and importing the shortcut please. You'll get the following:

image

That Shortcut will save your selected Shortcuts to iCloud Drive. You can then open the Files app on your iPhone, find the saved Shortcuts, and share those files to Dropbox. Hopefully then you'll get Shortcuts in the correct format.

If that works, you may be able to edit the Shortcut linked above (on your iPhone, after you've imported it) to save the outputted file to Dropbox directly, which will make the process a bit quicker. I've not got Dropbox installed on my iPhone, so I can't test that I'm afraid.

Apologies if I've misunderstood your setup, or if that's what you've been trying!

@mtpereira
Copy link

@joshfarrant Oh I didn't understood that the Shortcut you had shared was actually to help me out on exporting them! 😅

The procedure you've explained works great! 😄 🎉

Thanks for the help! 🙇‍♂️

@joshfarrant
Copy link
Owner

No problem, glad that worked! 😄

@rlb222
Copy link

rlb222 commented Jun 2, 2020

This still works, as far as I can tell:

https://www.icloud.com/shortcuts/b7cf16f2de72470ab165f80c23efeb5a
I'm sure that shortcut could be improved to actually handle the sending of the file too.

I added email support to this "shortcut exporting" shortcut.
https://www.icloud.com/shortcuts/f779cc6b5367419c9acddb43221e313a

With this shortcut you can mail a shortcut(file) from your iOS device to an email address.
This takes care of step 2 of the contributing steps

@goranmoomin
Copy link

OK, so AFAIK iOS 14 b1 re-adds importing .shortcut files 👍

@a2
Copy link

a2 commented Jul 8, 2020

@pcr910303 iOS 14 b2 seems to have removed this? (Filed feedback FB7931973)

@the8tre
Copy link

the8tre commented Oct 24, 2020

Shortcuts can still be exported through the 'Backup Shortcuts To iCloud' shortcut:
https://www.icloud.com/shortcuts/f779cc6b5367419c9acddb43221e313a
(It now seems that the output is a xml plist instead of the previous bplist)

Shortcuts files can be imported with the 'Create iCloud Link' shortcut avaible here:
https://www.icloud.com/shortcuts/2dd8928b5e9a437ea893868f707aa6f3

Open the generated link with Safari to trigger the shortcut import.

@0xdevalias
Copy link

You may also find some benefit in something like this:

Originally posted by @0xdevalias in #683 (comment)

Looking a little closer at that shortcut, the main bit of functionality seems to basically be modifying the iCloud Share URL slightly:

Given a URL like this:

https://www.icloud.com/shortcuts/ABC12

It becomes:

https://www.icloud.com/shortcuts/api/records/ABC123

Then extracts the following from the JSON on that page:

  • the URL for the unsigned shortcut file (which is an 'Apple binary property list' file): fields -> shortcut -> value -> downloadURL
  • the name of the shortcut workflow: fields -> name -> value

We can then convert that binary plist file to XML or JSON using plutil (though when I tried the JSON format I got an error (invalid object in plist for destination format), so might have to stick to XML):

plutil -convert xml1 -e plist.xml -- the-downloaded-shortcut.plist

or

plutil -convert json -e plist.json -- the-downloaded-shortcut.plist

(Crossposted: https://www.reddit.com/r/shortcuts/comments/13h61hv/comment/jl4dw28/)

Originally posted by @0xdevalias in #683 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants