2

I am getting a few (3/1400) db corruptions on an iOS app built using Xamarin.Forms.

When I look at the physical sqlite db, the size indicates content, and doing a dump returns a sql script with complete data, but ending like this

/**** ERROR: (11) database disk image is malformed *****/

at the point in time where corruption occurred.

Using this sqlite3 snippet I get a working copy of the database that is readable and queryable.

I would like to be able to make a copy of a corrupt db on the device, and then recover it using the second method on the iOS device itself, so remote users can continue working.

My question is: how do I get the sqlite3 command's equivalent on iOS in Xamarin Forms?

Community
  • 1
  • 1
callisto
  • 4,921
  • 11
  • 51
  • 92

1 Answers1

0

As far as I can tell there is no way to do this programatically. You could possibly look at the source of the command line repair utilities and try to port them so that they could be called programatically.

Jason
  • 86,222
  • 15
  • 131
  • 146