Reputation: 175
I am using encrypted-core-data to encrypt the data at rest. It works great, as long the app is not crashed or stopped manually. Application could not access the core data object after a failure and its throws below exception
Jan 18 13:46:04 Test TestDemo[4504] : Name: NSObjectInaccessibleException Jan 18 13:46:04 Test TestDemo[4504] : Reason: CoreData could not fulfill a fault for '0x174026f00 x-coredata://96535FDB-865C-42B7-A1EE-ED80C705EC1D/TestSessionsCollection/p1'
As per below link, it looks like the object's underlying data has been deleted from the persistent store. https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/CoreData/Articles/cdTroubleshooting.html
So for some reason, the data get lost/corrupted when the app is crashed/stopped. I am not sure whether I need to close/reset any context upon failure to prevent core data corruption.
As a recovery, reinitializing with new object is working fine.
Can someone let me know how to diagnose this issue?
Upvotes: 0
Views: 151