I am in the process of re-releasing my iPhone app and now an executeFetchRequest on my UIManagedDocument gets an SQLite error code:6922. I have searched the internet and there is no SQLite error code 6922. Anyone seen this. Everything worked fine with Xcode 7.
I also ran into this error in iOS 10 after saving a NSManagedObjectContext to a NSPersistentStore that I had set to a specific file. After saving, the file was deleted (after I had encrypted it and save as another file) and the next time I tried to access data from the NSManagedObjectContext via the exectueFetchRequest, it tried to pull the data from NSPersistentStore file that I had deleted. Since the file no longer existed, it gave me the "SQLite error code:6922, 'disk I/O error'"
If, I do not delete the file I had set my NSPersistentStore as, the executeFetchRequest is able to read the data from the file and no SQLite error is thrown.
It seems that in iOS 10, the data does not remain in memory, or it defaults to reading the data from the file.
If I run the original code in the iOS 9.3 simulator (XCode 8 GM), it works as it previously did and no error occurred.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With