Sqlite in Citrix

0

Am working on cross mobile app using Xamarin.Forms that need to be deployed on private app store using Citirx Xenmobile, and this application need to store some data offline on the local device database (I used Sqlite for that) and auto sync it once its connected online and the application did work successfully once its deployed on the testing devices but it doesn’t work after deploying it through the private store Am getting the following error once the application try to create the Database on the device // disk i/o error // at sqlite.sqlite3.prepare2(sqlitepcl.sqlite3 db, system.string query)[0x0001b]....

The following is the code logic

namespace DAL { public class Repository { static Repository() { me = new Repository(); }

protected Repository()
{
    try
    {   
        new DL.MainDatabase(dbLocation);
    }
    catch
    {
        // Throw Exception 
// disk i/o error
// at sqlite.sqlite3.prepare2(sqlitepcl.sqlite3 db, system.string query)[0x0001b]....
    }
}

public static string DatabaseFilePath
{
    get
    {
        string applicationFolderPath = System.IO.Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "Folder");

        // Create the folder path.
        System.IO.Directory.CreateDirectory(applicationFolderPath);

        return System.IO.Path.Combine(applicationFolderPath, "DB.db");
    }
}

} }

namespace DL { public class MainDatabase : SQLiteConnection { public MainDatabase(string path) : base(path, true, "Pass") { CreateTable(); } } }

Please advise me if you know a way fix this issue Note: I have made sure to grant the app all permissions on Citrix Xenmobile

AJaz

Posted 2019-04-24T17:36:50.830

Reputation: 1

No answers