iOS 15 Compatibility: There is a bug in Shortcuts on iOS 15 that prevents syncing of your shortcut library from the Shortcuts to MFC Deck. Until this bug is resolved by Apple (FB9585913), MFC Deck will be unavailable to download from the App Store.

API

MFC Deck comes with over 30 custom actions to use in your own shortcuts. Learn also how to create rich cards with icons, text, backgrounds, and more by understanding the Card Result Format.

Custom Actions

MFC Deck exposes a number of custom actions to control MFC Deck from your own shortcuts.

IMPORTANT: Disabling Show When Run Action

In many of the MFC Deck actions, a Show When Run toggle will be automatically enabled when you drag a new action in a shortcut. Tap Show More and disable Show When Run to prevent the Shortcuts app from displaying a sheet that you must dismiss before running the action.

Disabling the Show When Run action setting.

Add Image

Adds an image to the MFC Deck Image Library. The name you provide to the action can be used in card results for displaying the image in your cards.

While MFC Deck automatically resizes the images to 512 x 512 pixels wide, it stores the full-resolution image on your iCloud account. Consider resizing the image before running the Add Image action to save additional space.

There appears to be a bug with Siri and Shortcuts where it returns a cached image if you call Add Image repeatedly. While the image is replaced each time, the cached image may be presented in Siri or Shortcuts results. Workaround is to view the card in MFC Deck.


Background Automations

This action gets and sets various preferences for Background Automations.

Details on this action are located in the Background Automations documentation here.


Background Automations Details

This action returns a dictionary containing all of the settings from Background Automations.

Details on this action are located in the Background Automations documentation here.


Create Card

This action programmatically adds a card to a deck in MFC Deck.

The MFC Deck Grid Creator shortcut uses this action to create an alphabetic grid of cards suitable for use with an NFC Deck.


Create Deck

This action programmatically creates a new deck in MFC Deck.


Create Tag

Creates a new tag in MFC Deck. Tags are assigned to cards in decks. A single tag may represent different cards spread across multiple decks.

Read the section on NFC Tags for more information on how to assign multiple actions to a single NFC tag.


Delete Card

Deletes a card from MFC Deck.


Delete Decks

Delete one or multiple decks from MFC Deck.


Delete Images

Delete one or multiple images from the MFC Deck Image Library


Delete Tags

Delete one or multiple tags from MFC Deck.


Display Card Result

Displays a properly formatted Card Result object. This can be used within Siri to display the response inline (i.e. no leaving Siri to open the Shortcuts app).

Siri response using MFC Deck


Get Card

Retrieves information about a card.

Card Details

A Card Details object is returned, which contains the following information about a card:


Get Current Deck

Returns information about the current deck.

Deck Details Object

This object has many of the same fields used when creating a new deck.


Get Deck

Retrieves a deck.


Get Decks

Returns is a list of deck detail objects for all of the decks in MFC Deck.


Get Default Deck

Retrieves the deck details object for the default deck.

Get Image

Retrieves an image from the MFC Image Library given its key.


Get Images

Returns the names of all images in the MFC Image Library.


Get MFC Deck Details

Gets various details about MFC Deck, including:


Get Tag

Retrieves information about a given tag.

Tag Details Object


Get Tags

Gets all tags in MFC Deck.


Get Triggers

Returns a list of all triggers in MFC Deck.

Trigger Details Object

NOTE: Remember that triggers run only on the device where they were created.


Open Deck

Opens MFC Deck to the supplied deck.


Refresh Cards

Update MFC Deck’s card views when returning to the app.


Reload Widgets

Reload the timelines of all iOS 14 Home screen widgets powered by MFC Deck.

NOTE: This action does not do anything on iOS 13 devices.


Run Card

Runs a card’s action and returns to an optional URL of your choice.


Set Current Deck

Sets the current deck in MFC Deck.


Set Default Deck

Sets the default deck in MFC Deck.


Start Monitoring

Opens MFC Deck and starts the Trigger Monitoring Server.


Stop Monitoring

Stops the trigger monitoring server.


Update Card Result

Updates the card result for the card given its tag name and deck.


Update Shortcuts

An action for use only with MFC Deck Helper, this action syncs your Shortcuts library into MFC Deck.


Update Trigger Result

Updates the result for a trigger. The result is not displayed like a card result, but it can be used as a parameter to the shortcut assigned to the trigger.


Card Result Format

The MFC Deck Card Result Format defines how your card is displayed in the MFC Deck app, voice responses in Siri, on Apple Watch, and in iOS 14 Home screen widgets. It is composed of a specially-formatted JSON dictionary. If you know how to write a HTML page, you already know how create a beautiful looking card for MFC Deck.

Refer to the example shortcuts to see how you can create simple or complicated Result objects for your cards.

Required Attributes

The JSON dictionary at its root must contain the following two fields:

{
	"mfcdeck": true,
	"version": 2
}

If you do not supply these attributes at the root level of your JSON dictionary, MFC Deck will not continue to process the file and will simply store it in the result field of your card.

Hello, World!

Lets create your first MFC Deck Result object. Download the following shortcut or follow the instructions below.

  1. Open Shortcuts.
  2. Tap the + button to create a new shortcut.
  3. Add a Text action. Alternatively, you can use a Dictionary action and format it to follow what the code below looks like.
  4. Paste the following code.
{
	"mfcdeck": true,
	"version": 2,
	"items": [
		"Hello, World!"
	]
}
  1. Add the Display Card action from MFC Deck.
  2. Run your shortcut.

Hello World Result

Result Format Fields

This section describes the fields you can specify in the MFC Deck Result object.

items

An array of items to display. Nested items are interpreted as alternating columns or rows of data to display in a card.

Root Level items

The items array located at the root level represents a stacked column of information. For those familiar with SwiftUI, this is a VStack. Consider the following example:

{
	"mfcdeck": true,
	"version": 2,
	"items": [
		"Hello, World!",
		"How are you doing today?",
		"What kind of card are you going to write?"
	]
}

The Result dictionary above will product a card that has the three text items stacked on top of each other.

Each item in the root items array is displayed on its own row.

If you specify a dictionary with its own items array, it’s contents will be interpreted as a row of information. For those familiar with SwiftUI, this is an HStack.

At the third level, a nested items array will be interpreted as a column of information. The fourth becomes a row. The fifth is another column and so on. Mastering how to organize nested items arrays is the key to creating beautiful-looking cards in MFC Deck.

Content String

A string as an item in an item’s array will be interpreted as a piece of text content to display.

Tokens

You can specify the following items to be replaced at display time.

Note: Not all tokens are available on all platforms.

Dictionary

An item in the items start can either be a string or a dictionary object.

Root-Level Dictionary

The root level dictionary object of a MFC Deck Result has the following unique fields:


URL Schemes

The following URL schemes are supported by MFC Deck:

open-deck

Opens a deck given its unique id:

mfcdeck://open-deck?id=142FC02F-8D8E-4A2B-8A3C-666E7F20337D

run-card

Runs a card given its unique id:

mfcdeck://run-card?id=142FC02F-8D8E-4A2B-8A3C-666E7F20337D

start-monitoring

Starts the trigger monitoring server.

mfcdeck://start-monitoring

stop-monitoring

Stops the trigger monitoring server.

mfcdeck://stop-monitoring


Exiting Shortcuts Properly

If users have the Return to MFC Deck preference enabled, MFC Deck will try to return to itself after running a shortcut. It does so by using x-callback-url. If your shortcut does not exit properly or if the user taps Cancel from a Choose From List or Choose From Menu action, the user will be thrown back to the iOS Home screen.

To prevent this from happening, it is recommended that you add a Quit, Exit, or Close option at the bottom of your menus. Attach an Exit Shortcut action to this menu item. Tapping this menu option will exit your shortcut properly and return the user back to MFC Deck.

Remember that the return value to your shortcut may be interpreted as an MFC Deck Card Result, so be aware of what you are returning when exiting your shortcut.

NOTE: If you do not want MFC Deck to open after running, instruct your users to add your shortcut to the list of excluded shortcuts in MFC Deck’ Settings.


Documentation Home | Table of Contents