Search code examples
akavache

Attempting to JIT compile method 'Akavache.Sqlite3.Registrations:Register (Splat.IMutableDependencyResolver)' while running in aot-only mode


  • Xamarin.iOS
  • Xamarin.Forms 3.6
  • akavache v6.4.1
The type initializer for 'Akavache.BlobCache' threw an exception.
Attempting to JIT compile method 'Akavache.Sqlite3.Registrations:Register (Splat.IMutableDependencyResolver)' while running in aot-only mode. See https://learn.microsoft.com/xamarin/ios/internals/limitations for more information.

when debug run on actual device, error above are counter as soon as below code are called

Akavache.Registrations.Start("AppName");

tried to execute in

  • AppDelegate.cs before/after Xamarin.Forms.Forms.Init();
  • PCL library App.cs OnStart()

all throw same error

any idea why will invoke JIT ?

thank you


Solution

  • There is a fix with splat v7.1, akavache is being updated to use it in this PR https://github.com/reactiveui/Akavache/pull/472

    Also worth noting the following bug https://github.com/reactiveui/splat/issues/292