So recently I launched version 2.0 of my app, Chirp for Twitter. The update has an insane amount of features, so many in fact that I ran out of space in the ‘What’s new?’ section on App Store Connect.
In this post I wanted to detail some of the challenges that came about in developing an app for the Apple Watch with SwiftUI, as well as talk about some of the technical details surrounding some of the newest features. Finally, I want to talk about localisation, as localising Chirp was a mammoth effort that couldn’t have been done with quite few people.
The first question I get asked about this update when I say I rewrote the timeline is, “Why?”. I wrote the original timeline in 2018 in just a couple of days when I wasn’t very experienced in Swift. As a result, it wasn’t fantastic, and took a couple of updates before it was considered ‘good’. Not to mention that developing for the Apple Watch simply wasn’t very good. Drag-and-Drop UI meant that I had to plan ahead for every little thing. Some tweets have images, some don’t, some are retweets, some aren’t. I couldn’t just add a retweet label if necessary, I had to just hide it when it wasn’t in use.
But then, at WWDC 2019 something changed. I was fortunate enough to attend WWDC 2019 as a scholar (you can read all about that experience here) and I was able to sit in the keynote hall as Craig Federighi announced SwiftUI
Now I’ll admit I wasn’t too excited by this initially. A new UI framework? So? We have UIKit, that works pretty well, what can this do that UIKit can’t? Well I got pretty excited when Federighi said “And now for the first time ever we now have a native framework for building watch apps as well”
And so I walked out of the keynote hall, straight to the scholar lounge, and got to work on rewriting the Chirp timeline in SwiftUI.
It quickly went downhill
SwiftUI, in its released and iterated upon state, isn’t very good. And SwiftUI in its Beta 1 state, was very very bad. It was incredibly challenging to fight both my inexperience and SwiftUI relative newness (there’s got to be a better word for that but oh well, my English grades were never that good).
Despite being in San Jose for a week after the announcement and San Francisco for a week after that, and despite spending much of that time working on Chirp, it wasn’t until I was back home in Adelaide that I actually had anything resembling a functioning timeline.
I wish I saved some screenshots, but I was too excited and kept working.
One of Chirp 2.0s biggest features is the ability for users to change the color of their username. This feature was a classic “How hard could it be?” moment for me. The inspiration for this came from Christian Selig’s ‘Apollo’. In Apollo, Selig’s name is coloured purple to ensure it stands out to other people using it. This was it can appear as an official comment on something. I wanted something similar in Chirp, and I considered colouring my name purple. After tweeting about that, I got a message from a user asking if I could make his name green, to which I initially declined. But it got me thinking, perhaps I could make an option for anyone to color their name? So I got up bright and early one morning and got to work. I had to thinking of how it’ll all go together. It’d obviously need a backend, so I used NodeHost, it’s need a database, so I used MySQL, and it’d need a lot of front-end development too.
After one day, I had a functioning username color changer. It was basic, didn’t work on iPhone, didn’t support updating, had no way to unlock it on the user-side, and was all around very much not ready for launch. But that was a couple months ago, and since then I’ve been working on it nearly every day to make it perfect.
The decision to make it a paid upgrade (creatively dubbed ‘Color Pro’), was not an easy one. I had three options:
- Make it free for everyone
- Make it part of Chirp Pro (and apply it retroactively)
- Make it a seperate upgrade
I ultimately landed on a mix of 2 and 3. While it is a seperate upgrade that’s $2, Chirp Pro users can get it for $1. And if you don’t already have Chirp Pro, you can buy both in one purchase and save 25%.
I decided on this option as the work required was enormous. While I said it took me a day, the subsequent work took months, and even that days worth of work was heaps. Making it part of Chirp Pro would mean that users who bought Chirp over a year ago would get all of this extra work for free, which didn’t really seem fair. I also thought about making it part of Chirp Pro only moving forward, but that’d anger people who bought Chirp Pro yesterday.
I’m pretty happy with the mix of 2 and 3 that I landed on, while it isn’t perfect, it does feel the most fair to both myself and my users.
The next biggest Chirp 2.0 is localisations. As you can see above, Chirp is now natively localised into 13 new languages, bringing the total to 14. This would not have been possible without my incredibly hard-working and caring team of 59 volunteers. If you’re one of those who helped out, thank you!. If you’re reading this and know a second language and want to help out, you can! If you go here, you’ll be able to help bring Chirp to a new language.
How was it all done?
At the site I linked to above, you can upload all of your
.strings files, and OneSky will generate a nice looking page for translators to work on. One it’s done, you download your translated files and put them back into your project. Fair warning though, incorporating them into your project is a massive pain. Their folder structure doesn’t match Xcode’s, meaning you need to copy and paste and rename and stuff all over the place. I wrote a script to mitigate this and automate everything for me, but I don’t know if I’ll publish it as it’s heavily personalised to my setup.
I want to give a quick little shout out to Stone and Chalk Adelaide. I’ve been working in Stone and Chalk for a couple months now and the experience has been incredible. If you’re not familiar with them, S&C are like a coworking space and are available in Melbourne, Sydney and Adelaide. They were kind enough to offer me a desk a couple months back, and while I initially didn’t understand the appeal of coworking space (“How would it be any different to working in my room?”), I certainly get it now.
Coinciding with School
So I’m 17, which means I spent the last year in school while also attending WWDC and trying to work on Chirp. If you’re reading this and you’re in school and you want to pursue a project but feel like school is holding you back, I say stuff school. That doesn’t mean neglect school, but if you truly feel like some project of yours would be more beneficial than a school project, go for it! That said, if you’re in your final year where stuff actually matters, do be careful, and make sure they do get done eventually.