Sweet sweet code

Software development on the iPad is….interesting. It is one of the few remaining tasks that is still prohibitively difficult, if not completely impossible, on iPadOS. Yet there remains a demand for enabling robust software creation tools on iPadOS.

The most productive development tool available on iPadOS is Apple’s Swift Playgrounds app. Presented as an educational tool for learning to code, Apple added support for building full applications in 2021. Since then, there have been minor updates and bug fixes, as well as support for the current iOS SDKs. I initially wrote off Swift Playgrounds as more of a toy than a productive tool, but its app building capabilities are actually sufficient if you know what you’re doing.
There are some parts of the iOS SDK that are missing and basic debugging and testing tools aren’t available, but someone could actually build real apps with this tool (supporting them would be another matter entirely).

Beyond Swift Playgrounds, software development on iPad is mostly a bunch of workarounds. There is some level of web development you can do on iPad, but without browser debugging tools and alternate browser engines to test against, you aren’t going to get very far. There are various remote development tools like Github Codespaces that offload the actually build and compilation processes to other machines. Unfortunately, those type of solutions are essentially a no-go when connectivity is in question.

Where should things go from here?

An iPad is a computer that runs iOS, and iOS is all about multi-touch. The entire interface is designed around it. When Apple brought Final Cut and Logic Pro to iPad, their marketing focused more on touch interactions than using the Magic Keyboard or Apple Pencil. They were highlighting a key advantage of iPad over the Microsoft Surface, which is that a hardware keyboard and pointing device are completely optional. A user should be able to be productive just using their hands. Could this focus on multi-touch really be of benefit to XCode and software development in general?

Swift Playgrounds does have some touch affordances like a “coding” keyboard, but its really hard to envision writing more than a line or two of code with touch. Coding involves a lot of typing, and tasks that require large amounts of typing are best accomplished with a hardware keyboard. Apple could require a hardware keyboard to use XCode, but its probably unnecessary. The professionals this app would be targeted at would never use it without one.

What does XCode for iPad need?

If we look at Swift Playgrounds as a solid foundation, what additional features would XCode on iPad need to be a useful tool for developers? These are the features I miss when developing using the Playgrounds app on iPad:

  • Ability to open XCode projects and Workspaces – There’s loads and loads of sample code, much of it from Apple, that exist in XCode projects, and iPad users have a subpar experience accessing them
  • Breakpoints(!!!) – Having to resort to print statement debugging is painful and a really surprising omission from Playgrounds.
  • Refactoring support – Being able to quickly rename a variable across a file or multiple files in a project is a huge productvity win.
  • Testing support – An app of any complexity requires Unit and/or UI tests to help prevent regressions and bugs as code is changed or added.
  • Extensions support (WidgetKit, etc…) – Honestly, I just want to be able to build Widgets. I don’t think I need the other extensions.
  • Local Install of apps – The apps you build on iPad run in a app call “XCode Previews”, but they don’t even seem to get locally installed to the iPad. To do that today, you must go through TestFlight.
  • Support for tvOS, WatchOS, VisionOS, and macOS projects – This is less important as I don’t really want to develop for any of those platforms, but it would be great to have the option.
  • Ability to deploy code to a device – I should be able to plug my iPhone into my iPad, and push a build of my app for debugging purposes. You could argue that debugging on the iPad is good enough since much of the hardware is the same, but there no reason this can’t be supported.
  • Source control management, specifically Git – Working Copy is an admirable effort, but first class Git support that integrated with the Files app would be clutch. Its table stakes for an IDE these days. If Apple doesn’t want to implement it, they should enable extensions in XCode for other developers to add this.

What about non Apple software development?

iPad should allow for alternate development toolchains and frameworks. Period. iPad should be able to work as a general purpose development computer. I should be able to build apps in Rust or using Flutter, or web apps using <insert Javascript framework of the week>. I get that this would be another way to allow developers to potentially circumvent the App Store (and Apple’s 30% cut). But there are a lot of really smart people that work at Apple, and I bet they could find a compromise here.

A possible way to solve this deficency would be to utilize the capabiltity of the M-Series chips to create a siloed virtual machine/virtualized environment where developers could build whatever they want. The sandboxed nature of this approach would prevent sharing of data between the “normal” iPad enviroment and this one. There was a weird rumor macOS for M2 iPads that might support this approach. A modified macOS running in a VM would allow any development tool that runs on macOS to be installed on iPad with all of its associated dependencies. All without sacrificing the ease of use and simplified interface that makes iPad easier to use for most people than a Mac or PC.

Conclusion

At the end of the day, if Apple never advances software development on iPad beyond Swift Playgrounds, is that the worst thing in the world? No. Its possible that coding may not be an activity that can be meaningfully improved with multi-touch. But there’s really no downside for enabling additional capability to iPad. A more functional development environment would remove the last thing I use a personal laptop for. Perhaps preventing a drop in MacBook sales is enough of a reason for them to Apple to never ship a better development solution. A cut down version XCode would be more than enough for my personal projects. If Apple wanted to reserve some more advanced features for macOS, I’d be completely okay with that.

Leave a Reply

Discover more from SlatePad

Subscribe now to keep reading and get access to the full archive.

Continue reading