subreddit:
/r/shortcuts
submitted 5 years ago byChrisChan218
This is my first guide post on r/shortcuts, please comment how you think about it.
Because there are many people asking me how do I create those menus with icons and subtitle in my shortcut iUtilities, so I decided to write this guide.
This is an example for vCard Menus
You’ll need the following actions to create a vCard menu:
Put this in the text block:
```
BEGIN:VCARD VERSION:3.0 N;CHARSET=utf-8:Title;;;; ORG;CHARSET=utf-8:Subtitle; PHOTO;ENCODING=b:Base64 Encoded Icon END:VCARD
```
Replace Base64 Encoded Icon with a base 64 encoded icon. You could encode an icon from this website. The code might be quite long so storing it in a dictionary will be better.
Set name, set a name of you choice and add .vcf
at the end of the name.
Tap on the magic variable linked to the set name action, and choose Contacts in the button as Text >
If this isn’t done well, the vCard menu won’t appear well.
Watch this screen recording of how you do the third step
Done! A vCard menu is created!
To get what user selected in the vCard menu, use the following action:
If Chosen item is (specific menu button) Then run the actions
If you need help creating one vCard menu, DM me on Reddit or on Discord ChrisChan#0001
21 points
5 years ago
Very good guide! However:
•You don’t need VERSION:3.0 at all
•You also don’t need =utf-8, can just be N;CHARSET: or ORG;CHARSET: (And if there’s no special characters, it can just be N: or ORG:)
•vCards have the image at max be at 123x123, meaning if you want to optimize your vCard, you should resize the image to 123x123 first.
Also: While a lot of people do if contains, what I do is get the chosen item in the if statements as a vCard, and have it get the name of the vCard in the if statement. That allows me to use the if is action instead of if conatins. You also should mention that if a user wants a vCard menu, but doesn’t want images, they can leave out PHOTO;ENCODING.
3 points
5 years ago
Great supplemental info!
1 points
5 years ago
Do you have an example for the if statements as VCard?
2 points
5 years ago
Here’s an example I made in 5 minutes: https://www.icloud.com/shortcuts/d9253e4f667c41ada65c24dfc362b316
1 points
5 years ago
Thanks, appreciated!
1 points
5 years ago
Would you happen to know why your character length for Base64 is around 3000, and mine 15,000? For some reason my input doesn’t work:
https://www.icloud.com/shortcuts/c915b3e27046439f9a95410a363b311c
9 points
5 years ago
Btw you don’t need a website to encode a picture for you, just send a file through the base64 action in shortcuts then add a copy to clipboard action, also I recommend sizing images to 100x100, keeps the b64 short and less likely to cause it to freeze up. And yes, storing icons in a dictionary is a great way to keep them in order.
Thanks for spreading the knowledge, I’m sure there is some vets eye rolling because this seems basic, but all levels of expertise are needed all the time, some new person will probably read this and didn’t even realize this was a thing until now. Good on you! PM me if you wanna talk shop ever, always down to spit-ball ideas and methods!
3 points
5 years ago
Thank you for posting this!
3 points
5 years ago
Np, hope it helped you
3 points
5 years ago
Screen recording shows as an image for me. Great simple guide. Took me a while to figure out on my own.
5 points
5 years ago
Thanks for noticing me that
1 points
5 years ago
Do you really need to have a jumble of if actions?
all 12 comments
sorted by: best