You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we receive a did-save notification, we call notifyAboutChangedObjects(from notification:), which, in turn, calls processChangedLocalObjects(_:). That method will then distribute the objects to all change processors
Calling notify... happens on did-save notifications for both MOCs (view and sync).
I see why this is done for the view context; after merging the changed MOs into the sync context, we want to send them along to the change processors where presumably they will be uploaded to CloudKit by MoodUploader.
But, I do not understand why notify... is called when the sync MOC did-save. The remap calls should be mostly a no-op; there's an early return:
I believe the change processors are also a no-op since there's nothing more do download or upload. Am I correct about the no-op on the change processors? Is this by design? Why?
Aside: Could there be situations where saves are called back-to-back and an upload change processor didn't finalize the Mood upload by setting its remoteIdentifier property?
The text was updated successfully, but these errors were encountered:
Calling
notify...
happens on did-save notifications for both MOCs (view
andsync
).I see why this is done for the
view
context; after merging the changed MOs into thesync
context, we want to send them along to the change processors where presumably they will be uploaded to CloudKit byMoodUploader
.But, I do not understand why
notify...
is called when thesync
MOC did-save. Theremap
calls should be mostly a no-op; there's an early return:I believe the change processors are also a no-op since there's nothing more do download or upload. Am I correct about the no-op on the change processors? Is this by design? Why?
Aside: Could there be situations where saves are called back-to-back and an upload change processor didn't finalize the Mood upload by setting its
remoteIdentifier
property?The text was updated successfully, but these errors were encountered: