How One Apple Programmer Got Apps Talking to Each Other

Just six months after joining Apple, Sal Soghoian's job was already on the line. In July of 1997, then-CEO Gil Amelio had just been ousted and the company's stock was plummeting. To right the ship, Apple brought Steve Jobs back as the company's interim CEO.

When Jobs took over, he went on a campaign to salvage Apple's remaining resources by hacking and slashing under-performing departments. The problem, Jobs said, was that Apple had lost its focus. The company was making too many products that people didn't want to buy. After years of leading innovation in the PC industry, the Macintosh's operating system had fallen behind its biggest competitor. "It used to be easy when we were 100 times better than Windows. But now that we're not, you don't know what to do," Jobs told the room. This was a big slap in the face—just two years earlier, Jobs had quipped that Microsoft "had no taste."

Soghoian in his San Francisco Bay Area home in front of an impressive WIRED magazine collection.

Phuc Pham for Wired

Soghoian didn't like that. As Apple's product manager of automation, he was tasked with finding new and clever ways to for users take tedious and repetitive tasks on the Mac—like organizing a bunch of files at once or resizing massive groups of photos—and write small bits of code to complete those tasks quickly.

"No, you're wrong," Soghoian told the notoriously brutal CEO. Jobs fired back: "And you are?"

"I'm Sal Soghoian, and you're wrong. My technology is better than Windows."

He was the first in the room to challenge Jobs on his accusations. To Soghoian, the CEO's harsh words were a direct attack on his work. "I sort of saw it as 'I might be this dog on my square yard of dirt, but I know every bit of that square yard and you're stepping on my yard," he says, "'I'm gonna bite your leg.'"

As it turns out, Jobs was gauging the room to see who was passionate enough about their work to fight for it. Those were the people he wanted to keep. Soghoian passed the test.

Soghoian is a guy who's built a long career creating technology that lets users hand the tedium of repetitive grunt work off to their computers in creative ways. In the early 2000s, he created a program that let Mac users turn clunky, multi-step tasks into something that could be run at any time with just a double click of the mouse. This process, and the field where Soghoian's excels, is known as PC automation. Nearly a decade after the original Automator app arrived on the Mac, a group of hungry iOS developers were inspired to hard-code a way for apps to share information between each other. The creation, which built upon Soghian's work, made iOS more elegant and useful. These days, Soghoian no longer works at Apple—his position was eliminated in 2016. The coder is now working with the software company The Omni Group, where he's applying his knowledge of automating repetitive tasks on the computer to make tools for a new generation of users.

Follow the Script

In 1993, Apple released AppleScript, a simplified language for controlling applications on the Mac. You couldn't build full applications with AppleScript, but it did let you write tiny bits of code that could command programs on your Mac to run repetitive tasks in the background so you could go focus on more important things.

Key to AppleScript's success was that it didn't rely on esoteric syntax; you could write scripts in something really close to plain English. Typing "tell application 'Microsoft Word' to quit" would cause Word to shut down—no hiccups. If you were feeling crafty, you could even write a script that turned your emails into to-do list items, or one that found all the files created on a given date and dropped them into a specific folder.

Apple co-founder Steve Wozniak says AppleScript "put incredible power in the hands of regular users without putting a lifetime of effort into this language."

The same year AppleScript was released, Soghoian copped a used Macintosh from a friend and started fiddling with scripts. Once he got the hang of it, he used it alongside his favorite design applications to whip up menus for bars and restaurants. He even wrote a script for Better Homes and Gardens to format all of its recipes for easy printing.

After mastering his craft, Soghoian started sharing his scripting chops with businesses looking to knock inefficiency out of their workplaces. "It's very empowering to give somebody that ability to suddenly change the way they work and enable them to do great, complex things to grow their business," he says.

Eventually his presentations caught Apple's attention, and in 1997 he was hired as the company's product manager of automation technologies. Wozniak got to know Soghoian at Apple, calling him "a combination of geek with mature sophistication."

Demo Days

Seven years later, Soghoian had a hunch about AppleScript's future. While it was a simple language, it still bore a complexity that kept it beyond the reach of casual Mac users. What it really needed was a simple graphical interface. Soghoian started mapping out an application that traded lines of code for buttons and icons. Users could use this simple tool on the Mac desktop to make scripts with a couple clicks of the mouse—much easier than writing out full phrases. He called the program Automator, and once it was built, he started pitching it to anyone at Apple who would listen. Nobody was biting.

Apple's annual Worldwide Developer Conference was coming up, and Jobs was prepping his crew for the big day. Soghoian tried working his way into the office where the group was meeting, hoping to give Jobs a demo, but he couldn't get in. So Soghoian camped out in the hallway from 10 am to 5 pm, vowing to stay put until he had a minute with Jobs.

'Sal has a true open source mentality of opening the computer up for normal people.'

Apple co-founder Steve Wozniak

As the CEO left the office, he saw Soghoian lingering and asked him what he wanted to talk about. Game face on, Soghoian told Jobs, "Automation, but for the rest of us." They scurried into the conference room for a private demo. In the upper left hand corner of Automator's window sat a grid of applications that worked with the program—you'd see things like Finder, Alarm, Mail, Pictures, Internet, and Music. Under each category was a list of all the functions Automator could make the apps complete. By selecting the functions one by one, you could string together as many commands as you wanted to build a little workflow. Anyone with a mouse could change the typefaces in a folder full of Word documents or build a playlist out of their 100 most-listened-to tracks in iTunes, all without typing a word of AppleScript.

Soghoian loaded a webpage in Safari filled with small thumbnails of family pictures. He opened Automator and dragged a few actions into the script builder, creating a set of actions that found the full-sized versions of the images on the site, loaded them in iPhoto, and burned them to a DVD, all in just a few seconds.

"Stop!" Jobs shouted. Just like that, he wanted it on every computer. "I want robots for icons."

A few months later, before Soghoian hopped on stage at WWDC 2004 to unveil his team's latest creation, he and Jobs ran through rehearsal after rehearsal, aiming for precision each time. "He'd tell me 'No, Saul, you want to do this,'" Soghoian says. "He never quite got my name right."

That June, Jobs announced the software and introduced Soghoian to the crowd at WWDC. "I'd like to invite Saul up on the stage, whom you all know."

Soghoian guided the crowd through the same demo he showed Jobs, the same way you proudly flaunted your elementary school art project to your parents before slapping it on the fridge.

It worked just the way Soghoian had hoped. He strutted off the WWDC stage with a smile on his face. The next day, he found a new name tag on his office door: "Saul, whom you all know."

Automator made its debut as part of Mac OS X Tiger on April 29, 2005, robot icon and all.

Tiny Tasks

By 2011, much of computing had shifted to mobile devices. After creating a few apps for iPhone, software developer Greg Pierce was itching for a better way to get things done on iOS.

At the time, iOS apps had no way to share information with each other. Even copying and pasting between apps was a hassle. Getting work done on the platform was a time-sucking, rather than time-saving, endeavor.

iOS didn't have a system dictionary, so if you were reading an article and didn't recognize a word, you'd have to highlight the word, copy it to the clipboard, switch apps, paste it into Google to search for the definition, then tap your way back to the article once you were done. To Pierce, that was too much of a hassle. He wanted to create a way for other developers to pull definitions straight from his dictionary app Terminology, hoping such an integration could add value to any iOS app.

After a few months of planning, he had a barebones language that allowed apps to share strings of text (word definitions, phone numbers) with each other, and tell another app what to do with that text. His method, now called x-callback-url, worked just fine, but it wasn't very useful without a base of apps it could work with. Marco Arment, a co-founder of Tumblr who had since moved to his own app, the read-it-later service Instapaper, jumped at the opportunity to incorporate the new code. After x-callback-url was plugged into both apps, you could highlight a word in Instapaper, tap on a menu item to look up a word, and you'd automatically be bounced into Terminology with the correct definition front and center.

Other developers had taken a swing at the concept, but Pierce was the first to develop a way to run multiple processes back-to-back, like relay runners passing a baton, so you could share chunks of text between several apps by just tapping a few buttons. With that, automation scripting had found its way to iOS.

Once their work was done, Pierce opened x-callback-url up to any developer eager to try it out. "Without that, it would've just been a clever integration between Instapaper and Terminology," Arment says. Instead, it became the de facto standard for getting apps—even big ones like Google Maps and Evernote—to share information with each other and process stuff in tandem.

David Barnard, founder of the software development company Contrast, saw x-callback-url and wanted to make an app that took full advantage of it. In December of 2011, he and Justin Youens released Launch Center, an app that lived in iOS's Notification Center and used x-callback-url to create a central control panel where all your most frequent actions, like speed-dialing your partner or quickly scheduling an event in your calendar, were always easily available for quick access.

Clever as it was, Apple rejected the app, saying it wasn't an approved use of the Notification Center. Barnard and Youens pushed through with Launch Center Pro, which ditched the Notification Center and moved those shortcuts to a grid that lived inside the app, like a productivity-focused home screen.

You can customize your grid with things like logging your review of the latest Westworld episode, jotting down a quick idea in a note-taking app, or jumping straight into that Trello board your coworkers keep bugging you about.

The pair had greater ambitions, though. In 2014, after Apple announced a ton of new tools for apps to work together in iOS 8, Barnard and Youens started brainstorming ways these tools could make their app better. Their plan was to find a way to run x-callback-urls in succession to create script-like actions. They had effectively dreamed up Automator for iOS, but their fear of being burned again by Apple's often convoluted and murky app approval process held them back from following through.

Looking back, Barnard says that was a strategic blunder.

The team behind Workflow didn't share those fears. In the winter of 2014, its app debuted on the App Store. It looked a lot like what you'd imagine Automator for iOS would be—to create a workflow, you'd select the actions you want, then drag and drop them together in a way that brought your tasks to completion. You could do things like send an ETA to a contact based on your current location, download all the pictures on a webpage, or quickly post photos to Instagram with all your favorite hashtags already included. If there was a task on your phone that took too much time and mental energy to do over and over again, there was a good chance you could try to automate it using Workflow. It even tied pieces together with x-callback-url.

Just over two years after the app's debut, Apple acquired Workflow and its team for an undisclosed amount of money. Apple hasn't been clear on why it bought Workflow, but Greg Pierce thinks it's promising for the future of automation. "Maybe we'll see something [in 2018] that gives people a platform to do more professional work," he says.

Barnard hopes that Apple takes the framework of Workflow and creates something like Automator for mobile devices. "As iPads and iPhones get used more and more for more and more things, it's inevitable that people will look for shortcuts," he says.

Detour Ahead

Soghoian knows people are looking for those shortcuts, so he's already working on the next iteration of user automation.

In October of 2016, he was let go from Apple after a nearly twenty-year stint at the company. No warning, no early signs. Apple just said his position didn't exist anymore. It's been thirteen years since Automator debuted on the Mac, and Soghoian's biggest champion at Apple, Steve Jobs, is gone.

He hasn't let that keep him down, though. "It's like anything, it's a change in something you've known for a long time," Soghoian says. "But I still have more work to do."

Despite vowing to take November of 2016 to himself, he quickly got to work when The Omni Group, a software development company that builds productivity apps for iOS and macOS, reached out for his expertise. The company's work syncs up with Soghoian's brain. Its apps give users a simple set of tools to organize their work with granular to-do lists, thorough outlines, and well-designed wireframes.

Soghoian says x-callback-url was a great start in bringing automation to iOS, but he thinks the next step is finding better ways for our devices to talk to each other. Things have changed since the early days of Automator and Workflow. Web-based productivity tools have accelerated the move to the cloud, where services like IFTTT and Zapier tie various services together. So Soghoian and The Omni Group are focused on bridging the gap between those web-based tools and the apps that live on your devices. The company has crafted a way for its apps to read JavaScript—a versatile and ubiquitous web-scripting language—so an automation script can run in Omni's macOS and iOS apps without any fuss.

Since JavaScript's use is so widespread, Omni's approach is a lot more flexible than x-callback-url. Also, installing an automation script in one of Omni's iOS apps is as simple as tapping a download link. Let's say you wanted to make a series of flowcharts for your next presentation. You could hop into Omnigraffle, Omni's diagram and illustration app, to draw each box individually, position it properly, and fill in the proper text. But that might take hours. Conversely, you could make an outline in outlining app OmniOutliner, then run a script you found online that turned each main bullet point into a flowchart box in Omnigraffle, with each sub-bullet becoming a bubble that's connected to the main item. Of course, it would all happen instantaneously.

"Automation becomes more useful when it gets faster and can respond to more types of events," says Omni Group CEO Ken Case. "It's the difference between building a project in your house with either a screwdriver or hammer and using both a screwdriver and a hammer."

Soghoian's convinced automation fills a continuing need in computing. His forced departure from Apple took him by surprise, but he thinks his work in the field is just getting started. "I'd like to be an old guy, looking back at things, and say I did something that made people's lives better, that they were able to control their destiny to some degree because of the work that I and people that I worked with produced," he says.

He's already done a lot to make that happen. Paul Kent, founder of the event consulting firm pKreative and former show manager for MacWorld, calls Soghoian the dean of automation. "He ate his own dog food, he lived amongst the community and championed them."


More WWDC 2018 Coverage

Read more: https://www.wired.com/story/soghoian-automation/

Leave a Reply

Your email address will not be published. Required fields are marked *