FetchedResultsController Swift 3 API Misuse: Attempt to serialize store access on non-owning coordinator

后端 未结 3 572
野性不改
野性不改 2021-02-13 14:11

I\'m attempting to use a fetchedResultsController to handle the results in my UITable.

It works initially when the program starts up. Then when I switch back to the inv

3条回答
  •  时光说笑
    2021-02-13 14:52

    I have reviewed your all comments and contents posted here. You have not shared one file here, but the problem is occurring you are creating invalid managed objects in the context.

    And then whenever you call viewWillAppear() function in InventoryViewController, it saves the context.

    Finally, it synced empty records into your database. During parsing those invalid objects, it tried to parse nil value, so crashed.

    Please never set default value for managed objects you are defining as properties. I hope this will clarify your issue.

提交回复
热议问题