Progress Report
It's been quiet here at Soundsmitten for some time, but I'm alive and well. Work on my first iOS app is well underway, and it's starting to come together.
I've been learning how to structure code in an iOS project. There's a couple of techniques I've picked up on the way that I'll briefly describe here.
The first concept I've found really helpful comes from Matteo Manferdini and his excellent iOS Foundations Course. Rather than using AppDelegate singletons to reference model controllers, I'm using dependency injection by passing (plain Swift object) controller instances using a protocol-oriented technique. I have a protocol extension method that I use to pass the model controllers that I'll need in each screen. That way, the app is way more testable. It’s some of the cleanest code I have written!
In my app, I have lists of a selection of choices that the user must choose and assign some metadata. Rather than hard-coding the options and somehow matching them with selections, I'm using wrapper objects that I can reuse as storage for the user’s choices. Each wrapper may or may not contain an object depending on whether metadata has been assigned. This concept alone has made life much easier.
Anyhow, I’m hoping to have something to show in July. I won’t hype it too much because it’s my first go, but I’m very excited to share the app!