• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Checking integrity of a Core Data document with SQLite store
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Checking integrity of a Core Data document with SQLite store


  • Subject: Checking integrity of a Core Data document with SQLite store
  • From: Dave Fernandes <email@hidden>
  • Date: Sun, 14 Mar 2010 22:21:37 -0400

I recently had a user show me a corrupted document (NSPersistentDocument with SQLite store). The document would open, but then cause problems later on. The initial 10% of the file looks fine, but the remainder is all 0's. I think the corruption occurred while doing a Finder copy from one disk image to another, so I would simply like to detect the corruption before opening the file.

The problem is currently that the file can be opened, but an exception is only thrown when some user action causes a fault to be fetched from a part of the file that is corrupt.

So my question is - how do you detect this before loading the file? I'm aware of the sqlite3 PRAGMA integrity_check, but there does not seem to be a C API for this. Any pointers?

Thanks,
Dave_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Checking integrity of a Core Data document with SQLite store
      • From: mmalc Crawford <email@hidden>
  • Prev by Date: How to properly handle Undo and triggered actions
  • Next by Date: crash in Coca Touch when adding two objects to an empty core-data store with a UITableView using sections
  • Previous by thread: How to properly handle Undo and triggered actions
  • Next by thread: Re: Checking integrity of a Core Data document with SQLite store
  • Index(es):
    • Date
    • Thread