Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shortcut Signing (MacOS shortcuts cli) #147

Open
bbb651 opened this issue Jun 18, 2024 · 1 comment
Open

Shortcut Signing (MacOS shortcuts cli) #147

bbb651 opened this issue Jun 18, 2024 · 1 comment
Labels
apple-codesign apple-codesign crate and rcodesign CLI tool enhancement New feature or request

Comments

@bbb651
Copy link

bbb651 commented Jun 18, 2024

Since iOS 15, apple only allows shortcuts to be imported if they are signed, see this blog for more info. Importing a non-signed shortcut can currently only be done through a Mac with the shortcuts cli or a iOS 14- device through the "Get Link to File" action.
In addition, all shortcuts are encrypted as Apple Encrypted Archives when shared as files (my own observation, not sure if it's new in iOS 15 as I haven't tested a iOS 14- device, sharing through iCloud decrypts it)

❯ plistutil -f xml -i test.shortcut
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<string>AEA1</string>
</plist>

It would be really cool if this was supported, it can really bring to more shortcut sharing sites like RoutineHub and cool uses of shortcut generation.
My own use case is building a language that compiles to shortcuts, much like Cherri and other simallar shortcuts languages.
I can try and help with the implementation, although I don't own a Mac so reverse engineering is very difficult and I'm not sure where to start as I'm not familiar with the project.

Edit: Slight correction, I remember reading somewhere that even though the format is called "Apple Encrypted Archive" they're not actually cryptographically encrypted. They are actually signed though.

@indygreg indygreg added apple-codesign apple-codesign crate and rcodesign CLI tool enhancement New feature or request labels Nov 3, 2024
@indygreg
Copy link
Owner

indygreg commented Nov 3, 2024

I had no clue it was possible to sign shortcuts!

And I haven't heard of Apple Encrypted Archives. Presumably there's a way to sign these AEA entities.

https://theapplewiki.com/wiki/Apple_Encrypted_Archive has some details. A quick Internet search found https://github.com/0xilis/libshortcutsign, which is in the shortcut signing domain.

Presumably we'd want a pure Rust interface to do all this. It feels technically achievable. But I'm not going to have time for it anytime soon.

I would welcome contributions to implement missing functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apple-codesign apple-codesign crate and rcodesign CLI tool enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants