Giter Club home page Giter Club logo

Comments (6)

drewmccormack avatar drewmccormack commented on July 30, 2024

That is very odd. And you are returning 'true' from the should-save-merge-changes? You aren't releasing the ensembles object somewhere?

from ensembles.

timbuchwaldt avatar timbuchwaldt commented on July 30, 2024

Wow that was a quick reply :D
I returned true there, now commented out the implementation to check whether that changes anything (it doesn't).

Pretty sure I'm not releasing it, I hold a reference from my AppDelegate to the object - I also see logs appearing from CDECloudManager and all that - just never actually merging.

from ensembles.

drewmccormack avatar drewmccormack commented on July 30, 2024

So the completion block of the merge method is never called? Is it possible perhaps that the did-merge isn't called, because it discovers there were no changes in the sync data. I think that can happen. The completion block should always be called though, data or no data.

If the merge is completing, but you don't see any data, the most likely culprit is simply that iCloud Drive has not yet transferred the data over. When using the simulator, you might need to use the Debug menu in Xcode to trigger the transfers.

from ensembles.

timbuchwaldt avatar timbuchwaldt commented on July 30, 2024

Having lunch + trying again worked. I actually found an Ensembles error 204 (wrong model version) hiding in the log -> Wiped iCloud drive & restarted apps -> Working.

Thanks a bunch :)

from ensembles.

timbuchwaldt avatar timbuchwaldt commented on July 30, 2024

For future reference: Be sure to implement didFailToSaveMergedChangesIn as it might get called, like in my case, with a nice error: I had a unique constraint that failed and prevented almost all merges, just in some cases it seems to have merged it when I reset stuff and had the timing just right that recreated it.

@drewmccormack As I think I haven't seen the error without implementing the callback: Might it be useful to provide a default implementation for this that logs this error very prominently?

func persistentStoreEnsemble(_ ensemble: CDEPersistentStoreEnsemble!, didFailToSaveMergedChangesIn savingContext: NSManagedObjectContext!, error: Error!, reparationManagedObjectContext reparationContext: NSManagedObjectContext!) -> Bool {
    print("Merge failed \(error)")
    return false
}

from ensembles.

drewmccormack avatar drewmccormack commented on July 30, 2024

from ensembles.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.