Open FBonini22 opened 1 year ago
I went to Microsoft Docs and found that iOS isn't supported for filestream locking.
https://learn.microsoft.com/en-us/dotnet/api/system.io.filestream.lock?view=net-7.0
[**System.Runtime.Versioning.UnsupportedOSPlatform("ios")**] [System.Runtime.Versioning.UnsupportedOSPlatform("macos")] [System.Runtime.Versioning.UnsupportedOSPlatform("tvos")] [System.Runtime.Versioning.UnsupportedOSPlatform("freebsd")] public virtual void Lock (long position, long length);
I didn't have this issue in a prior Xamarin Forms app.
I will have to somehow get around this, but I'll share anything I come up with.
Hello,
I am receiving the below exception when running my .NET MAUI app on any iOS device. The code works on Android devices.:
"Your platform does not support FileStream.Lock. Please set mode=Exclusive in your connnection string to avoid this error."
Here is the stack trace, it seems to be traced back to LiteDB:
If I install the latest LiteDB from NuGet, I still get an error on the same line, but the debugger just can't resolve the symbols.
Below is the code I am running which is causing the issue:
The error occurs when rtdb is set to firebaseClient.Child(root)..... and the action "new OfflineDatabase(t, s) is then called.
Does anyone have an idea what could be causing an error like that? I'm going to try a couple more things and report back. Love this library, it's very helpful. TIA