I have a shared core data backing my iPhone app and WatchKit Extension. They both function well independently, but I'm worried about concurrent use.
In the Extension, I have a UITableView
that has an array of data. Right now it just grabs that array from the shared core data during -awakeWithContext
.
I want to have some sort of communication between the app and extension when a record is created/updated/deleted so that it can be duplicated on the other side immediately (instead of on the next query to Core Data).
This question, How to send data from iphone to watchkit in swift, goes into the iPhone having a handler for when something happens in the Watch, but I'm more concerned about it going the other way. Right now all I can think of is querying core data pretty often to take care of it.