I went swimming in the Atlantic for a couple hours. With my Samsung phone in my pocket.
So when I got an updated Android phone, I got an iPhone too. Time for some mobile app development.
Here’s what I got through on the long weekend…
I briefly considered Flutter, Xamarin, and React Native to give me one code base for both systems. The guarantee of a smooth future using Apple and Google tooling won me over though. Boning up on two familiar systems outweighed learning a new one that will likely go out of fashion before long.
iPhone app development requires a macOS to publish to the app store. So I set up an OpenCore VM on Proxmox, and my old MacBook Pro has risen from the ashes, virtualized. Not trivial, not extremely difficult.
The Apple docs to set up a Swift 5.0 application are great to get an initial UI going.
The back end will consist of hitting my API and getting the JSON data needed to populate the UI data. The classic solution is Alamofire. The modern iOS 15 solution is async/await-aware variant of URLSession. A quick look at iOS marketshare says 80% of users have iOS 15. I’ll pull the trigger and future-proof my work by going with the modern approach, which requires a recent version of iOS.
There are a couple libraries that might help (FreshOS/Networking, RealHTTP) but keeping dependencies out is good too. I want to keep my mobile apps absolutely as simple as possible so I will use the simplest code I can (something like this) to do a modern JSON API pull.