Refresh to actual data after changes from app extension #260

Open
opened 2025-12-29 15:27:48 +01:00 by adam · 1 comment
Owner

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?

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?
adam added the enhancementhelp wanted labels 2025-12-29 15:27:48 +01:00
Author
Owner

@JohnEstropia commented on GitHub (Apr 12, 2019):

CoreStore doesn't support this yet. Theoretically, NSManagedObjectContext.mergeChanges(fromRemoteContextSave:into:) should be called on the app's NSManagedObjectContext and passing in the userInfo from NSNotification.Name.NSManagedObjectContextObjectsDidChange.

@JohnEstropia commented on GitHub (Apr 12, 2019): CoreStore doesn't support this yet. Theoretically, `NSManagedObjectContext.mergeChanges(fromRemoteContextSave:into:)` should be called on the app's `NSManagedObjectContext` and passing in the `userInfo` from `NSNotification.Name.NSManagedObjectContextObjectsDidChange`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/CoreStore#260