Skip to content
This repository was archived by the owner on Jun 10, 2022. It is now read-only.

Commit c633fd6

Browse files
committed
🎉 Initial commit: README notes on workflow file structure, icon color format, compatibility dialog
Fix dialog image
0 parents  commit c633fd6

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

README.md

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Shortcuts File Format
2+
Shortcuts are exported from the iOS 12 Shortcuts app with a `.shortcuts` extension. Workflows exported from the Workflows app use a `.wflow` extension, but share the same internal format.
3+
4+
## File Structure
5+
The format of a shortcut and a workflow file are the same – the file format does not seem to have changed going from the Workflow app to Apple’s iOS 12 Shortcuts app. Many strings remain prefixed with `WFWorkflow`.
6+
7+
The file is in a binary property list format. It’s possible to open it by transferring to a Mac and changing the file extension to `.plist`, where it can then be viewed in Xcode or other supported apps.
8+
9+
* `WFWorkflowClientVersion`: A number representing the version of the client app used to create the workflow (e.g. 700).
10+
* `WFWorkflowClientRelease`: A string representing the release semantic version of the client app used to create the workflow (e.g. “1.7.8” or “2.0.0”)
11+
* `WFWorkflowMinimumClientVersion`: An optional string representing the minimum client app version required to run the workflow (e.g. 411)
12+
* `WFWorkflowName`: An optional string name for the workflow. If this is not present, an imported workflow’s filename will be used
13+
* `WFWorkflowIcon`: An object containing:
14+
* `WFWorkflowIconStartColor`: A number representing color of the workflow’s icon, see below.
15+
* `WFWorkflowIconImageData`: Data
16+
* `WFWorkflowIconGlyphNumber`: A number
17+
* `WFWorkflowInputContentItemClasses`:
18+
* `WFWorkflowTypes`: An array of strings, representing the available usage types of the workflow, one or more of: `ActionExtension` (“Show in Share Sheet”, `NCWidget` (“Show in [Notification Center] Widget”) or `WatchKit` (watch availability, supported in the old Workflow app & Shortcuts during some iOS 12 betas)
19+
* `WFWorkflowActions`: Array of actions, each in the format:
20+
* `WFWorkflowActionIdentifier`: An action identifier string, formatted in reverse domain name notation, e.g. `is.workflow.actions.address`
21+
* `WFWorkflowActionParameters`: Array of parameters [String | Number | Object], each an identifier and a value
22+
23+
### Workflow Icon Start Color
24+
A number representing the start color of the workflow’s icon gradient. As an example, converting the value 4282601983 reveals an 8-digit hex color in the format RRGGBBAA, FF4351FF.
25+
26+
This seems to work for all colors tested, except for dark gray (255).
27+
28+
Shortcuts does not appear to support custom icon colours when a workflow edited on a Mac is opened on iOS – the colour will instead default to gray.
29+
30+
Colors available in Shortcuts and their respective values (liable to change):
31+
* Red: 4282601983
32+
* Dark Orange: 4251333119
33+
* Orange: 4271458815
34+
* Yellow: 4274264319
35+
* Green: 4292093695
36+
* Turquoise: 431817727
37+
* Cyan: 1440408063
38+
* Blue: 463140863
39+
* Navy: 946986751
40+
* Violet: 2071128575
41+
* Purple: 3679049983
42+
* Dark Gray: 255
43+
* Pink: 3980825855
44+
* Taupe: 3031607807
45+
* Gray: 2846468607
46+
47+
### Importing with a `WFWorkflowMinimumClientVersion` greater than the client version
48+
49+
In Shortcuts, importing a file with a `WFWorkflowMinimumClientVersion` that is greater than the client version will result in a warning dialog, shown below. The imported file can be duplicated or deleted, but not edited or executed.
50+
51+
![Shortcut Format Too New Dialog](Shortcut%20Format%20Too%20New%20Dialog.png)
52+
53+
**Shortcut Format Too New**
54+
55+
This shortcut cannot be opened because it was created on a newer version of the Shortcuts app.
56+
57+
Update Shortcuts [opens App Store] | OK
58+
59+
## Misc Notes
60+
* The last Workflow version was 1.7.8
61+
* The first Shortcuts version was 2.0.0

Shortcut Format Too New Dialog.png

95.3 KB
Loading

0 commit comments

Comments
 (0)