File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -48,12 +48,16 @@ public Task Run()
4848 {
4949 while ( true )
5050 {
51- //
52- // NOTE: Change this to readwrite and then it does work ???
53- // No more IOERROR
54- //
55-
56- using ( var dbConnection = new DbConnection ( SQLiteOpenFlags . FullMutex | SQLiteOpenFlags . ReadOnly ) )
51+ //
52+ // NOTE: Change this to readwrite and then it does work ???
53+ // No more IOERROR
54+ //
55+
56+ var flags = SQLiteOpenFlags . FullMutex | SQLiteOpenFlags . ReadOnly ;
57+ #if __IOS__
58+ flags = SQLiteOpenFlags . FullMutex | SQLiteOpenFlags . ReadWrite ;
59+ #endif
60+ using ( var dbConnection = new DbConnection ( flags ) )
5761 {
5862 var records = dbConnection . Table < TestObj > ( ) . ToList ( ) ;
5963 System . Diagnostics . Debug . WriteLine ( $ "{ Environment . CurrentManagedThreadId } Read records: { records . Count } ") ;
You can’t perform that action at this time.
0 commit comments