DEV Community

Cover image for Can you use iPad Pro for work?
MONKIN
MONKIN

Posted on

Can you use iPad Pro for work?

Yes, you can!

There are many articles on how to use an iPad as a development machine. Mainly concerning browser-based solutions like GitHub Codespaces or similar tools.

My approach is traditional by using Ubuntu on VPS with standard tooling that everyone knows. It does not matter if you are programming in Go, Python, Rust, or doing front-end in React. If you’re serious about your work, in the end only thing that matter is *nix.

I will try to dive in and share tips after using iPad Pro for the last 8 months.

Why?

I will not lie if I write that for the sake of practicality. On my MacBook Pro, I installed only three applications. That was Figma, Dash, and iTerm2.

So I thought that iPad is an ideal tool for my workflow. I tried it and never look back. I love the simplicity of the iPad OS. I have apps for each service that I used in a browser, like Reddit(Apollo), Twitter, or Netflix. Now I don’t need Safari to have everything under one fingertip.

Oh, and did I mention the most critical feature for productivity? Face ID. Yes, You can chuckle, but the idea to not type your passwords is mind changing if you use 1Password.

I will never get back to Apple hardware without Face ID, so dear Tim, please make a MacBook with those fancy new processors and Face ID... ❤️

My Workflow

The whole workflow is based on building websites and applications for my own needs. I rarely do any kind of client work.

So there’s a large number of static websites in HUGO, programming in Go, extensive use of GitLab CI/CD for automation, scraping, gathering content or deployment to Cloudflare.

For design I use Figma (Figurative on iPad), retouch in Affinity Photo, sketch in Procreate or Apple Notes.

And, that’s about everything I use. Pretty simple, isn’t it? I also use iA Writer for exporting to PDF more extensive notes. Yet most of them are written in Vim and stored in Vimwiki.

What I use?

Cost

One time:

Recurring:

  • Linode costs me $40 a month with 4 cores and 8GB of ram, but that cost is heavily depended on your own preferences and needs.

Tips

I don’t want to write extensive guides on software that I use, as this was written in all possible ways, and there is always documentation for each one of them. Yet, I want to share what makes my life more comfortable to work from iPad when using them:

1. Mouse Support

Enable mouse support in every application you can. This comes in handy when using an iPad without a keyboard as you can freely change panes in tmux or scroll throughout your apps with your fingers:

In tmux:

set -g mouse on
Enter fullscreen mode Exit fullscreen mode

In VIM:

set mouse=a
Enter fullscreen mode Exit fullscreen mode

In WeeChat:

/set weechat.look.mouse on
/mouse enable
Enter fullscreen mode Exit fullscreen mode

Or search for mouse support in the documentation of your favorite CLI application.

2. Caddyfile

Caddy is a lifesaver when you’re doing web-related programming and want to quickly access your websites on a development machine. By using Caddyfile stored in your source folder, you can easily control access to it by adding this:

example.com {
    reverse_proxy 127.0.0.1:1313
}
Enter fullscreen mode Exit fullscreen mode

Now you can use sudo caddy start inside your app directory and use to start your server or caddy stop to terminate it.

How would that work? For example, if you’re using HUGO. Start your Caddy server and run this in HUGO directory:

hugo server --port=1313 --baseUrl="example.com" --appendPort=false
Enter fullscreen mode Exit fullscreen mode

Now when you go to example.com, you’ll see your website. The same is valid for anything else that requires a server or proxy.

You can read more about setting this up here: Reverse proxy quick-start

3. Limit Access

One of the best things you can do is limiting access to your machine using a firewall. You can go with the first-class approach using iptables or by using UFW:

sudo ufw allow proto tcp from $IPAddress to any port 22
Enter fullscreen mode Exit fullscreen mode

Where $IPAddress is your IP or your private VPN (Algo, ipsec-vpn or your own).

Read this for more information: ufw - Uncomplicated Firewall

4. Mosh

With Mosh, I never had a feeling that my terminal is just connected to VPS. Whenever I open Blink, everything is still there as I left it. Slow connection? No problem with Mosh. Constantly changing networks or IP addresses? You will not lose a connection even for a minute.

It's so astonishing that it's hard to describe you have to try it yourself.

5. File Synchronization

Blink SCP is a great tool to upload files to and from the server. It’s as simple as using:

scp yourfile hostname:~/
Enter fullscreen mode Exit fullscreen mode

I also heavily use Git and GitLab for that, solely by using the sync repository on the server that I can pull, push or upload files from within GitLab interface.

6. Create bash scripts

Setup Scripts

That’s maybe worn-out advice but write down everything you do more than once. App setup? Write a script. Configuration? Write a script. Deployment? Write a script. For example, if I want to install a node with yarn, use something like this:

#!/usr/bin/env bash

# Add Node and Yarn to apt
curl -sL https://deb.nodesource.com/setup_15.x | sudo -E bash -
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

# Install packages
sudo apt-get update
sudo apt-get install -y nodejs yarn
Enter fullscreen mode Exit fullscreen mode

Yes, you could use NVM, but I don’t need it. So it’s based on your personal needs.

What about setting up NGINX? No problem at all:

#!/usr/bin/env bash

mkdir .dep
DEP="$HOME/.dep"
VERSION="nginx-1.18.0"

# Install brotli compression
if [[ -d $DEP/ngx_brotli ]]; then
    echo "Brotli already installed."
else
    git clone --depth 1 https://github.com/google/ngx_brotli.git $DEP/ngx_brotli
    cd $DEP/ngx_brotli && git submodule update --init && cd
fi

# Configure and install NGINX
cd $DEP
wget http://nginx.org/download/$VERSION.tar.gz
tar -zxvf $VERSION.tar.gz
cd $VERSION
./configure \
    --prefix=/etc/nginx \
    --sbin-path=/usr/sbin/nginx \
    --modules-path=/usr/lib/nginx/modules \
    --conf-path=/etc/nginx/nginx.conf \
    --error-log-path=/var/log/nginx/error.log \
    --http-log-path=/var/log/nginx/access.log \
    --pid-path=/var/run/nginx.pid \
    --lock-path=/var/run/nginx.lock \
    --http-client-body-temp-path=/var/cache/nginx/client_temp \
    --http-proxy-temp-path=/var/cache/nginx/proxy_temp \
    --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp \
    --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp \
    --http-scgi-temp-path=/var/cache/nginx/scgi_temp \
    --user=nginx \
    --group=nginx \
    --with-http_ssl_module \
    --with-pcre-jit \
    --with-threads \
    --with-http_ssl_module \
    --with-http_realip_module \
    --with-http_addition_module \
    --with-http_sub_module \
    --with-http_dav_module \
    --with-http_flv_module \
    --with-http_mp4_module \
    --with-http_geoip_module \
    --with-http_image_filter_module \
    --with-http_v2_module \
    --with-http_xslt_module \
    --with-http_gunzip_module \
    --with-http_gzip_static_module \
    --with-http_random_index_module \
    --with-http_secure_link_module \
    --with-http_stub_status_module \
    --with-http_auth_request_module \
    --with-threads \
    --with-stream \
    --with-stream_ssl_module \
    --with-http_slice_module \
    --with-mail \
    --with-mail_ssl_module \
    --with-file-aio \
    --with-ipv6 \
    --add-module=/home/ubuntu/.dep/ngx_brotli
make
sudo make install
cd

# Remove NGINX sources
rm -rf $DEP/$VERSION
rm -rf $DEP/$VERSION.tar.gz

# Copy nginx.service
sudo cp $HOME/.dotfiles/.config/nginx.service /lib/systemd/system/

# Create 'nginx' user
sudo useradd --no-create-home nginx

# Create cache and web directories
sudo mkdir -p /var/cache/nginx/client_temp
sudo mkdir /etc/nginx/conf.d/
sudo mkdir /var/www/
sudo chown nginx:nginx /var/www/

# Enable and auto start
sudo systemctl enable nginx
sudo systemctl start nginx

# Generate dhparam cert
screen -d -m sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 4096
Enter fullscreen mode Exit fullscreen mode

You can use Terraform or Ansible, but that is overkill for what is needed from a personal dev machine. Or a single server to host your services.

And no, you do not need any fancy technology, hundreds of servers, or containers system to build a successful online business. Go ahead! If you have experience in it and feel that using them will be a lifesaver for you. In the end, it's your needs that count, not some internet articles. :)

Don’t forget about your .dotfiles.

7. Buy external keyboard and mouse

I use Apple Keyboard and a simple Logitech BT mouse. First, Figma will not work without it. Second, if you want to use a keyboard and pencil for design, at the same time, those integrated ones will not work for you. I personally keep the iPad Screen in front of me. On the left of it, I have a keyboard operated by my left hand for switching shortcuts.

This is also my approach since I worked with Wacom tablets, and some people may be able to work comfortably on an iPad with a keyboard in a case. But that is more of a personal preference.

One of the advantages for me is traveling comfortably. I don’t need to take an external keyboard or mouse with me. The on-screen keyboard is excellent and works well on such occasions.

Problems?

The iPad is not ideal. The biggest obstacle can be a lack of internet connection. As with slow internet, you can still use Mosh, and have a pleasant experience, that without it you can not work at all.

There are applications like iSH which are trying to fill that gap, but setting it up to resemble working on full-featured Linux is complicated and time-consuming.

Second, dev tools are nonexistent. There is Inspect Browser on iPad, and it has some features. But it is dated and probably abandoned (still waiting for that next big release). How do I deal with it? I absolutely do not care...

Most browsers work similar fashion to each other. So if you do something that works fine on Safari, it will work the same on Firefox and Chromium-based ones. If not, then you will get feedback from annoyed users or colleagues that something is not right.

I know it is the wrong approach. But thanks to this, I have learned to be careful about what and how I do. I try to avoid novelties or technologies that may cause errors. Less is more.

The End

I absolutely enjoy working on an iPad. Would love to have a built-in Terminal or proper dev tools in Safari. Working on iPadOS already resembles the flow from macOS in every possible way. And for me, it only took a few minutes to get used to.

Would I recommend a switch to it? Yes. But not for everyone. There are many cases where the iPad falls short. On the other hand, even if it is for you, you must remember to change your habits. The iPad is an entirely different tool that is operated differently. But now you can use it to do most of the things you've done on a regular computer.

Recommended links:

Discussion (6)

Collapse
gsarig profile image
Giorgos Sarigiannidis

As someone who fell in love with the form-factor of Surface Pro since 2014 and can't go back to a classic laptop anymore, I can understand the appeal of working from a device that can be used as a tablet. Having a single device for all your needs without the need to switch between a laptop or desktop and a tablet is a great convenience. You setup, maintain and update a single device and you don't have to worry if you forgot something on some other device.

On top of that, if the device is powerful enough, ergonomically speaking, it is much better for desktop use than a desktop itself, as it takes up much less space and offers an extra screen.

Collapse
bpmct profile image
Ben Potter

Love this! A lot of people use github.com/cdr/code-server on the iPad as well and get a pretty solid dev experience :)

Collapse
monkin profile image
MONKIN Author

Thanks! I mention that at the very beginning (there are many posts about it), and I like the overall idea. Yet, I’m more traditional and want full control over the machine that I use. It does not have to suit everyone, and it is understandable. :)

BTW. I like the Coder website. :)

Collapse
joshpuetz profile image
Josh Puetz

So much great stuff in here, thanks for sharing!

Collapse
borche profile image
Andreas Börjesson

Great post, thanks so much for sharing.