Mocktail

Create 2D and 3D device-framed iOS screenshots using various device images sourced from Apple’s website (e.g., product landing pages or the online store). Mocktail applies perspective distortion to screenshots using Cloudinary, an online image manipulation API.

Get shortcut

Usage

Take a screenshot or select an existing one and run Mocktail from the Share Sheet. You can also drag-and-drop a screenshot onto the shortcut. If you run the shortcut normally, it retrieves the most recent 25 screenshots in your photo library for you to pick from.

Mocktail supports:

  • iPad Pro 12.9″ and iPad Pro 11″
  • iPad 10.2″ and iPad Air 10.5″
  • iPad 9.7″ and iPad mini
  • iPhone 11 Pro Max and iPhone XS Max
  • iPhone 11 Pro and iPhone XS
  • iPhone 11 and iPhone XR
  • iPhone SE (2020) and iPhone 8
  • iPhone 8 Plus
  • Apple Watch Series 4+ 40mm and 44mm
  • Apple Watch Series 0-3 38mm and 42mm

Where necessary, Mocktail uses the most recent device that matches the screenshot’s resolution.

Mocktail uses the image dimensions to automatically detect the appropriate device and the screenshot’s orientation, then presents a list of available base images. Select the base image to use and the mockup will be created. All mockups are saved to iCloud Drive.

The shortcut checks that the base images are available in iCloud Drive each time it’s run. If they are not present (e.g., first time running the shortcut, they’ve been deleted, or you’ve downloaded a newer version of the shortcut), it downloads them automatically.

Configuration

Mocktail uses Cloudinary’s upload and image manipulation APIs to apply perspective distortion to screenshots. Please note that Mocktail uploads your screenshots and base images to Cloudinary, if required.

You need to create a free Cloudinary account to use Mocktail. The free pricing tier is more than sufficient—you would need to run this shortcut several thousand times a month before you would exceed the free plan.

When you first launch the shortcut, provide the following information about your Cloudinary account which can be found in the Dashboard:

  • Username (your Cloudinary “cloud name”, not email address)
  • API key
  • Upload preset
Cloudinary account settings

By default, Cloudinary requires uploads to be signed with the account’s secret key. Mocktail doesn’t do this so you need to enable unsigned uploads and specify the upload preset in the shortcut.

Cloudinary upload preset

Base images

The following images are used by the shortcut to generate mockups. Images that require advanced manipulation use Cloudinary. Most images are JPEG but some are PNG with transparent background.

More information

Check out my blog post from the initial release of Mocktail that explains its functionality and how I created it in more detail.

Changelog

  • 2020-05-06
    • Add alert if the screenshot doesn’t match against any supported device
    • Add Continue in Shortcuts action to resolve an issue where running from the Share Sheet results in a crash
    • Fix a bug where some screenshots couldn’t be overlaid
    • Fix an issue where some transparency would appear in the screenshot when overlaid onto a device frame
  • 2020-05-04
    • Add base images for more devices:
      • iPad Pro Magic Keyboard
      • iPhone SE
      • iPhone 11
      • iPhone 11 Pro and iPhone 11 Pro Max
      • iPad 10.2″
    • Fix a number of bugs that would cause the shortcut to crash when run normally
    • Add version information
    • Migrate base images from GitHub and host directly on my site
    • Removed ability to process multiple screenshots

4 replies on “Mocktail”

Is there something wrong on my end? I keep “getting no key was provided to get the dictionary value action”.

Sorry it was because it was the wrong resolution. Also I cannot use the share sheet. When it gives me options, the share sheet just overlaps the whole thing.

This appears to be a bug in Shortcuts as it’s causing the shortcut to crash. I’ve updated the shortcut so it will switch to Shortcuts when you run it from the Share Sheet, allowing it to complete successfully. You’ll want to re-download the shortcut and try again.

Leave a Reply