I was very excited when Apple released a way to make apps on an iPad. I use
mine a lot, but was missing the ability to make stuff.

When Playgrounds 4 came out, I set myself a goal to produce an app A to Z
entirely on an iPad. The code, all assets, scripts, icons, everything.

All in all, it took me about 2 months of evening hacking to get it to the app store. The app is written in SwiftUI, and additionally, I used iSh to write
some scripts (bash and python) to manipulate the word lists.

The word lists were fairly tricky. To get started, I used some open-source Hunspell dictionaries I found online. Then I did some postprocessing:

- extract the lemma form of each word (for some languages the game would be impossible without this sanitization)
- filter for the right length
- cross-check against an online thesaurus if the word really exists
- remove (somewhat arbitrary) some weird words that wouldn't be fun to guess

Getting the lemma form was fairly slow on iSh, so I did this step on a DigitalOcean droplet (though still through the iPad using iSh + SSH).

For the python scripts, I used a split-screen setup: on one side I used
the Buffer code editor, and on the other I used iSh. I mounted the
editor filesystem into iSh, so I could simply run "python3 myscript.py" whenever I made any changes.

When I started out, I had 0 ideas about SwiftUI. It's pretty cool, but I made
a lot of rookie mistakes. The worst one was using a lot of inefficient computed properties before I realized that they might be called literally hundreds of times per keypress.

What I missed the most was the ability to write tests. I ended up
compromising, and writing UIs that performed a test, and then presented a green/red message about the outcome. I had dedicated "test views" that I manually inspected in the previews pane. It helped me catch some regressions, but it wasn't a great experience.

Some features were not possible (initially I wanted to have iCloud synchronization, and localization, but Playgrounds doesn't support these).

And - interestingly - while you can submit the app to the app store through Playgrounds, you have no way of generating the required screenshots on the iPad. I ended up initially faking some screenshots using Procreate (enlarging them to the right proportions). Subsequently, I wrote a view that simulated different screen sizes and could save a screenshot directly to the camera roll. This made it easy to submit new versions, as well as find actual layout issues from different size devices. All on the iPad.

Overall, the experience was very interesting. It was limiting, the screen was small, there were lots of bugs in the tools, and the previews didn't always act the same as the real deal... but it was also cool. I found the friction was very small to resume coding (i.e. if I'm in couch potato mode, my iPad is usually nearby, whereas my MacBook isn't always).

I'm now working on a different app, and while it's written mainly in Xcode now, I still use the iPad to prototype views/interactions when I can.

You can check it out on GitHub, it's open source. The main branch is migrated
to Xcode, but I kept a branch, which contains the app as it was developed on the iPad.