Software development on an iPad
Posted 01.01.2017 · 3 min readI recently bought an iPad Pro as a replacement for my computer at home. The old one was a Macbook Pro that is taking its last spins these days. I wanted a device that was more of a creative tool and also one that I could use to read things from pocket and such. Thus I landed on an iPad. It gets also used a bit for reading with the Kindle app.
The tools I use when I do development on the iPad is mostly Blink and Ergo WebTools. Blink is simply the best ssh client for a tablet/mobile operative system that I have used. I am pretty sure I have tested most of the other ones the last few years. Ergo WebTools is neat since Safari requires a Mac to be able to view the developer tools.
You might have guessed that I do development through a server, since Blink is a ssh and mosh client. I use mosh to connect which smoothes out flakey connections and lost packages. On the server I write code, and blogposts like this one with vim. I use for this since it is my editor of choice for most things these days. There are many great options for editors. Web based IDE might be a nice option. Furthermore, I have found tmux to be very helpful while running development servers and tests besides the vim editor.
The server is a Ubuntu 16.10 which makes it able to run all I want to run on it
without much hassle. Since a good part of what I use it for is web development
I have created a nginx proxy that proxies <port>.dev.a.domain
to 127.0.0.1:<port>
.
It works well, and adding a basic auth password on the redirect makes it a bit
more safe to expose all ports through ngnix. The code below is pretty much what
runs that proxy. Webpack with hot reloading requires websockets, but that is
straight forward to set up if one follows the documentation.
server { listen 80; server_name ~(?<sub>[^.]+)\.dev\.example\.com;
access_log /var/log/nginx/dev.access.log; error_log /var/log/nginx/dev.error.log;
location / { proxy_pass http://127.0.0.1:$sub; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m;
auth_basic "closed site"; auth_basic_user_file /etc/nginx/htpasswd; }}
Developing server side applications or libraries does not require much tools in addition to the ones that are available from the command line. Web applications and frontend things on the other hand. Web developer tools are necessary or at least a real time saver. Safari requires a laptop to use the developer tools which is not very helpful when trying to create a ipad only setup. Ergo WebTools is an app that implements developer tools around a Safari web view. I have not used it that much yet. However, it seems to be okay and useful even though it is far from what we are used to from modern browsers these days.
All in all it works well and is a nice change of scenery from time to time. It is definitively a nicer option to bring to cafes and such.