Howto: Port Your Mac App to iPhone in Three Easy Steps

Marcus Fehn
4 min readFeb 21, 2016

--

Even context menus auto-port easily

Seeing how we are in the final stages of keeping Ulysses for iPhone away from our users’ iPhones, I thought now would be a good time to share with you some of the lessons we have learned from porting our Mac app to the small screen. The process is pretty straight forward, and anyone can do this in their spare-time, really, given they follow these three simple rules:

First, use Xcode from Apple, and most of the hard work will automatically be done. Just switch the build target from “Mac” to “iPhone”, and it’s practically all there, and you only need to clean up a little overhead.

Second, activate Auto-Layout, as this will automatically re-position all the UI elements for you (thus the name). In case you wonder: It’s necessary to re-position all elements, because of the smaller screens on iPhone, and the fact that users touch the screen — there’s no mouse, see. Just make sure to correctly tag and label every element, or Xcode wouldn’t know where to put it.

Third, make sure to always update to the latest development release of Apple’s iOS, so your app gets to benefit from all the latest features. This is kind of self-evident and obvious, but you do want your app to have all the latest bells and whistles, no?

Port in record time (read: almost no time)

With Ulysses, we followed these simple rules and were essentially able to port our Mac app to iPhone in less than two hours. We are using the final iPhone version for a couple of months now, shooting promotional videos and taking screenshots for our website and blog to advertise its upcoming App Store release.

One of the cool things with Xcode build targets and Auto-Layout, is how it takes care of even the most complicated conversions. Take the new Split View feature introduced in iOS9 as an example. This is essentially the Mac’s Full Screen view, and since we already had this in our Mac app, all we had to do was tick the aptly-named “cross-device feature” box next to the three lines of split-view code and let Xcode do its magic.

Or take the Medium export, which we introduced to our Mac app late last year. To port the exporter (no pun) to iPhone, all we had to do was — you guessed it — tick the “cross-device feature” box on these three lines, and that’s how pretty much all of the conversion was done. Only the Button Row turned out to be a bit trickier, since there’s no Mac equivalent, but gladly Apple has this covered with Virtual Keyboard Accessories (essentially, you select from a list of inputs and macros, and Xcode creates a selection of nice looking keyboard rows, and you just choose the one you find most fitting for your project).

Port fast, release… not so fast

Now, if it’s as easy as I make it sound, then why does it take us so long to finally release the iPhone version of our little plain text (!) writing app?

For starters, we’re sometimes rather stupid and don’t really know what we’re doing. For example, in late December I accidentally ticked both the “Android” and “Windows” boxes in Xcode’s build settings, and we had to spend three weeks talking with Google and Microsoft executives to force-remove Ulysses from their respective storefronts.

Then of course, we’re lazy. We slack a lot, just hanging in the office playing Counterstrike. We run our own dedicated server on a Mac Pro, and we even build our own maps and mods and stuff, which is really hard, since Source has no automated build tools as Xcode does.

Last not least: Artificial Release Delay, often also called Anticipation Extrapolation or, in layman’s terms, Excitement Build-Up. This is something we learned in Psychology class, and you may know it from your sex life. Essentially, you could finish whatever you’re doing way earlier, but the other party involved likes you to keep going. It’s sometimes mislabeled as the Gift Effect, because it’s similar to how we often love to anticipate gifts more than the actual gifts, but anyway; the point is, users love long development cycles, because they imply quality and thoroughness as well as fun and innovative new features, so we need to cater to that. Plus, if we would just churn out a new version every week (which we could), users would experience what is called Release Nausea or Version Fatigue, and they would move to a less-frequent updating competitor once they’re feeling better.

Good news?

The good news is, Ulysses for iPhone is nearing release. We can’t wait to share it with you, since we know from our month-long, first-hand experience, that it’s an awesome auto-port, which looks and feels right at home on the small screen. We’re really excited, and all that’s left to do now is raise the price and write release notes. Handy work. Sucks.

--

--