A year ago today, I released my first iOS app, ToneBoard Keyboard, onto the app store. ToneBoard is a Chinese keyboard for iOS that helps you learn Mandarin Chinese tones while you type. I had meant to write up some thoughts on the process of making and releasing the app then, but I never got around to it. Better late than never!
Background
I have been casually studying Mandarin, mainly using Duolingo, for a year or two, but the inspiration for ToneBoard actually came from studying Vietnamese, which I have been doing longer and more seriously. When you type Vietnamese with the common “Telex” keyboard, you have to input the tones as you type. For example, to write có (“to have”) you type “cos” (with “s” indicating the tone), but to type cỏ (“grass”) you type “cor”. I found this necessity to type tones while studying Vietnamese with Duolingo to be a great memory aid.
With the normal Mandarin iOS keyboard on the other hand, you just type toneless pinyin and take your pick of matching Chinese characters. For example, you can simply type “ni hao ma” and then tap the “你好吗” character choice.
Enter ToneBoard
I knew it should be possible to create a custom iOS keyboard that combines Vietnamese and Mandarin typing experiences, using pinyin with tone numbers like “ni3 hao3 ma5”. Unable to find one in the app store, I set about hacking together my own keyboard that fit the bill.
After a couple weeks of tinkering, I had a serviceable keyboard. Here’s a video of it in action (from ToneBoard’s own in-app tutorial):
Making the sausage
I’ll gloss over most of the specifics of how I actually implemented the keyboard. Anyone interested in the gory details can see the source code on GitHub. In short, to make a custom iOS keyboard, you have to make a normal app (what Apple calls the “host app”) with a keyboard “extension”. Once the app is installed, users can enable the custom keyboard in the Settings app.
The main thing that’s different about making a keyboard compared to a normal app is that while a normal app has lots of power and control over everything iOS can do (display things all over the screen, access the internet, play sounds, etc) the custom keyboard only has a limited little box of screen space and functionality to work with. This can make the development and troubleshooting process a little difficult compared to normal apps. There are also far fewer examples to refer to. (I have to give a shout out though to both KeyboardKit and this WWDC2017 presentation. The WWDC talk has apparently been taken down, so I linked to the WayBack URL for it.)
Here are a couple behind-the-scenes shots of ToneBoard coming together:
Once I got a keyboard to show up on screen, I had to actually supply the appropriate Chinese character choices for any given pinyin input. Most Chinese keyboards suggest whole words and sentences for you as you type, but I found this to be too much of a crutch when studying with apps like Duolingo. Instead, ToneBoard only displays character choices for one word at a time. I used CC-CEDICT to supply dictionary data and Google’s ngram datasets to be able to display the most common words first. I supplemented the Google data with Unicode’s Unihan database to find the frequency of various readings for characters that can be pronounced in different ways. All of these data sources are amazing, and I’m very grateful to their various authors and contributors.
While I originally made ToneBoard to scratch my own itch, I thought it could be generally useful to others studying Chinese, and that it would be a fun challenge to tidy it up a bit and make it available in the Apple App Store. Initially, I added a couple of simple documentation screens to the “host app” and figured that would be enough. When I tested the experience of installing and running the app however, it just didn’t feel “like an app”. I imagined Steve Jobs spinning in his grave as my poor ToneBoard users swiped and tapped in vain trying to figure out how to use the keyboard. Ultimately I opted to created a tutorial in the app (shown in the video above) that would let users try the keyboard immediately after installing the app, without having to faff around with the settings to make the keyboard work globally in other apps. Tutorial and docs done, and after testing the app on all the aging iOS devices in various drawers around my apartment, I felt like ToneBoard was ready for the world.
The launch
I submitted my app to the App Store on Christmas Eve, 2021. I had heard that the review process could take anywhere between hours and months, and that it could be particularly slow during the holidays. Four days later, I woke up to find that ToneBoard was “ready for sale” (which is what Apple says when your app has passed app review, even if it’s a free app). I excitedly told a few friends and dashed off a post on Reddit. Surprisingly, some downloads actually started to trickle in.
Since launching a year ago, ToneBoard has been installed about 400 times. This is probably unremarkable for most app creators, but considering my extremely minimal marketing, I was pretty pleased with this. I didn’t add any kind of tracking or data collection to the app, so I don’t know much about what ToneBoard users do after installing it. I hope that the sustained stream of downloads is evidence of at least some actual adoption. A few Reddit comments and emails did prove to me that at least some random internet people tried it, which is always a good feeling.
Big in Cambodia
The biggest surprise to me as I monitored ToneBoard usage was that Cambodia quickly became the leader of the pack in download numbers, with other Southeast Asian countries like Indonesia and Malaysia also seeing a significant number of installs. This seems consistent with reportedly high demand for Chinese speakers in Cambodia.
This trend also makes me hopeful that there is at least some amount of word-of-mouth spread of ToneBoard users in places like Cambodia. I wouldn’t expect such pronounced adoption in certain regions like this based purely on random App Store searches (in which case I would expect other countries with large Chinese-learning populations to be better represented).
Looking forward
As far as new functionality, I have already received a few feature requests from friends, family, and internet strangers. The first of these, from my friend Lev, was actually already released in version 1.1. Lev asked that there be some kind of warning when characters are displayed because you have typed in one of their less common readings. For example, 吗 is usually read “ma5” (neutral tone), but it is occasionally read “ma3” (as in 吗啡, ma fei, “morphine”). There is now an option in ToneBoard called “Indicate rare tones” that displays asterisks next to characters for rarer readings (e.g. inputting “ma3” will now show “吗*” among the results). Lev’s first choice was that you hear a cowboy-style voice that says something like “Woah, not so fast, buckaroo!” when using the rare readings, but he also found the asterisk to be acceptable.
The next big feature request came from my wife (the most VIP ToneBoard user), who asked for the ability to have each character or word spoken out loud while typing. I tried to build this using iOS’s built-in text-to-speech capabilities, but the voice quality of on-device text-to-speech was not that great. Instead, I implemented the feature using Amazon Polly to generate audio ahead of time. This sounds great but generates about 650MB of audio data, which is pretty big to shove into an iOS app. I have explored options to allow users to optionally download the audio data, but for now the feature is still in development.
Finally, a friendly ToneBoard user reached out via email to report a bug (since fixed), and also made a feature request. He pointed out that it’s easy to learn the position of common characters among the list of choices (e.g. remember that 坐 is the third choice when you type “zuo3”), so he asked that the order of characters be randomized. This is not implemented yet, but the request is being tracked here in the GitHub issues list. Anyone else with bug reports or feature ideas is welcome to add to the list!
So that’s about it for ToneBoard in 2022 and beyond. And as it’s the time of year when many of us celebrate the birth of not only ToneBoard, but also the Son of God, I wish my several blog readers a merry Christmas and a Happy New Year!