Apple launched a feature called Shortcuts in 2018, an app that lets you write scripts for the iPhone.

One widely shared shortcut is called Police, which records police interactions and texts a predetermined contact that you've been pulled over.

It also sends a video of the encounter to your contact.

The creator says the shortcut can be adapted for other situations.

Apple launched a feature for Siri in 2018 called Shortcuts that lets you streamline tasks with a single Siri command, and now it's in the spotlight once again.

That's because one iPhone user created a shortcut that prompts your iPhone to record police interactions after saying the phrase: "Hey Siri, I'm getting pulled over." The app has begun circulating again recently as protests against police brutality have erupted across the United States in response to the death of George Floyd, a Black man who died after a white police officer knelt on his neck.

Robert Petersen of Arizona developed the shortcut, called Police, which monitors police interactions so you have a record of what happened.

Once the shortcut is installed and configured, you just have to say, for example, "Hey Siri, I'm getting pulled over." Then the program pauses music you may be playing, turns down the brightness on the iPhone, and turns on "do not disturb" mode.

It sends a quick text to a predetermined contact to tell them you've been pulled over, and it starts recording using the iPhone's front-facing camera. Once you've stopped recording, it can text or email the video to a different predetermined contact and save it to Dropbox.

To get it to work, you must first run another shortcut in the Shortcuts app, then open the "Settings" menu, choose "Shortcuts," and toggle the "Allow Unstrusted Shortcuts" switch.

"It seemed to me that if you're getting pulled over it couldn't hurt to have a recording of the incident," Petersen said to Business Insider in a direct message in 2018. "The police these days in many places have body cams, so this could be the civilian equivalent."

—DesiBAE aka Big Horchata (@sarcasticstyle) June 10, 2020

The idea of a hands-free mobile app for fraught interactions isn't new — since 2012, the American Civil Liberties Union and others have developed apps to record and livestream encounters with the police.

While he didn't base the shortcut on existing apps, Petersen said he was inspired by projects by digital-rights groups like the Electronic Frontier Foundation.

Petersen said that most responses he'd received after initially posting the shortcut in September 2018 had been positive and that some people had told him they want to adapt it to different potentially dangerous situations.

Some people "say they've had issues in the past with the police, and one woman planned on using the shortcut to help with a stalker issue she was having with an ex-boyfriend so that she could send her location to family quickly should anything occur," Petersen said.

"That's one of the great things about Shortcuts: Anyone can edit a shortcut someone else has made to suit their specific needs," he added.

With a little bit of logic and know-how, Shortcuts lets you stitch together several apps and create a script that can be activated by pressing a button or using Siri.

Of course, there are many other ways to use Shortcuts, too, like saving Instagram photos, sharing the song you're listening to, or creating a morning routine that activates your lights and plays a song.

You don't need to be a programmer to create your own shortcut

You can examine all the steps a shortcut takes and all the apps and services it uses — so you can be sure that the script isn't, say, uploading your data to a random server when you use a shortcut you didn't write. The entire recipe for the Police shortcut can be accessed in the Shortcuts app.

Petersen said he didn't have a background in programming but knew enough to get around and had written scripts for macOS in the past. He added that he was an Apple fan and was surprised that the company had introduced this kind of feature for power users given its tendency to keep things simple and locked down.

If you're interested in making your own shortcuts, Petersen has some advice.

"The platform has a lot of potential, and if you read the Apple user guides and consult with others on forums, or just look at how other people's shortcuts work and 'reverse engineer' them to your own needs, you can learn a lot quickly," he said.

You can download the Police shortcut here. Make sure you have the Shortcuts app installed.