Skip to content

Instantly share code, notes, and snippets.

Wondering why anyone puts up with me

Rob Bishop SaganRitual

Wondering why anyone puts up with me
View GitHub Profile
SaganRitual / CoreStoreNotificationsExample.swift
Last active Mar 2, 2018
Working, bare-bones example of how to use CoreStore's notification mechanism
View CoreStoreNotificationsExample.swift
// Figuring out how CoreStore's monitor/observer mechanism works was a painful
// experience. This is a working example of how to use list object observers and
// single object observers. You'll need CoreStore, of course, to run this.
// Instantiate a Database object and call the .go() method. The reason for the
// Timers is that I wanted to make sure the code would run in asynchronous pieces,
// rather than all on one execution thread, to more-or-less simulate mouse
// clicks in a real app.
// -- don't get me wrong, it was
// worth the pain. But with any luck this example will spare you some headaches.