[Bug]: SqlRawPersistentBlobCache no valid operation queue in Xamarin.iOS .net 7 when link all set
Describe the bug 🐞
After registering the app name with Akavache.Registrations.Start, a call to InsertObject results in a System.InvalidOperationException "There is not a valid operation queue". SQLitePersistentBlobCache and SQLiteEncryptedBlobCache have been referenced in LinkerPreserve as noted in README. New instances of these classes can be successfully created and referenced (as a test.) I've also attempted to add <AdditionalArgs>--linkskip Akavache</AdditionalArgs> to the iOS project properties, including all other Akavache namespaces. Adding a BlobCache.EnsureInitialized(); after app name registration also didn't help.
Step to reproduce
In project properties set
<MtouchLink>full</MtouchLink>
In app start, register app name:
Akavache.Registrations.Start(blobCacheApplicationName);
Attempt to input a starting object into any cache:
await BlobCache.UserAccount.InsertObject("SuccessfullyStoredValue", true);
Exception will be hit:
System.InvalidOperationException: There is not a valid operation queue
at System.Reactive.PlatformServices.ExceptionServicesImpl.Rethrow(Exception ) in /_/Rx.NET/Source/src/System.Reactive/Internal/ExceptionServicesImpl.cs:line 19
at System.Reactive.ExceptionHelpers.Throw(Exception ) in /_/Rx.NET/Source/src/System.Reactive/Internal/ExceptionServices.cs:line 16
at System.Reactive.Subjects.AsyncSubject`1[[System.Reactive.Unit, System.Reactive, Version=5.0.0.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263]].GetResult() in /_/Rx.NET/Source/src/System.Reactive/Subjects/AsyncSubject.cs:line 430
Expected behavior
Operation queue should be initialized after registering app name, allowing an object to be inserted into the cache.
IDE
Visual Studio 2022
Operating system
Windows 10 Pro
Version
10.0.19044
Device
iPhone 8
Akavache Version
9.1.7
Additional information ℹ️
iOS Project framework
net7.0-ios
Visual Studio version
17.5.1
iOS version
16.0.2
Hello can you find a solution about this issue @MagneticLlama ?
Hello can you find a solution about this issue @MagneticLlama ?
No, I've just used the following in my csproj
<MtouchLink>SdkOnly</MtouchLink>