Something to know before we get started – the following is just a quick notes of some of my findings about overriding getter & setter in the property and using private properties in the models. It will be relatively short & not in-depth, but comments are welcome if you want to discuss more on these.
So, let’s get started. In the past few weeks I’m working on an iOS app with RealmSwift as the choice of the local database. This is my 1st time working with Realm APIs and I’ve encountered some issues and concerns. As mentioned before we started, one of the issue was about overriding getter & setter of the property in a Realm model class, and the concern was about “can private properties be used in the models?”
First off, we start from having a look of Setters and getters section from Realm’s document.
Continue reading “[Swift; Realm] Override property’s Getter & Setter in model classes & declaring property as private”
I use my MacBook everyday to work on development and I use Homebrew to manage the packages on it. They work fine throughout the days but it’s such a plain to free up spaces on my machine by removing the packages I don’t need anymore.
If you’re a developer who use macOS as your daily driver, you probably familiar with Homebrew and understand my plain. For those of you who don’t know what’s Homebrew,
you could just skip the rest of this it’s the most common, and probably the best package manager on macOS.
The only thing is lacking on Homebrew is the ability to auto remove the unused dependencies. There isn’t any official way to do the clean up. You might end up having lots of unused dependencies remain in you machine and take up a lot of storage. And trust me, you don’t want to remove those dependencies one by one manually or by using a set of commands to clean them up. Therefore we need a simple and elegant solution to get the job done. rmtree is what I’ve found for this purpose.
Continue reading “[Homebrew] Remove packages and unused dependencies to free up spaces”