Hi Furkan OZOGLU, SiriKit runs on extension that is attached to different process from the main app. To be able to share data between app and extension, you need to enable App Group sharing. Then save the file or UserDefaults using your App Group namespace.
👍 I agree Suprie Anto, Notification Center model propagation wont’t scale if the app become bigger and complex . I make this simple prototype app just for demonstrating of how we can use built in Cocoa notification mechanism to build a simple MVVM app without importing third party library dependencies.
Thanks Suprie Anto. 😀
Yes Deni Zakya you are right, in this article i just want to show the example of observing a change in Model using Notification Center post notification that can be used by observers to observe change of value within a model.
Thanks Deni Zakya for your references 😀.
Hi Deni Zakya, in EmailViewModel there are 2 properties declared with objc dynamic keywords:
Those properties are being observed by the ViewController using the keypath in the observeViewModel method to update the emailLabel and…