Some thoughts on Xcode on iPad

There's been talk for a few years now about Xcode potentially coming to iOS.

Playgrounds could obviously be a step in that direction (although Apple could also use it just to give people a taste of Swift, and then convert them to macOS). Some people have well-founded doubts about whether iPad will ever be the right environment for development. As for me, it's #1 on my personal WWDC 2018 wishlist.

Talking to people online and IRL, I thought I'd write out some thoughts around why Apple should do this, and why I think they haven't done it yet.

--

First: why would Apple, from a business point of view, want Xcode to exist on iOS?

It is undeniably a significant investment of time and resources. Apple would be right in asking "where's the return?" in order to prioritize it against other ideas. Will it bring be an influx of new developers or have most people with an interest in app development already bought a Mac? If there is untapped market potential, will having these additional developers in an already crowded iOS app marketplace give a net positive benefit to Apple? Will having iOS Xcode sell more iPads to developers, or will it simply hurt Mac sales? Will it result in higher quality iOS apps, in return lifting iOS device sales?

In terms of volume and revenue, iOS has long surpassed macOS as Apple's primary computing platform. The fact that only Mac users are able to develop apps for iOS users limits the potential of the App Store, and the iOS platform as a whole. Xcode continues to serve as the last umbellical cord tying iOS to macOS, which also somewhat limits Apple's business options for macOS. Personally, I think they plan to revamp macOS rather than kill it off anytime soon - but "we need it for developers" is a bad reason to have to keep macOS around.

As I have argued in another post, the macOS user community and application marketplace would look quite different if a majority of hobbyist users and low-computing-effort professionals (writers, teachers, ...) would leave the macOS platform in favor of iOS. The group of users who would stay behind would be more the high-end professionals: video editors, 3D modelers, VR developers, ... Bringing Xcode to iOS would add a significant portion of iOS developers to that macOS exodus by providing them a new home on iOS.

There is an argument to be made that letting iOS developers do their own work within iOS will lead to better iOS apps. Outside of Apple itself, developers are the group of people that most define the user experience on iOS. Yet they spend the majority of their time inside macOS, a fundamentally different environment with different user interface paradigms. Bringing them over to iOS forces them to fully dogfood the iOS experience and could lift iOS app thoughtfulness.

All said and done, I think there are both good reasons for Apple to bring Xcode to iPad, and enough writing on the wall that suggests they are doing so. There is Playgrounds. There is Tim Cook's repeated assertions that Apple wants to bring programming to the masses. There is the fact that the Xcode 9 source editor was re-written from the ground up. There is the release of the Files app, which would have been a prerequisite to do serious coding on iOS. There is the acquisition of WorkflowHQ, which may not link to Xcode directly but indicates there is at least an interest in positioning iOS more seriously as an automation and development platform. All of it is circumstantial, but it points in roughly the same direction.

--

So why haven't they done it yet? You'd have to ask Craig Federighi to be sure, but I'll make an educated guess about some key reasons.

First, plain old team priorities. The dev tools team has had quite the full plate in the past 5 years. Developing Swift from the ground up, double-maintaining a lot of Xcode features to work well on both Swift and Objective-C, adding a bunch of runtime analytics features, while also adding watchOS and tvOS as target platforms. Unless they scaled up that team to be roughly 4 times as big as it was in 2013, it's hard to imagine this team still having the time to develop a complete iOS version in parallel to the Mac version.

Second (though related to first), the Objective-C dilemma. It would not surprise me if they make iOS Xcode a Swift-only environment, limiting Objective-C to the macOS version. Building larger, more complex apps or maintaining existing apps can be done on the Mac, positioning iOS Xcode as an environment for smaller and newer apps, i.e. Swift's sweet spot. But releasing a Swift-only Xcode prematurely when Swift is not yet considered fully baked could cause the iOS Xcode launch to be a dud. In general, the longer they wait, the more acceptable it becomes for iOS Xcode to be Swift-only. Specifically, if they limit Xcode to Swift, they need ABI stability in place before iOS Xcode can really be a hit.

Third, performance. You need somewhat acceptable build times in order to not make programming on iOS feel like the seventh circle of hell. Part of that comes down to processor power, but that seems covered since Apple's latest chips perform roughly on par with low-end Intel chips. Part of it comes down to compiler enhancements to be smarter about what gets re-built when minor changes have been done. This is a never-ending optimization game - at some point they'll just have to solve for x and decide when it's good enough to ship.

Fourth, creating a clean slate. Apple can be expected to maintain iOS Xcode for decades to come, and they'd want to set themselves up for the future. To put that in perspective, think of Xcode on Mac's history. Going back to its NeXTStep heritage, it goes back 25 years, to 1992. There's inevitably a lot of cruft that comes with that (think iTunes, but worse). It's had one clean break in that time, the jump from NeXTStep to OS X. Bringing it to iOS would be its second clean break.

They wouldn't want to just copy over the legacy codebase from the macOS Xcode, cruft and all, and just tweak the user interface layer. So I wouldn't expect this to be a port, but more a rewrite on the order of iPhoto / Aperture to Photos or Final Cut Pro to Final Cut Pro X. Some stuff will be new and exciting, some stuff will miss the mark, some will be frustratingly missing in version 1 and will be added in in subsequent releases. For example, I'd expect the initial release of Xcode on iOS to support only iOS as a target platform, no watchOS or tvOS abilities, let alone macOS.

Fifth, user interface and ergonomics. I am extremely curious to see what has come out of the user testing that they've undoubtedly done on this, and how they re-imagine InterfaceBuilder for touch interface. Hope it's as well-thought-out as iOS 11 drag & drop. But this is something that takes some trial-and-error over multiple iterations. Personally I hope they take their time and get it right. Especially on the ergonomics side, I wonder how an iPad will ever stack up to a Mac. Any concerns around neck strain, RSI, ...? I shouldn't overestimate this concern (plenty of people develop on laptops), but on the other hand this is one problem you can't just solve with a software update. I think Macs will continue to be tool of choice for a lot of devs.

Anyway, as usual in these posts all of the above is just speculation, I don't have any inside knowledge. Though if someone on the team happens to come across this, I wouldn't mind hearing how far off the mark I am ;-)

Just my two cents.

Comments

Popular posts from this blog

Maybe 2018 will be the year UIKit replaces AppKit on the Mac

Why losing some customers may be good for the Mac

The path for technology for the next decade? Here's 5 guesses.