Hello everyone.
I'm trying to execute data from some sqlite DB, but i can't since it doesn't copying to app's local folder. Looks like program creates new one, empty, so i get an error that "no such table found".
There is my code:
`global::Xamarin.Forms.Forms.Init ();
string docFolder = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
string libFolder = Path.Combine(docFolder, "..", "Library");
if (!Directory.Exists(libFolder))
{
Directory.CreateDirectory(libFolder);
}
string dbPath = Path.Combine(libFolder, "KDLife_mobileDB.db3");
if (!File.Exists(dbPath))
{
var existingDb = NSBundle.MainBundle.PathForResource("KDLife_mobileDB", "db3");
File.Copy(existingDb, dbPath);
}
LoadApplication (new KDLife_mobile.App ());
`
Just wondering what is wrong with it.
I copied normal DB to app's local path and everything worked fine.