PCalc, James Thomson’s advanced calculator for iPhone and iPad, has been updated this week to version 3.8. I’ve been testing PCalc 3.8 for the past couple of months on my devices running iOS 12, and it features one of the best implementations of Siri shortcuts I’ve seen from a third-party developer yet. Even more than the app’s excellent widget, shortcuts have enabled me to integrate PCalc features into different aspects of my daily workflow, including conversations with Siri via my HomePods.

As I will detail in my upcoming iOS 12 review (and as I explained in a story back in June), there are two types of system shortcuts apps can donate to iOS 12. Basic “activity” shortcuts (based on the existing user activity framework) can launch apps into specific screens or activate specific features; more advanced app shortcuts (based on custom SiriKit intents) can perform native actions in the background without launching the app at all. In iOS 12, both types of shortcuts are available from Search, the lock screen, and the Shortcuts app; they can also be assigned a custom voice phrase to be triggered from Siri.

PCalc 3.8 supports both styles of shortcuts in iOS 12, and the way Thomson implemented creation and assignment of shortcuts from within PCalc should be a template for other developers to follow.

As you start using PCalc 3.8, operations you recently performed in the app will be suggested in Settings ⇾ Siri & Search ⇾ All Shortcuts; you will also be able to search for PCalc-specific shortcuts by title in Search. But this isn’t what I want to highlight for this update. Head over to PCalc’s own preferences, open the ‘Siri Shortcuts’ section, and you’ll be presented with a dashboard featuring activities you recently performed in the app (such as calculations or specific functions), shortcuts you’ve already assigned to Siri, and other custom shortcuts you can configure manually.

You can find PCalc’s shortcuts in Settings, but the app gives you more powerful options.

The real fun begins once you dig deeper into the ‘Custom Shortcuts’ section of PCalc. All of the app’s features – from standard commands such as assigning a value to x to functions and conversions – can be turned into shortcuts that either run in the background or open PCalc to perform the selected action. Each shortcut can be given a custom Siri phrase (by tapping the ‘+’ button next to its title), but you can also manually donate shortcuts to the system (i.e. they’ll be instantly made available in Settings and other places) by tapping on them.

And that’s not all: Thomson designed a shortcut creation UI that, through the use of segmented controls at the top, lets you set input and output values for each shortcut and choose whether the shortcut should execute in the background or launch PCalc.

Set up this way, PCalc shortcuts – whether in Siri or Search – can operate on the contents of the clipboard and return results without launching the app.

This system, developed by Thomson for creating multiple variations of the same shortcut inside PCalc, is why I believe other developers should treat PCalc 3.8 as a model to follow in the future. By default, app shortcuts in iOS 12 cannot accept any input from the user or produce results that are saved elseswhere; shortcuts are “fixed” actions that are invoked, executed, and dismissed without any kind of data flow. This wouldn’t have really worked for PCalc: as a calculator, the entire app is predicated upon the idea of letting users input data and expect results. So Thomson came up with a simple, ingenious idea: using the system clipboard as a global variable for input and output.

Spoilers: tax is always too much.

Upon creating a shortcut, PCalc 3.8 lets you choose whether it should perform an operation based on a number contained in the clipboard; you can also decide to save the result to the clipboard (overriding what you previously copied) or a variable. As in previous versions of the app, PCalc offers base x and y variables; in iOS 12, both variables can also become native shortcuts, which opens PCalc to some fascinating automation possibilities with the Shortcuts app.

Let me give you some examples of what you can do with shortcuts and PCalc 3.8. At a basic level, you can assign a custom Siri phrase to open a specific screen or feature of PCalc, such as the tape or registers. That’s convenient, but it’s not where the real power lies. Thanks to integration between the clipboard and shortcuts in PCalc, you can create shortcuts that, for instance, convert a number you previously copied from US Dollars to Euros. All you have to do is create a Currency shortcut that converts the clipboard from USD to EUR and give it a Siri activation phrase. Then, copy a number, invoke the shortcut by phrase, and Siri will provide you with a visual and spoken response provided by PCalc through the shortcut you just created.

Finally, an easy way to make me sound clever on podcasts with Americans.

These clipboard shortcuts work like magic, and they extend PCalc in a way that it almost becomes a native feature of Siri itself. I created a PCalc shortcut to calculate the Italian tax rate (22%) for a number I copied to the clipboard; I even have a whole set of shortcuts to convert from metric to imperial units (and vice versa). Thanks to iOS 12, these shortcuts are supported everywhere: I can ask Siri on my iPhone, iPad, Apple Watch, and HomePod to run a PCalc shortcut and the operation will be completed in less than two seconds, with the result saved to the clipboard on my iPhone. While the regular Siri experience supports some of these features (such as unit conversions) by default, Siri doesn’t understand what “a number from the clipboard means”. With PCalc 3.8, I can more easily integrate Siri conversions and operations into my routine because they can be triggered with a simple hotword without speaking a whole sentence (dictating long numbers is especially tricky for me because of my Italian accent).

Even better, PCalc’s shortcuts can be implemented as individual steps in the Shortcuts app and used to perform multiple operations in the background in a longer and more complex custom shortcut. Consider, for instance, this simple idea: you have a number that represents a currency value, which you want to convert to multiple currencies at once. With the regular Siri, you can’t ask the assistant to “convert 10 Euros to USD and GBP”; you have to ask your requests one after the other.

With PCalc 3.8 and the Shortcuts app, you can assemble a custom workflow that uses multiple app shortcuts and the clipboard to perform several calculations in a row, presenting a collection of results in a single response. Or perhaps you live in Europe and need to convert your reasonable metric units to “feet” and “inches” and “yards” for your American friends; with PCalc and Shortcuts, you can create a custom shortcut that presents you with a menu to choose the unit you want and runs the native shortcuts accordingly.

The custom PCalc shortcut runs entirely within Siri.

The idea of stacking multiple app shortcuts inside a single custom shortcut is one of the techniques I’m going to explore for this new generation of Siri apps and iOS automation. PCalc is a perfect example of how developers have worked around limitations of the current API using the clipboard as a way to exchange data across multiple steps; it’s not an elegant solution (I’d very much prefer to have real variables instead of a clipboard hack) but for now, it gets the job done. With this system, I can now integrate PCalc with all of my accounting and financial workflows without using URL schemes at all; even better, I can ask Siri to perform a series of operations with a single phrase and get a rich, personalized response back by the assistant.

Even though I don’t consider myself an advanced PCalc user (I mostly use the app for conversions and basic operations), I’ve grown to appreciate the convenience of running frequent calculations with Siri and I’ve started integrating PCalc with the Shortcuts app in some interesting ways. As a result of its adoption of Siri shortcuts in iOS 12, my overall usage of PCalc has increased: I don’t necessarily open the app more often, but I access native PCalc features either via Siri or Shortcuts from all of my devices.

This is the core philosophy behind Siri shortcuts in iOS 12, which developer James Thomson was able to perfectly adapt to PCalc with the amount of power and flexibility users expect from his app. PCalc 3.8 is a shining example of shortcut integration in iOS 12, and I highly recommend checking out the update on the App Store today.