Adam Gray

Blog
08/03/2023

Adipose

I have a history of experimentation when it comes to my diet. This topic would consume my entire blog, so I’ll save you the pain of reading about it. This experimentation tends to be fueled by the desire for data. The desire to understand more about what I eat, and how it affects me.

To service this desire I tried to find tools to help me capture this data. Calorie trackers, macro trackers, etc. Whilst these tools were certainly useful I found that they didn’t fit my needs in a couple of ways. They either had far too many features, and/or required some sort of subscription.

What I wanted was an extremely simple tool to capture calories. As nothing simple enough existed on the marketplace, I set out to built my own tool that did only what I needed it to.

This tool became Adipose

Crafting the scope for what eventually became Adipose I had several requirements:

  1. It must be extremely simple to use
  2. I must to track calories wherever I am
  3. It must be highly performant
  4. If sold, it must be a single purchase (no subscription)

These requirements formed the basis of the technical decisions I made for Adipose.

As I intend to track calories via my iPhone I wanted to provide a native experience. This led me to a few options. Either, I could build a progressive web app (PWA), build an application with React Native (or Flutter), or build a native iOS application.

After investigating the state of PWAs on iOS I decided to remove it as an option, as at the time support for PWAs on iOS was somewhat limited. For example there was no way to support notifications.

Flutter was rejected as I want this app to be highly performant. Flutter manages their own rendering which adds too much overhead for my tastes.

React Native is a really cool middle-ground option that would allow me to build the app with a toolchain and language I’m familiar with, but compile down to native iOS code.

React Native is a really solid option, but I decided that I’d take this as a learning opportunity and to go with native Swift to build this application.

iOS is a Culture Shock for a Web Dev

The last time I did any sort of iOS development was at Zendesk, where i’d build apps to integrate the Zendesk SDK. Back then, everything was ObjectiveC (i.e TheWouldBeTheAverageLengthOfAClassName)

Thankfully, a lot of time has passed since then and iOS development today is mainly Swift and SwiftUI. Having zero prior experience with these technologies I was incredibly impressed at how minimal the learning curve was. Swift was an easy transition coming from TypeScript, and SwiftUI, being declarative, felt familiar to ReactJS. Using SwiftUI has its limitations, you’re stuck with designing interfaces the way that Apple wants you to, but Apple has some of the best designers in the world so I didn’t mind using their components!

To persist and manage data I used Apple’s CoreData framework. CoreData is essentially an abstraction on top of SQLite. This was a far steeper learning curve than Swift as it required understanding the conventions of the framework, rather than relying on my pre-existing knowledge of SQL. I would have preferred to work directly with SQLite, but managed to struggle my way through enough to build the relationships required for Adipose to function.

Once Adipose was in a state to release to test users (i.e my wife), I took a step into what may be the biggest culture shock of the entire experience… the iOS app store deployment process.

Coming from web dev where anything goes, it was an odd feeling to jump through bureaucratic hoops to ship my app. I used Testflight to deploy beta versions to a few friends to iron out any bugs before a 1.0 release. Once these were running smoothly, I built out all the neccesary privacy policy pages, support page, signed all the agreements, and finally my app was put into an “approval list” where I can only assume someone at Apple manually checks a box saying my app is good enough to get put on the App Store! Which thankfully, it was.

Moonlighting as an iOS Dev

Overall, I’m happy that I went through the experience of an iOS dev to see how the other side lives. If you’re on iOS, you can download it for free on the app store