Hi
I'm new to Xamarin forms and as a start I have been trying to replicate the todo lost same project. I seem to be getting an error when I get to the 'database.CreateTableAsync().Wait();'
System.AggregateException: One or more errors occurred. ---> System.NotSupportedException: Don't know about Xamarin.Forms.View
at SQLite.Orm.SqlType (SQLite.TableMapping+Column p, System.Boolean storeDateTimeAsTicks) [0x0019c] in :0
at SQLite.Orm.SqlDecl (SQLite.TableMapping+Column p, System.Boolean storeDateTimeAsTicks) [0x00016] in :0
at SQLite.SQLiteConnection.b__55_0 (SQLite.TableMapping+Column p) [0x00007] in :0
at System.Linq.Enumerable+SelectArrayIterator2[TSource,TResult].ToArray () [0x00012] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.14.0.14/src/Xamarin.iOS/external/corefx/src/System.Linq/src/System/Linq/Select.cs:240 at System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable
1[T] source) [0x0000e] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.14.0.14/src/
The code is almost identical to the todo list sample with the following code in the App.xaml.cs file
static ToDoItemDatabase database;
public static ToDoItemDatabase Database
{
get
{
if (database == null)
{
database = new ToDoItemDatabase(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "ToDoSQLite.db3"));
}
return database;
}
}
I also have a ToDoItemDatabase file with the following code
readonly SQLiteAsyncConnection database;
public ToDoItemDatabase(string dbPath)
{
database = new SQLiteAsyncConnection(dbPath); Debug.WriteLine("database Initialised!");
database.CreateTableAsync<ToDoSQL>().Wait();
Debug.WriteLine("Table created!");
}
I've tried wiping the iOS simulator and cleaning my build but I am no closer to a resolution.
Any help would be beneficial. I also have the sqlite-net-pcl package installed in my cross platform and iOS projects
Abu