EDIT: We’re not abandoning Texpad! It seems that some customers are under the impression that we don’t intend to work on or sell Texpad beyond June this year. Let me assure you that that’s not the case. Having invested a lot of time in revamping it recently, we have firm plans to continue selling it through our own web store in the event that Apple remove Texpad from the App Store in 2013. Existing users will also be provided with a way to download future updates directly from our website.

Original post:

Six months ago we released Texpad, an macOS LaTeX editor into the App Store, and we have been developing it ever since. We have had great fun reinventing the LaTeX front end and smoothing over LaTeX’s wrinkles for users, but our job is unfinished and unless Apple reverse their sandboxing policy, our adventure will soon end. In fact it will be the end of the road for any products interacting with the LaTeX typesetting system.

The Sandbox is a permissions system for macOS inherited from iOS. It reduces the damage any one application can do to your system, but it does so by limiting the access of that application to the filesystem. In cases such as Texpad those shackles prevent the application from doing its job. As of 1st June the Mac App Store will not accept new applications or updates to existing applications that are incompatible with the Sandbox, and it is not unreasonable to assume that noncompliant applications will eventually be dropped completely. Certainly there is no way to adapt Texpad to comply with the Sandbox, but more worryingly it is unlikely any LaTeX editor could ever operate satisfactorily from within the Sandbox. LaTeX is ubiquitous in the academic world for document creation, and Apple will lose a lot of customers like this. Far more of concern is the drift of macOS towards the locked down model of iOS.

I saw the iPad era rebranding of iPhoneOS to iOS as tying up typographical loose ends, but I missed the point. When Apple introduced the iPhone it was a very cool touchscreen iPod that could make phone calls, and iPhoneOS was a piece of software to make it happen, but by the iPad’s release, the focus was on iOS, the touchscreen platform complete with a record shop, a video rental store, an enormous software development community and a version of Angry Birds for every day of the year. Apple’s gatekeeping of iOS, although dictatorial and often unjust, contributed to iOS’s rapid rise by mandating a basic level of competence and security for all software. As the fart apps showed it didn’t guarantee quality, but users showed their appreciation for this effort with the insatiable thirst for shiny touchscreen devices that made Apple the world’s largest technology company.

It is a sound plan for Apple to replicate the successes of iOS in their desktop offering. The Mac App store with its rigorous review process was the first step, and Sandboxing is the second. For anyone who doesn’t know, sandboxing restricts the application’s file system access to either an operating system assigned “Container” directory or files that the user has added to the Sandbox by use of the operating system’s open and save dialogs. This is great for applications which require no access beyond what the Sandbox allows, because it guards against programmer incompetence or maliciousness by fencing the application off from files it does not need to access. However consider an IDE, most of which store their project file in a directory amongst source files. When the user drops the project file on the icon the app gets access to the project file, but not the source files, which are outside the Sandbox. The Apple approved approach to this problem is to store the files in a package - a specially named directory that is displayed as a file by the Finder, but hiding away source source files would be unacceptable to developers.

Our particular worry with Texpad is that we have designed the editor around the concept of the user dropping just the root LaTeX file onto the application. Texpad will parse the file, automatically open included files, and present them all to the user in a unified editor. For example, many users store a central bibliography file (e.g. central.bib) in ~/Library/texmf/bibtex/tex. in Texpad simply typing \bibliography{central} will stimulate Texpad to dig it up and load it for you. This behaviour is ruled out by the Sandbox because the user has only granted permission for Texpad to open the root file itself. We would never do it, but we could avoid this limitation by wrecking the user experience, forcing the user to open the files one by one. Unsolvable however is the problem of LaTeX itself, which can never be compatible with the Sandbox.

The moment you boot LaTeX it sets about tripling the number of files in your root document’s directory. These are the .aux, .log, .toc, etc files used by the many parts of LaTeX to talk to each other. At the risk of repeating myself the user hasn’t given Texpad permissions for these files, and as LaTeX inherits Texpad’s permissions it fails. Even in the unlikely case that this problem were overcome, the sprawling and unruly nature of the LaTeX build process almost guarantees that at some point a script will fall foul of the sandboxing code. If sandboxing continues as planned then on June 1st Texpad and all other products in the App Store interacting with LaTeX will no longer be able to submit updates (although Apple has made a nebulous promise that it will allow bug fixes). As recent graduate students, we have witnessed Macs become ubiquitous within the academic world in the past decade and we estimate that there are around 50 million academic LaTeX/macOS users worldwide, not counting the engineering companies, non-academic research organisations and publishing houses who use LaTeX. As big as the App Store is becoming, it is still relatively small and there is a little bit too much income there for Apple to turn there back on.

Not long ago there was no App Store, and all Mac developers handled payment, installation and updates by themselves. Unfortunately it is not hyperbole to describe the Mac App Store as revolutionary, and consumers have very quickly become used to its convenience and security. Shopping for software such as this outside the store is no longer the norm, and it is unrealistic to expect the same income outside of the App Store.

It is even more unrealistic to expect Apple’s moves to lock down macOS and guarantee their 30% App Store cut to cease on June 1st. Mountain Lion, the next iteration of macOS (10.8), will warn users when they execute any code not signed by an Apple approved developer, and although I am departing from definite fact when I say this, I am certain that at some point macOS will only run App Store approved software. There is no point building a webstore now to see it shut down a year later by a fully locked down macOS 10.9. Therefore it seems to me that June 1st will be the end of the line for Texpad and other “non-compliant” software.

The dedication to Macs we mentioned above goes well beyond academic LaTeX users, fanbois or even the consumer market that Sandboxing is so squarely aimed at. A recent HN poll showed that the mix of excellent user experience, solid technical underpinnings and flexibility has made macOS the platform of choice for hackers and entrepreneurs. Would this love affair continue if it becomes impossible to experiment with the operating system beyond what has been pre-approved by the censors in the Mac App Store? I doubt it, and I also doubt that macOS will retain its market leading status when that community packs its bags and heads off into the welcoming arms of Mark Shuttleworth and Ubuntu.

Sandboxing won’t hurt the average consumer, and despite Apple’s 30% cut of all sales through their store it won’t even harm developers of a lot of consumer software, but for those of us who do more with our laptops than browse the web, watch TV, and edit Word documents it means the end of the line with Apple as a platform.

What can we do? Protest! If you are a developer with a potentially noncompliant application don’t stay silent and hope Apple postpones its sandboxing deadline again, send them an email and explain exactly why their Sandbox will kill your software. If you are a user of LaTeX or other software that is unlikely to make it into the Sandboxed era let Apple know that you consider your computer your property to use and abuse as you wish; let them know it is more than a thin client for iTunes and the Mac App Store.