How I started developing on an iPad

Recently my laptop started falling apart, and I needed a new device to continue my development work on Sappho, previously Hypatia Engine, as well as other development endeavours. I was looking into a replacement laptop, when I had a thought – what if I could develop everything I needed to from an iPad? After some careful thinking about the feasibility of it, I decided that I could probably do everything on one, and so I set about acquiring one. Thanks to Blake (a very generous HSO staff member), I got my hands on one.

There’s a few things that are necessary for developing things on an iPad, one of which is a VPS (virtual private server) to host the development files and tools on. If your iPad is jailbroken, you could probably forsake the server for doing it all locally, but as there is no jailbreak for iOS 9.2 yet, I decided to go the external server route. Another thing that is necessary is a decent external keyboard. I’m using a Logitech keyboard for the iPad which doubles as a stand and a smart cover, protecting the iPad’s screen when on the go. The next thing is Coda, an app for the iPad. Coda is a full development environment for the iPad. It was designed for web sites, and as such a lot of it’s features are entered around website development, but it works just as well for developing other applications, such as Sappho. The last is a VNC viewer application, I use the RealVNC VNC Viewer.

First thing is setting up the VPS. I chose DigitalOcean, but any VPS provider will do. I created a VPS running Fedora (FreeBSD or other open writing systems would work just as well, but I’m familiar with Fedora, so that’s what I went with), and started to set it up for development. After creating my user, I installed the “Development Tools” package group, which includes Python and pip, Git, and compilers for other languages (which are needed for compiling, for example, Pygame). I then cloned the Sappho repository into my home directory, closed my laptop, and fired up Coda on the iPad.

Coda starts up with a blank, but pretty, screen. To get started, we need to create a new “site” for our Sappho workspace. Tap the plus in the top right, tap “Add Site”, and type Sappho as the name. Then tap the Local Path option, and a file picker will come up. Create a new folder using the plus in the top right, name it Sappho, select it, and tap Choose.

Next, we have to configure the site to allow access to our server, and the cloned repository on it. Tap on the middle icon above the site name, and you’ll reach this screen.

We want to fill this information in, with or server’s address, our username, and either provide a password or an SSH key. I already had SSH keys set up, so I used that, but if you haven’t set those up, just type your password in here. Set the Remote Path option by tapping on the file browser icon, and navigate to the location you cloned the Sappho repository to. Hit Done, and tap on the new Sappho site that has appeared in the list.

Next, we want to copy the Sappho files locally. Wait for Coda to connect to the server,tap the check mark in the top right, tap All to select everything in the directory, tap the 3 dots on the lefft of the panel, and tap “Download to Sappho”.

Now once that’s finished, we can start editing! I’m going to work on the tests for the layers module, so let’s navigate to the tests directory, tap on the file we want to edit, and tap Edit in Coda.

Ta da! We now have an editor on the iPad. Let’s make our changes, upload them, and run the tests. Tap the plus icon on the top right, then tap Terminal. This will open up a terminal to our server, so we can do whatever we like. Let’s change into the Sappho directory, and run the tests:

Success! But what if we need to see the Pygame window? That’s where VNC comes in.

To configure the VNC server, I installed it by typing “sudo dnf install tigervnc-server”, followed b installing XFCE with “sudo dnf groupinstall XFCE”. I then followed the instructions on the Fedora documentation to set it up, but at the end before starting the VNC server, I added “exec startxfce4” to the .vnc/startup file to make XFCE start up when the server starts. Then I start the server, and I connect to it from the VNC server app, and we have a graphical session!

Running the demo from here is the best way to check it all works:

And we have a full development environment set up and usable from the iPad! Awesome!

Leave a Reply

Your email address will not be published. Required fields are marked *