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.
-
Facing this issue even on xcode 8 after official launch. – Baby Groot Sep 17 '16 at 09:33
-
I'm having the same problem.. Anyone solved it yet? – ICL1901 Jan 13 '17 at 20:53
-
1Made a terrible blunder that prompted this error for me: I was using the NSFileManager to delete a photo in the documents directory. I had passed a null photo name and the process attempted to delete the documents DIRECTORY ! It failed to delete but corrupted CoreData records. – DontKnow Feb 07 '17 at 20:54
1 Answers
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.

- 56
- 6