Why my first iOS app’s name is so weird and other things
The real story behind GainTracker Water Edition
I didn’t really plan on building a water tracking app. There’s a ton of amazing looking water tracking apps in the App Store that have all kinds of great features (not to mention in-app purchases and/or subscriptions). So how did I end up building a simple water tracking app and where did it get its name GainTracker Water Edition?
🏋️♀️ The workout app
This water tracking app actually started a few years ago as a workout tracking app called GainTracker, hence the weird name GainTracker Water Edition. I didn’t have any better names, and WaterTracker was already taken so I just attached Water Edition to the end.
I’ve been wanted a quick and easy cloud-syncing weightlifting tracking app and I didn’t see any that I really liked so I decided to build it myself. SwiftUI had just come out and I figured it would be a great opportunity to learn iOS programming. I spent a few years on and off learning Swift and SwiftUI and built out a POC that I could use myself. I slowly added features to it and it had a lot of the basic features I wanted.
I had been pushing off paying for an Apple Developer account since I didn’t really need one while I was learning, but a few months ago I bit the bullet and paid for it so I could properly share it with friends and family to test out (TestFlight is pretty cool btw). After a few more error messages I finally got it accepted for beta testing and sent it to my friend to test. It crashed right away 🤦🏻♂️. I tried to debug the issue but it was too frustrating. My “learning” code was just too messy to use for a real production app and I needed to start over from scratch to figure out a few more things I still had questions about. I had already identified a few areas I needed to learn some better practices in so I hit the pause button on GainTracker and GainTracker Water Edition was born.
💧 The water tracking app
How much water do I drink daily? I had been wanting to know the answer to this for a while now but hadn’t gotten around to documenting it, so I figured building a simple water tracking app would help me solve two problems in one. It would help me understand the things that weren’t working in my hodgepodge spaghetti code workout app, and it would also help me realize how much water I’m drinking daily. I decided that I would only add code that I knew had to be in the app which should make adding features and debugging things easier—I almost kept that promise. Some of the features I needed to test were: loading data when the app starts up, iCloud sync between all my devices (iPhone, iPad, and MacBook Air), notifications, notification actions, configurable settings that are accessible throughout the app’s various pages, and visuals like charts and graphs (coming soon in the water app).
📲 Coding the app
The actual coding part was fairly straightforward. I had spent the last few years learning the basic syntax of Swift and SwiftUI and felt pretty comfortable with it. I just needed to come up with the app’s main functionality and then use basic programming logic to figure out what was needed in code to do that functionality. The other thing I needed to do was learn the specific areas of iOS programming I was lacking in the workout app. For example, things like scene modifiersthat control what happens if your app becomes active or goes into the background. I also learned about a concept I hadn’t used before called ObservableObject which allowed me to improve how data flowed through the app and across multiple pages while updating the screen for the user accordingly if any of the information changes.
💻 macOS support
Supporting the Mac was really important for me. But to my frustration, not every feature available in iOS is available on macOS in SwiftUI which meant I needed to customize the code to work on both operating systems. (Technical comment: I had to use a few compiler control statements like
#if os(MacOS) to only run certain code for Mac.)
But since I really wanted the app to sync between my iPhone, iPad, and especially my MacBook I spent the time and a little extra effort and it works! The docs weren’t the clearest, and I ran into a few bonus error messages but I made it through them.
Adding MacOS support wasn’t as hard as I thought it would be given that SwiftUI is largely cross-platform. But at the time of coding my app some features weren’t implemented like NavigationStacks, so I had to end up customizing a few screens to fit macOS as well as postpone a few features until an upcoming release. Despite a few customizations both operating systems share the same code.
🗄 Administrative tasks
Now it wasn’t that bad, but I spent a decent number of hours on administrative work to fully setup my app in the App Store. I needed to create icons and have all the correct sizes. I also needed to fill out all the questions and add all of the screenshots. I also setup a simple website for the app but that was a pretty quick and fun project. The most time-consuming activity was probably learning how to use Gimp (an open source and freeware Photoshop style image manipulation program) and then actually editing the screenshots for the App Store. I might end up just learning photoshop next time around but Gimp seems to work perfectly fine and it’s free.
Overall I would say the experience was worth it. I don’t think anyone except friends and family have seen the app, and I’m pretty sure no one has purchased it, but it was a bucket-list dream come true for me to launch my own app and being a self-taught programmer makes it feel a little more rewarding. It took a while but I did it. Do I expect to earn a bunch of money from a very simple water tracking app? No, of course not. But do I think the features are valuable and could help others out there like me who need to drink more water? Yes!
And for GainTracker (the weightlifting app) I hope to release it in early 2023. I have a few more features I’d like to add to GainTracker Water Edition first and then I’ll start work on the true GainTracker app. Stay tuned!
Have you ever wanted to make an app? Did you make it? What is holding you back? If you’ve tried my app let me know what you think as well!
Thanks for reading The Technically Challenged Newsletter! Subscribe for free to receive new posts and support my work.