Programming on iOS
by Frank McPherson Thursday, December 21, 2017

One of my goals for the holiday break is to complete a course on Nodejs, and because I am a bit crazy, I want to do this using my iPad Pro, which I am trying to use as my primary personal computer.

Unfortunately, there is no app/container for Nodejs on iOS, so the only way I can run the code I am writing is to use another computer. In this case I am using a server running Ubuntu, which I access using an ssh client on my iPad.

To write the code I could use any text editor, but a code editor, or IDE, is more useful. Since I am accessing a server via ssh, I could simply use vim or nano on that server, but that requires a persistent connection to the server and I want to first try writing the code in an app on my iPad.

I did some research about apps for programming on an iPad and found Coda to be the most recommended, but relative to most iOS apps, the $25 price of Coda is really expensive. However, I justified the purchase to myself by noting that Coda also has an SSH client, so it is basically two apps in one making the price tag more palatable.

I am using Git/Github to move the code I am writing on the iPad to the Ubuntu server. First, I created a repository under my Github account. Next, I set up remote access to that repository using WorkingCopy, which most consider the best Git app for iOS.

First, I set up a terminal session to the Ubuntu server in Coda. Next, I created a folder in Coda to store the JavaScript files that I am writing. To test my apps, I export the JavaScript file from Coda to WorkingCopy, commit and then push the changes in WorkingCopy, and finally go back to the SSH terminal in Coda to run the script.

Obviously, while I can write scripts while disconnected, I cannot check them into Github nor run them without a connection to the Internet. However, the reality is that I am hardly ever not connected, so I think this workflow will work pretty well.