Giter VIP home page Giter VIP logo

Comments (15)

nofelmahmood avatar nofelmahmood commented on July 16, 2024

Do you have a developer account and iCloud enabled in the Demo App ?

from seam.

Sun3 avatar Sun3 commented on July 16, 2024

Yes, I changed the domain com.name... and enabled iCloud. When I comment out that line I am able to create records but will not sync with other devices until I re-enable but then it crashes.

from seam.

nofelmahmood avatar nofelmahmood commented on July 16, 2024

ok Thanks. I am checking the demo app.

from seam.

nofelmahmood avatar nofelmahmood commented on July 16, 2024

Thanks for pointing out the error . Check now I updated it ! The demo works for me :)
btw I had no crashes on the triggerSync() method and the sync is working now.

from seam.

Sun3 avatar Sun3 commented on July 16, 2024

Yep, no more crash. Great job...

from seam.

nofelmahmood avatar nofelmahmood commented on July 16, 2024

Thanks man ! :)

from seam.

Sun3 avatar Sun3 commented on July 16, 2024

Quick Question: I created a new project MyNotes SplitView with CoreData and added the CKIncrementalStore.swift and adopted the CoreDataStack.swift

In my Core Data I have a Class called Event with two fields timeStamp and note. Before integrating the CKIncrementalStore I can create local Core Data files.

Once I implement the CKIncrementalStore I receive below error when trying to add a new record.

2015-06-22 19:37:46.803 MyNotes[9790:427654] CoreData: error: Serious application error.  Exception was caught during Core Data change processing.  This is usually a bug within an observer of NSManagedObjectContextObjectsDidChangeNotification.  [<MyNotes.Event 0x7fceb85b5490> valueForUndefinedKey:]: the entity Event is not key value coding-compliant for the key "cks_LocalStore_Attribute_ChangeType". with userInfo {
    NSTargetObjectUserInfoKey = "<MyNotes.Event: 0x7fceb85b5490> (entity: Event; id: 0x7fceb85a8c50 <x-coredata:///Event/t7CA54E5E-46A2-46AF-A500-BC7DE2D8A00A2> ; data: {\n    note = \"YES - 2015-06-22 23:37:46 +0000\";\n    timeStamp = \"2015-06-22 23:37:46 +0000\";\n})";
    NSUnknownUserInfoKey = "cks_LocalStore_Attribute_ChangeType";
}
2015-06-22 19:37:46.818 MyNotes[9790:427654] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<MyNotes.Event 0x7fceb85b5490> valueForUndefinedKey:]: the entity Event is not key value coding-compliant for the key "cks_LocalStore_Attribute_ChangeType".'

Any ideas?

from seam.

nofelmahmood avatar nofelmahmood commented on July 16, 2024

Its best if you consider starting with the demo app.

from seam.

Sun3 avatar Sun3 commented on July 16, 2024

Yep, I have the demo app working great. I was trying to create a new project and see how it would work.

from seam.

Sun3 avatar Sun3 commented on July 16, 2024

Do you think I am missing a step?

  1. Create a SplitView Core Data iOS app
  2. Add CloudKit
  3. Add field to Event entity called note
  4. Create a NSManagedObject Class for Event
  5. In MasterViewController.swift Change insertNewObject to use Event Class
  6. Run App and I can create new entries without errors.
  7. Add CKIncrementalStore.swift to project
  8. AppDelegate change persistentStoreCoordinator() to use CKIncrementalStore
  9. MasterViewControler.swift add Notification syncFinished
  10. Run and add Record and receive ERROR
2015-06-22 21:22:39.144 MyNotes[1031:29993] CoreData: error: Serious application error.  Exception was caught during Core Data change processing.  This is usually a bug within an observer of NSManagedObjectContextObjectsDidChangeNotification.  [<MyNotes.Event 0x7fd7fc101230> valueForUndefinedKey:]: the entity Event is not key value coding-compliant for the key "cks_LocalStore_Attribute_ChangeType". with userInfo

Did I miss any steps to integrate the lib?

Thanks.

from seam.

nofelmahmood avatar nofelmahmood commented on July 16, 2024

The problem is that when u first ran the app it created the store file and next time when u change the store type to CKSIncrementalStore it tries to reuse that file while CKSIncrementalStore does some model changes at the backend to create the new sqlite file.
In short delete the app and run it again but this time set the store type to CKSIncrementalStore first.

from seam.

Sun3 avatar Sun3 commented on July 16, 2024

Sorry, I forgot to place that step :) but I do delete it before I run it with same results.

from seam.

nofelmahmood avatar nofelmahmood commented on July 16, 2024

If that's the case then the demo shoudn’t actually work. Kindly check your CoreData stack with any possible errors.
If you copied the code from the CoreDataStack class from the demo, then you might have missed a few things that need to be changed like Model name etc.
Best is to copy the CoreData Stack Methods from the app delegate into your CoreDataStack class and then set the store type to CKSIncrementalStore.
I don't think it's a logical error, I can't possibly help you with this particular problem.

from seam.

Sun3 avatar Sun3 commented on July 16, 2024

Thanks...

ps: I wanted to update you that the error was Apple's pre-written UITableView Core Data code causing the issue.

from seam.

nofelmahmood avatar nofelmahmood commented on July 16, 2024

Thanks :)

from seam.

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.