{"action":"created","issue":{"url":"https://api.github.com/repos/hyperoslo/Sync/issues/153","labels_url":"https://api.github.com/repos/hyperoslo/Sync/issues/153/labels{/name}","comments_url":"https://api.github.com/repos/hyperoslo/Sync/issues/153/comments","events_url":"https://api.github.com/repos/hyperoslo/Sync/issues/153/events","html_url":"https://github.com/hyperoslo/Sync/issues/153","id":121910403,"number":153,"title":"update notification not fired","user":{"login":"violabg","id":3963176,"avatar_url":"https://avatars.githubusercontent.com/u/3963176?v=3","gravatar_id":"","url":"https://api.github.com/users/violabg","html_url":"https://github.com/violabg","followers_url":"https://api.github.com/users/violabg/followers","following_url":"https://api.github.com/users/violabg/following{/other_user}","gists_url":"https://api.github.com/users/violabg/gists{/gist_id}","starred_url":"https://api.github.com/users/violabg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/violabg/subscriptions","organizations_url":"https://api.github.com/users/violabg/orgs","repos_url":"https://api.github.com/users/violabg/repos","events_url":"https://api.github.com/users/violabg/events{/privacy}","received_events_url":"https://api.github.com/users/violabg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-13T09:53:42Z","updated_at":"2015-12-13T14:26:50Z","closed_at":null,"body":"When I receive a new json I need to do some clean up on my local data. For each deleted object I need to delete files the a user could have download, and the same is true for each update, where I need to delete the previously downloaded files and set a property that marks the update status.\r\nI'm kind of new to core data son I thought to use notification:\r\n\r\n```swift\r\nfunc changeNotification(notification: NSNotification) {\r\n        let updatedObjects = notification.userInfo?[NSUpdatedObjectsKey]\r\n        let deletedObjects = notification.userInfo?[NSDeletedObjectsKey]\r\n        let insertedObjects = notification.userInfo?[NSInsertedObjectsKey]\r\n        let refreshedObjects = notification.userInfo?[NSRefreshedObjectsKey]\r\n\r\n        print(\"updatedObjects: \\(updatedObjects)\")\r\n        print(\"deletedObjects: \\(deletedObjects)\")\r\n        print(\"insertedObjects: \\(insertedObjects)\")\r\n        print(\"refreshedObjects: \\(refreshedObjects)\")\r\n    }\r\n```\r\n\r\nI don't know if there is a better place to do what I need to do.\r\nthe problem is that if an entity gets its properties updated, those are reflected by Sync to core data, but the updatedObjects event is not fired, while is working on deleted and inserted."},"comment":{"url":"https://api.github.com/repos/hyperoslo/Sync/issues/comments/164263105","html_url":"https://github.com/hyperoslo/Sync/issues/153#issuecomment-164263105","issue_url":"https://api.github.com/repos/hyperoslo/Sync/issues/153","id":164263105,"user":{"login":"3lvis","id":1088217,"avatar_url":"https://avatars.githubusercontent.com/u/1088217?v=3","gravatar_id":"","url":"https://api.github.com/users/3lvis","html_url":"https://github.com/3lvis","followers_url":"https://api.github.com/users/3lvis/followers","following_url":"https://api.github.com/users/3lvis/following{/other_user}","gists_url":"https://api.github.com/users/3lvis/gists{/gist_id}","starred_url":"https://api.github.com/users/3lvis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/3lvis/subscriptions","organizations_url":"https://api.github.com/users/3lvis/orgs","repos_url":"https://api.github.com/users/3lvis/repos","events_url":"https://api.github.com/users/3lvis/events{/privacy}","received_events_url":"https://api.github.com/users/3lvis/received_events","type":"User","site_admin":false},"created_at":"2015-12-13T14:26:50Z","updated_at":"2015-12-13T14:26:50Z","body":"Hi, I just tried [running the AppNet example](https://github.com/hyperoslo/Sync/tree/master/AppNet) and inserts, updates and deletes are working fine. Also getting the notifications works, too.\r\n\r\n<img width=\"1175\" alt=\"screen shot 2015-12-13 at 15 24 30\" src=\"https://cloud.githubusercontent.com/assets/1088217/11767431/a6e457d2-a1ad-11e5-93f8-65682bc5470c.png\">\r\n\r\n"}}