Scripting iOS

Last week Apple acquired automation workflow application Workflow. Of course there was a nice buzz around it and it was a big topic of conversation on various podcasts and websites.

This, of course, got me thinking about automation. I’ve always been a fan of open API’s and the ability to automate applications. We’ve also seen recently that Omni Group is opening up OmniGraffle to automation via JavaScript.

Back in 2010 x-callback-url was created as a way to allow applications to call into each other and return results so you could chain together calls to build custom workflows. Apps like Launch Center Pro and Workflow took advantage of x-callback-url to let you build those workflows and execute them. Now we have a bonafide standard, without a standard. The app ecosystem found a way to support automation without Apple’s help.

I’ve used Launch Center Pro but until recently I’d never used Workflow, and it’s pretty amazing. The Workflow guys did an amazing job creating a drag and drop UI for building what amounts to a program. Well worth a look.

So, this brings me to what I’ve been thinking about over the past few days. Given x-callback-url and App URL schemes in general it would be extremely cool to use those to create object hierarchies using JavaScript. Why JavaScript? Well, it’s native to iOS and applications can use the runtime. Given the advances made by the Workflow team why not take it one step further?

Allow applications to specify a  Scripting Dictionary or Type Library as part of the application bundle, this should allow runtime creation of objects. I know this isn’t rocket science and it’s been done many times over.

Short of adding support to the OS it would be pretty sweet if an App like Workflow, Launch Center Pro, or Pythonista would standardize on a way to parse a URL Scheme into an Object Hierarchy.

I’m going to use Evernote, Bear, Overcast, and Arrgly as examples.

What do you mean by Object Hierarchy?

That’s a good question. Here’s what I’m thinking. Since the Apps mentioned above all support URL Schemes we can derive an Object Hierarchy from them. Basically the beginning of a URI begins with a scheme. The scheme is the name. In the case of Evernote it’s evernote. Pretty simple, right?

Given the scheme name we follow that with a path. In the case of x-callback-url based URL schemes we will skip over that part and move to the second item in the path. This will be the action, or function, or the object we’re going to execute.


The above URL will tell Evernote to create a new note of type text with a title of “EC 3”. If we had a way to parse that in a runtime application we could present the user with an Object that has methods that take arguments, like this., title)

Let’s do a couple for Bear. First the URL Scheme.


Now translated into code

bear.create(title, text, tags)

Overcast URL Scheme.




And finally, my favorite, Arrgly URL Scheme.


Arrgly Code


Pretty simple to turn all of those into objects. When I say you can create a hierarchy it means you could, by convention, lump groups of actions into objects, or like the above examples have a set of actions that all live on a single object.

Here’s what a object might look like as a URL Scheme.


That would result in using it like this


Of course this need more fleshing out and it would require app developers to decide on a well known convention to make it work as expected, but it could be done with a bit time and effort. It could be these become an extension of the x-callback-url specification?

Movie Line of the Week Answer

Good morning!

We had a couple of guesses, but our BIG WINNER is Mr. Steven Vore. Congratulations, Steven!

Where do I send the $10,000.00 prize?

The correct answer was:


Movie Line of the Week

Roll Film

Roll Film

I haven’t thought about posting one of these for quite a while. There was a time when I posted a new movie line every Thursday for years on end. It was fun, but at some point I stopped doing.

Yesterday I heard from a friend on Twitter, he said he missed them. Guess it’s time to bring it back?

Here’s the line, good luck!

“You’re gonna need a bigger boat.”

Send your guess.

MacBook Monster

I listen to a podcast called Accidental Tech Podcast. If you’re a Mac or iOS Developer you’ve probably heard of it or you’ve heard of one or more of its hosts. One of their ongoing topics of conversation is Apple’s apparent lack of focus on the Pro market. It’s true Apple has become very focused on more consumer oriented products, like the iPhone. I mean, who wouldn’t? When you look at the numbers it makes total sense.

When Apple announces results sites like Six Colors do a great job breaking down all the numbers and, in Six Colors case, they make really awesome charts! Just look at this one from January of 2015.

Awesome Six Colors Revenue Chart

Awesome Six Colors Revenue Chart

Who can blame Apple for spending most of their time on the iPhone? Look at those numbers. They’re stunning. It’s not to say the Mac or iPad are losers, they’re not. Most companies would give anything to have one product doing so well, Apple has at least four; iPhone, iPad, Mac, and Watch. Most likely someone will write in to let me know I’ve missed one, or I’m wrong about something, but you get the point. Apple is killing it, on multiple fronts.

What about Pros?

Much of the consternation from the ATP guys revolves around the Mac Pro. Who can blame them? Apple hasn’t shipped a new model since 2013. The hardware is now embarrassingly outdated and is due for a much needed refresh.

As a developer I can understand their need for Phenominal Cosmic Power! But they’re stuck with an Ity Bity Living Space. Not fun.

I’d love to see Apple pull together a great new piece of hardware that includes all the latest, greatest, internals and really appease the Professional Apple Workstation crowd. This would include filmmakers, photographers, designers of all kinds, the CAD folks, and, of course, Software Engineers of all kinds. On my list of nice to haves would be a box large enough to hold multiple multiple core processors (say 256 cores, why not? Windows can do it), tons of RAM, and a killer external bus system to allow folks to chain together external GPU’s. That would be a really great computer, don’t you think? Maybe the base configuration is the most popular, but it sure would be nice to be able to take a Mac and macOS to an extreme level.

Having said all of that, as a Professional Developer I’d prefer a really great Portable Workstation.  What is that? Well, it’s a desktop replacement in a laptop form. Apple is obsessed with making everything thinner and lighter. I do appreciate that, I really do. My first MacBook Pro was a lovely 17-inch beauty, but it was big. Not only heavy, but it was long enough that it was difficult to find a decent backpack to carry it in. Let’s just look at the weight alone, it was 6.6 pounds.

I remember carrying that thing around my first WWDC in 2011. Early morning to late afternoon. Yes, I got tired of carrying it, but it wasn’t a hardship. I would happily trade a bit of weight for a super powerful MacBook Pro.

I read an article recently on the new Dell Precision 5520 on Windows Central. This thing is a beast.

“Besides the big Core processors, all of which are the last generation “Skylake” variants, there is the big kahuna with the Xeon E3-1505M v6. Introduced this year, this Intel Xeon is a quad-core processor with support for ECC memory, 8MB of cache (up from the usual 6MB in a consumer Core i7), and a slightly higher base clock rate of 3.00 GHz with Turbo up to 4.00 GHz. These specs make it one of the fastest mobile processors around, besting the Core i7-7700HQ found in the XPS 15 (9560) by 200MHz.”

Yes, you read that right. This laptop can be configured with a Xeon processor, not to mention 32GB of RAM. That is professional sized horsepower in a small package. This is what I’d like to see from Apple. A true high-end Portable Workstation. Oh, and do you remember the weight of that old 17-inch MacBook Pro I mentioned above? Yes, 6.6 pounds. This Dell weighs 4.56 pounds. Compare that to the new 15-inch MacBook Pro which weighs 4.02 pounds. It’s not that big a difference.

I’d love to have this kind of power wrapped in Apple’s design ascetic. Oh, it should only come in one color. Black.

My Young Apprentice

New York Times: “Struggling to fill jobs in the Charlotte plant, Siemens in 2011 created an apprenticeship program for seniors at local high schools that combines four years of on-the-job training with an associate degree in mechatronics from nearby Central Piedmont Community College. When they finish, graduates have no student loans and earn more than $50,000 a year.”

What a great idea. Not all of us are cut out for college and finding a high paying job when you don’t have an education is next to impossible. This is a great alternative.

Work Note: git flow feature start fails

This morning I was creating a new branch to start work on a new feature and I use git flow.

To start a new feature you type…

git flow feature start FeatureName

After typing that and pressing enter git flow complained that it was initialized and I should run the command…

git flow init

I’ve been working in this same environment for two years. I know git flow is configured, but like a good automaton I followed the directions. Of course, you can guess what happened, right? Yep, git flow init says “Hey, you’re good to go!”

I wasn’t. My commands still failed with the same message.

Luckily there is a fix.

Yep, that’s right, cd into the .git directory for that repository and remove all git flow references from your git config file. Then run git flow init. All better.

Apple Professionals Group – Part II

I just saw one of Intel’s new commercials. It claims 98% of the Cloud runs on Intel. I have no reason to doubt that, but it did bring me back to thinking about Apple.

With each passing year Apple introduces newer and faster A-Series processors. They’ve also introduced a new recycling program. When they receive phones, or other devices, through the program they take them apart. Why not use those old processors?

More What Ifs

Hello, Dr. Jones.I know, all I do is ask questions, but it’s fun to ask these types of questions. Why doesn’t Apple go about building servers using older tech? That’s right. Take the components pulled from, say, an iPhone 5s and put them to use in a small blade server that accepts daughter cards with a few A7 chips on them?

Think about running a stripped down version of macOS, or a pumped up version of iOS, on these servers. We know the two OS’es share a common core. Build some experimental hardware that is scalable by adding more cores via daughter cards(blades?) and see how they perform when used as web servers. Could you still serve up expected performance? I don’t know, but I’d imagine most things are I/O bound, network bound, or bound by poorly written software.

I know Apple doesn’t really care about server hardware, and why would they, it would be another fun thought experiment to create something like this. Why not, Apple has the money to spend on some fun and potentially useful technology that is also good for the environment.

Apple Professionals Group

A wonderful bouquet of flowers.I wrote down some thoughts a couple weeks back and thought I’d throw them up here. It’s mainly a bunch of questions with some ideas. Unlike a small group of Professionals I don’t need the stuff I talk about here. I’m perfectly happy with my work 2014 MacBook Pro and my 2011 MacBook Pro. Both computers are plenty powerful enough for iOS Development. Here are the thoughts.

Why doesn’t Apple create a Professionals Group dedicated to developing a lineup of serious Pro computers and software? Maybe it moves a bit more slowly than the rest of the company? Maybe you get a computer every two to three years, but it’s at the top of the range, always. Maybe the computers are completely upgradable and modular. Something like we’ve never seen Apple create.

Laptops with “bigger” bodies (think late 2014 15in MacBook Pro), with faster processors and lots of RAM. Maybe you can only get one type of laptop? E.G. 15in MacBook Awesome with the newest Core i7, 32GB RAM, and a 1TB drive, plus a discrete graphics card of some kind driving their already awesome Retina Display.

Think of a more rectangular Mac Pro. One you could open and add RAM, processors, and drives to, easily. Maybe there is a way to plug “modules” into the front and back to the device without cracking the case? Maybe the case is the size of a Mac Mini, but is stackable so you can add additional units Toolbeltthat extend processing power. E.G. pop off a small cover on the top that exposes a slot that the next “Mini” looking device sits right on top of. Oh, how about extending the iMac using these “modules”? That would give us a 5k display and give Pros the ability to scale it up from the base model. Maybe the primary “motherboard” is just a beautifully designed Apple Bus that allows that. Would it be difficult? I’d image it would, but isn’t that what Apple does? They find unique solutions to difficult problems.

Oh, how about creating a professional level display that is also a touchscreen and is on a swivel like the new Microsoft Surface Studio? Why not make it a standalone display that connects to one of these new Mac Pro bases and could also be used with a MacBook Awesome? Super high end stuff.

Apple has billions in the bank. Why not go out on a limb to advance computing down some crazy road with a small group of dedicated hardware, software, and design professionals targeting professionals?

Look. I’m not the ultimate target of such specialized hardware. It would be professionals making movies and dealing with big honking problems. As an iOS Developer I’m fine with a laptop, but I’d sure like to see Apple strike out to create something truly wonderful. Something that changes the computing game, again. This time in the favor of professionals.

Wouldn’t it be cool if they’ve been doing this all along and they just haven’t finished? That would be awesome.

I know this isn’t the type of thing Apple does, but look at what’s possible.

Here’s the Acer Predator line of gaming laptops. Extreme? You bet. But all the same, super powerful portable computers.

How about Project Valerie?

Beloved Hedwig.I’m sure a lot of the loudest of critics would pick these apart: “Oh, they’re too heavy”, “They’re ugly”, blah, blah, blah. Sure on all points. But they’re high performance devices from people thinking outside of the box. They’re not constrained by “Lighter and thinner” at all costs. Imagine what Apple might be able to do if they were willing to make something a bit heavier. Maybe they could so something really special. I don’t think we’ll ever find out. I have a feeling Apple is going to keep making the Mac thinner and lighter until they are so close to the iPad the Mac no longer matters.

Then Apple will stop selling the Mac.

Passion Project: Update #2

Back in November I talked a bit about my passion project. I’ve rewritten the Pharmacokinetics Math library for RxCalc in C++ and I’m rewriting the UI completely in Swift. It’s been a real blast. My November update talked about bringing C++ and Swift together with a tiny layer of Objective-C++.

Over my holiday break I didn’t code as much as I wanted to, but I did manage to get some done. Since returning to my day job I’ve felt a bit more excited about working on the RxCalc update at night. I don’t know why, I just have.

I now have the new mixed Swift, Objective-C++, C++ based app in a working state, but I have a lot of polishing to do as well as adding some new features. Of the remaining 1.x features I have to implement is Options. Once that is complete I’ll move on to adding IAP, Theme, and 3D Touch support.

I really love working in Swift. The code base feels so tiny compared to its Objective-C counterpart. Not that Objective-C is bad, just different.

Next up? The Android version. For that I need to spend some quality time with JNI.

I’m not in any shape to ship this release, but it’s getting close by the day.

iMore – Best paid iPhone Apps

iMore: “I decided to include apps that you must pay for up front or apps that might be free to download, but a subscription is needed or their functionality is greatly enhanced by making an in-app purchase or by buying the paid version. I also eliminated iOS apps that might be totally awesome, but are better suited to iPad”

I use a few on the list and I’d like to add a few more.

The apps on the list I use:

  • 1Password – This app is a life saver, and it’s cross platform; Mac/iOS, Windows, and Android.
  • Fantastical – Great visual style and it uses natural language to create events. Also available for Mac, iPad and Watch
  • Deliveries – It does one thing and does it well; tracks your deliveries. Also available for Mac.

Here are some I’d like to add:

  • Twitterrific – I’ve been using this for years. It’s a beautifully designed Twitter client for iOS.
  • Evernote – I call this my digital brain. I have all kinds of stuff stored in Evernote. I like their iOS App and it’s also available for Mac, Android, and Windows. The Web Clipper is extremely useful.
  • Reeder – My favorite RSS Reader. Also available for Mac.
« Older posts

© 2017 Rob Fahrni

Theme by Anders NorenUp ↑