mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-01-12 04:10:36 +01:00
Refresh to actual data after changes from app extension #260
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mikhailovas on GitHub (Mar 26, 2019).
Hi there,
I have notifications extension. So each time I receive push-notification app makes changes to base. If app is not running - everything is ok. All new data on its place.
But if app is currently running in background nothing changes.
I've tried to use CoreStore.refreshAndMergeAllObjects() but it doesn't help
Maybe someone know?
@JohnEstropia commented on GitHub (Apr 12, 2019):
CoreStore doesn't support this yet. Theoretically,
NSManagedObjectContext.mergeChanges(fromRemoteContextSave:into:)should be called on the app'sNSManagedObjectContextand passing in theuserInfofromNSNotification.Name.NSManagedObjectContextObjectsDidChange.