I’m installing the Commercial edition of SQL Cipher on an existing Xamarin project that uses MVVMCross to centralize logic in a shared library. The project includes individual projects for Xamarin.UWP, Xamarin.iOS, and Xamarin.Android.
I’m attempting to follow this tutorial: https://www.zetetic.net/sqlcipher/sqlcipher-for-dotnet/
I believe I’m running into some linking issues that are probably obvious but I have not been able to track them down and the internet has not been very helpful. I have tried installing various nuget packages in various projects for a few days and no combination seems to work.
I have installed:
zetetic-sqlcipher-android in the Xamarin.Android project
zetetic-sqlcipher-ios in the Xamarin.iOS project
zetetic-sqlcipher-windows-uap in the Xamarin.UWP project
zetetic-sqlite-net-base in the shared core project
I have removed all other sqlite-related packages from the solution.
This is the error I am getting:
Java.Interop.Tools.Diagnostics.XamarinAndroidException: error XA2006: Could not resolve reference to 'SQLitePCL.delegate_progress_handler' (defined in assembly 'SQLitePCLRaw.provider.sqlcipher, Version=126.96.36.1990, Culture=neutral, PublicKeyToken=7bbc99275c710061') with scope 'SQLitePCLRaw.core, Version=188.8.131.520, Culture=neutral, PublicKeyToken=1488e028ca7ab535'. When the scope is different from the defining assembly, it usually means that the type is forwarded. ---> Mono.Cecil.ResolutionException: Failed to resolve SQLitePCL.delegate_progress_handler at Mono.Linker.Steps.MarkStep.HandleUnresolvedType(TypeReference reference) at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference) at MonoDroid.Tuner.MonoDroidMarkStep.MarkType(TypeReference reference) at Mono.Linker.Steps.MarkStep.MarkField(FieldReference reference) at Mono.Linker.Steps.MarkStep.InitializeFields(TypeDefinition type) at Mono.Linker.Steps.MarkStep.InitializeType(TypeDefinition type) at Mono.Linker.Steps.MarkStep.InitializeAssembly(AssemblyDefinition assembly) at Mono.Linker.Steps.MarkStep.Initialize() at Mono.Linker.Steps.MarkStep.Process(LinkContext context) at MonoDroid.Tuner.MonoDroidMarkStep.Process(LinkContext context) at Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step) at Mono.Linker.Pipeline.Process(LinkContext context) at MonoDroid.Tuner.Linker.Process(LinkerOptions options, ILogger logger, LinkContext& context) at Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res) --- End of inner exception stack trace --- at Java.Interop.Tools.Diagnostics.Diagnostic.Error(Int32 code, Exception innerException, String message, Object args) in /Users/runner/runners/2.165.0/work/1/s/xamarin-android/external/Java.Interop/src/Java.Interop.Tools.Diagnostics/Java.Interop.Tools.Diagnostics/Diagnostic.cs:line 166 at Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res) at Xamarin.Android.Tasks.LinkAssemblies.RunTask() at Xamarin.Android.Tasks.AndroidTask.Execute()