I built a mac app in under an hour 🤯

Ok, I didn’t really build a mac app. But also, I did.

About 5-6 years ago I found myself in between jobs and I was looking for something fun to build while honing some of my skills in the process. During that period of time I spent a lot of time in the public library nearby my house because I was temporarily living with my parents at the time and I didn’t really feel like hanging around the house all day.

Spending so much time in the library meant I spent a lot of time in the “homework area” where a lot of high school students would go to study for their exams. And this gave me an idea.

When I was in high school, there was one thing everybody was more obsessed about than the exams themselves. We always wanted to know what the minimum grade we needed to get was to pass the class.

And that was my app idea.

An app that high school students would use to keep track of their grades, and the app would tell them what grade they need on their next test to achieve their goal. They would be able to configure their target grade, and the app does the rest. Simple, effective, and it would allow me to get some extra Core Data practice in.

Once the app was done and I had a job again I didn’t do much other than update the app every so often.

The last update I did was to add darkmode support when iOS 13 came out.

A few weeks ago I decided I’d overhaul this app a little to have a more modern Core Data stack since the original was built on iOS 9’s Core Data stack, and I wanted to make the app a full-blown SwiftUI app.

Last Thursday, I finished the rewrite and figured I’d turn on iPad support and move to NSPersistentCloudKitContainer to have data sync between devices. And then I figured I’d try to add macOS support too. And to my surprise, everything worked! It took a few minor tweaks but in less than an hour I was able to add iPad support, macOS support, and CloudKit synchronization.

This really goes to show how powerful some of Apple’s frameworks and APIs can be.

Donny


Practical Core Data

Practical Core Data helps you learn Apple's Core Data framework without requiring any prior knowledge. You'll learn how to integrate Core Data in UIKit and SwiftUI applications. The book also covers data modeling, synchronizing your store with a custom backend or CloudKit, profiling and improving performance in a Core Data app, and using Core Data in unit tests.

By the end of the book, you'll know exactly how you can start using Core Data in modern applications.

Buy Practical Core Data for $34,99

Practical Combine

Practical Combine is a book that will help you learn Combine from scratch. You will learn about all aspects of Combine in a natural flow where you're eased into functional reactive programming with simple examples, and the difficulty gradually builds up to complicated integrations in later chapters.

Buy Practical Combine for $29,99

🎶 Currently on repeat 🎶

If you follow me on Twitter you probably know that I play guitar. I'm a huge music lover and want to share this with you. In this section I will share a new album that I've been enjoying a lot every week.

New Found Glory - Sticks and Stones

When I realized this album is almost 20 years old, I felt old. But then I put it on and I couldn’t stop listening. Such a classic!


Other content that I really want to share with you

I’ve tried reading through the suite of Swift concurrency proposals that the team has been working on but I’ve always struggled to make sense of it all in my mind. The examples just didn’t really click, and I haven’t really gotten around to trying it out for myself yet. Luckily, this post from Marin does an absolutely fantastic job at explaining Actors, why they’re useful, and how you can write code that works with them. He even included a nice example where Combine and async/await work together in the second part of his post!

An article by Marin Todorov

Last year, Michie organized WWDC Community for Apple’s first fully online edition of WWDC. It brought together developers from all over the world for a week full of presentations and conversations. It was an awesome experience so I was happy to see that WWDC Community would make a comeback this year. They’re still looking for several volunteers so if you want to help make this year’s WWDC Community edition unfortgettable, click the link and sign up!

An article by Michie