100 Days of Code Days 14-17 - Watch App, and More Cross Communication, and More Modernization

|

I haven’t kept with my posts for the last four days or so, but I’m back! Plenty has been going on with Moodsmitten.

Watch App Status

Right now I am in the middle of implementing the watch app. So far, the watch can set today’s mood. If I’m up to it, I may want to display the thought records for the current day and implement handoff when a thought record is chosen.

Cross Communication

The trickiest part of all of this is making the watch app, today extension, and main app communicate with each other. In order to simplify things, I switched my today extension-main app communication using the MMWormhole wrapper. Before, I was using unsafe pointers and yucky C stuff in order to directly communicate with CFNotificationCenter, and I was struggling to fix some edge cases. This is a perfect time to use a third-party library that has been battle tested to perform a relatively niche task, so I can focus on the app itself rather than the boilerplate.

Modernization

I bumped up the app to require iOS 10. This is because I’m using the new UNNotification API for notifications. I don’t have a big user base just yet, so I can get away with this change. I want to use the least amount of deprecated code as possible in order to keep up with Apple’s direction.

Reading, Working, and Filling in the Gaps

I’ve really took it upon myself to read just as much as I need, implement, and go back to the books when I need something that I can’t figure out. I learn a lot faster this way, and I’m actually building something in the process!

Support Moodsmitten

Did I mention that Moodsmitten 1.0 is already on the App Store? It’s free-to-download with a $4.99 in-app purchase to unlock all functionality. If you’re into CBT or need a place to challenge your automatic thoughts, look no further!

Did you like this post? Are you smitten for Soundsmitten? Click the "Tweet" link below to retweet my post. It keeps my livelihood afloat, brightens my day, and I'm always eternally grateful. Thanks for your help!